{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/55789045","id":55789045,"diff_hunk":"@@ -16,6 +16,34 @@ continue.\n as [`process.exit()`][] or uncaught exceptions, and should not be used as an\n alternative to the `'exit'` event unless the intention is to schedule more work.\n \n+## Event: 'deprecation'","path":"doc/api/process.markdown","position":4,"original_position":4,"commit_id":"8b4dd5c685d88a7cca265d7e44c03b88707cb7c4","original_commit_id":"8b4dd5c685d88a7cca265d7e44c03b88707cb7c4","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"body":"I'd be fine with that also. I originally had deprecations emitted as\nwarnings and only split this out following the feedback from Doug. That can\nbe reverted easily, however.\nOn Mar 10, 2016 8:41 PM, \"Jeremiah Senkpiel\" <notifications@github.com>\nwrote:\n\n> In doc/api/process.markdown\n> <https://github.com/nodejs/node/pull/4782#discussion_r55787034>:\n>\n> > @@ -16,6 +16,34 @@ continue.\n> >  as [`process.exit()`][] or uncaught exceptions, and should not be used as an\n> >  alternative to the `'exit'` event unless the intention is to schedule more work.\n> >\n> > +## Event: 'deprecation'\n>\n> Hmmm, if deprecations were still also emitted on warning and we moved to\n> deprecate deprecate I would be ok with that? Currently it's a little\n> split for not much reason. Maybe that's what has existed outside but I\n> don't see how it will be goof for our users down the line.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/nodejs/node/pull/4782/files#r55787034>.\n>\n","created_at":"2016-03-11T04:44:15Z","updated_at":"2016-03-11T04:44:15Z","html_url":"https://github.com/nodejs/node/pull/4782#discussion_r55789045","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/4782","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/55789045"},"html":{"href":"https://github.com/nodejs/node/pull/4782#discussion_r55789045"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/4782"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/4782","id":56657402,"html_url":"https://github.com/nodejs/node/pull/4782","diff_url":"https://github.com/nodejs/node/pull/4782.diff","patch_url":"https://github.com/nodejs/node/pull/4782.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/4782","number":4782,"state":"open","locked":false,"title":"process: add 'warning' event","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"body":"In several places throughout the code we write directly to stderr\r\nto report warnings (deprecation, possible eventemitter memory leak).\r\nThe current design of simply dumping the text to stderr is less\r\nthan ideal. This PR introduces a new \"Process Warnings\" mechanism\r\nthat emits 'warn' events on the global process object. These are\r\ninvoked with a `Warning` object that is similar in structure to\r\nan `Error` in that they have a name, message and stack trace.\r\n\r\nBy default, these warnings will be printed to stderr. This can be\r\nsuppressed using the `--no-warnings` command line flag, however the\r\n'warn' event will still be emitted by the process, allowing applications\r\nto handle the warnings in custom ways.\r\n\r\nThe `--trace-warnings` command line flag will tell Node.js to print\r\nthe full stack trace of warnings as part of the default handling.\r\n\r\nThe existing `--no-deprecation`, `--throw-deprecation` and\r\n`--trace-deprecation` flags continue to work as they currently do,\r\nbut the exact output of the warning message is modified to occur\r\non process.nextTick(). The stack trace for the warning, however,\r\nis preserved and shows the correct call site.\r\n\r\nTest cases and documentation are included.\r\n\r\nRefs: https://github.com/nodejs/node-eps/pull/4#issuecomment-173079195","created_at":"2016-01-20T19:47:20Z","updated_at":"2016-03-11T04:44:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e1ed5a914eadd786904edc60359bacd63f4c7a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/4782/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/4782/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/4782/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/8b4dd5c685d88a7cca265d7e44c03b88707cb7c4","head":{"label":"jasnell:process-warning","ref":"process-warning","sha":"8b4dd5c685d88a7cca265d7e44c03b88707cb7c4","user":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"repo":{"id":37868459,"name":"node","full_name":"jasnell/node","owner":{"login":"jasnell","id":439929,"avatar_url":"https://avatars.githubusercontent.com/u/439929?v=3","gravatar_id":"","url":"https://api.github.com/users/jasnell","html_url":"https://github.com/jasnell","followers_url":"https://api.github.com/users/jasnell/followers","following_url":"https://api.github.com/users/jasnell/following{/other_user}","gists_url":"https://api.github.com/users/jasnell/gists{/gist_id}","starred_url":"https://api.github.com/users/jasnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasnell/subscriptions","organizations_url":"https://api.github.com/users/jasnell/orgs","repos_url":"https://api.github.com/users/jasnell/repos","events_url":"https://api.github.com/users/jasnell/events{/privacy}","received_events_url":"https://api.github.com/users/jasnell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasnell/node","description":"Future Node.js releases will be based on io.js","fork":true,"url":"https://api.github.com/repos/jasnell/node","forks_url":"https://api.github.com/repos/jasnell/node/forks","keys_url":"https://api.github.com/repos/jasnell/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasnell/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasnell/node/teams","hooks_url":"https://api.github.com/repos/jasnell/node/hooks","issue_events_url":"https://api.github.com/repos/jasnell/node/issues/events{/number}","events_url":"https://api.github.com/repos/jasnell/node/events","assignees_url":"https://api.github.com/repos/jasnell/node/assignees{/user}","branches_url":"https://api.github.com/repos/jasnell/node/branches{/branch}","tags_url":"https://api.github.com/repos/jasnell/node/tags","blobs_url":"https://api.github.com/repos/jasnell/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasnell/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasnell/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasnell/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasnell/node/statuses/{sha}","languages_url":"https://api.github.com/repos/jasnell/node/languages","stargazers_url":"https://api.github.com/repos/jasnell/node/stargazers","contributors_url":"https://api.github.com/repos/jasnell/node/contributors","subscribers_url":"https://api.github.com/repos/jasnell/node/subscribers","subscription_url":"https://api.github.com/repos/jasnell/node/subscription","commits_url":"https://api.github.com/repos/jasnell/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasnell/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasnell/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasnell/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasnell/node/contents/{+path}","compare_url":"https://api.github.com/repos/jasnell/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasnell/node/merges","archive_url":"https://api.github.com/repos/jasnell/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasnell/node/downloads","issues_url":"https://api.github.com/repos/jasnell/node/issues{/number}","pulls_url":"https://api.github.com/repos/jasnell/node/pulls{/number}","milestones_url":"https://api.github.com/repos/jasnell/node/milestones{/number}","notifications_url":"https://api.github.com/repos/jasnell/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasnell/node/labels{/name}","releases_url":"https://api.github.com/repos/jasnell/node/releases{/id}","deployments_url":"https://api.github.com/repos/jasnell/node/deployments","created_at":"2015-06-22T17:01:18Z","updated_at":"2016-01-11T18:47:43Z","pushed_at":"2016-03-11T03:12:54Z","git_url":"git://github.com/jasnell/node.git","ssh_url":"git@github.com:jasnell/node.git","clone_url":"https://github.com/jasnell/node.git","svn_url":"https://github.com/jasnell/node","homepage":"https://iojs.org","size":182185,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"3c8475241d227878cc9190a574b5a5cab687122e","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"name":"node","full_name":"nodejs/node","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars.githubusercontent.com/u/9950313?v=3","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2016-03-11T04:00:00Z","pushed_at":"2016-03-11T04:30:14Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org","size":216961,"stargazers_count":20911,"watchers_count":20911,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2683,"mirror_url":null,"open_issues_count":739,"forks":2683,"open_issues":739,"watchers":20911,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/4782"},"html":{"href":"https://github.com/nodejs/node/pull/4782"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/4782"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/4782/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/4782/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/4782/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/8b4dd5c685d88a7cca265d7e44c03b88707cb7c4"}}}}