{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/62119109","id":62119109,"diff_hunk":"@@ -1385,6 +1393,210 @@ The synchronous version of [`fs.writeFile()`][]. Returns `undefined`.\n \n Synchronous versions of [`fs.write()`][]. Returns the number of bytes written.\n \n+## FS Constants\n+\n+The following constants are exported by `fs.constants`. **Note:** not every","path":"doc/api/fs.md","position":131,"original_position":131,"commit_id":"98553d3dc11f787b2281be6d02695eb7033b77fb","original_commit_id":"98553d3dc11f787b2281be6d02695eb7033b77fb","user":{"login":"Trott","id":718899,"avatar_url":"https://avatars.githubusercontent.com/u/718899?v=3","gravatar_id":"","url":"https://api.github.com/users/Trott","html_url":"https://github.com/Trott","followers_url":"https://api.github.com/users/Trott/followers","following_url":"https://api.github.com/users/Trott/following{/other_user}","gists_url":"https://api.github.com/users/Trott/gists{/gist_id}","starred_url":"https://api.github.com/users/Trott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trott/subscriptions","organizations_url":"https://api.github.com/users/Trott/orgs","repos_url":"https://api.github.com/users/Trott/repos","events_url":"https://api.github.com/users/Trott/events{/privacy}","received_events_url":"https://api.github.com/users/Trott/received_events","type":"User","site_admin":false},"body":"Nit: `not every` -> `Not every`","created_at":"2016-05-04T21:36:47Z","updated_at":"2016-05-04T21:36:47Z","html_url":"https://github.com/nodejs/node/pull/6534#discussion_r62119109","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/6534","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/62119109"},"html":{"href":"https://github.com/nodejs/node/pull/6534#discussion_r62119109"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/6534"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/6534","id":68630500,"html_url":"https://github.com/nodejs/node/pull/6534","diff_url":"https://github.com/nodejs/node/pull/6534.diff","patch_url":"https://github.com/nodejs/node/pull/6534.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/6534","number":6534,"state":"open","locked":false,"title":"src: refactor constants, \"deprecate\" require('constants')","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":"##### Checklist\r\n\r\n- [x] tests and code linting passes\r\n- [x] a test and/or benchmark is included\r\n- [x] documentation is changed or added\r\n- [x] the commit message follows commit guidelines\r\n\r\n##### Affected core subsystem(s)\r\n\r\nconstants, os, fs, crypto\r\n\r\n##### Description of change\r\n\r\nThe require('constants') module is currently undocumented and mashes together unrelated constants. This soft deprecates the require('constants') in favor of distinct os.constants, fs.constants, and crypto.constants that are specific to the modules for which they are relevant. The next step is to document those within the specific modules.\r\n\r\nThe justification for this is straightforward:\r\n\r\n1. The `constants` module was never actually documented. It's referenced a number of times in documentation but never adequately supported.\r\n\r\n2. The single constants object mashes up a number of unrelated constants, which can cause issues with sloppy code. For instance, a bug in spawnSync (https://github.com/nodejs/node/blob/master/lib/child_process.js#L383-L391) essentially allows any defined constant to be used as a signal. In another instance, the code is implementing hacks (https://github.com/nodejs/node/blob/master/lib/internal/process.js#L171-L174) to limit look ups to just signals.\r\n\r\n3. Constants should be exported by the modules in which they are actually relevant, and they should be logically grouped so that they make sense. \r\n\r\nOn the downside, there's a slight bit more overhead in creating the process.binding('constants').\r\n\r\n/cc @addaleax @nodejs/documentation @nodejs/ctc @nodejs/crypto","created_at":"2016-05-02T22:14:39Z","updated_at":"2016-05-04T21:36:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97a0e3d34a0fe5d838f21ae00ce56e4ef277037d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/6534/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/6534/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/6534/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/98553d3dc11f787b2281be6d02695eb7033b77fb","head":{"label":"jasnell:more-logical-constants","ref":"more-logical-constants","sha":"98553d3dc11f787b2281be6d02695eb7033b77fb","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-05-04T17:21: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":187518,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"51e7bc8f79eb99d402d5633dcfd8b147318c4b40","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-05-04T21:29:03Z","pushed_at":"2016-05-04T21:06:10Z","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":252458,"stargazers_count":22852,"watchers_count":22852,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3178,"mirror_url":null,"open_issues_count":636,"forks":3178,"open_issues":636,"watchers":22852,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/6534"},"html":{"href":"https://github.com/nodejs/node/pull/6534"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/6534"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/6534/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/6534/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/6534/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/98553d3dc11f787b2281be6d02695eb7033b77fb"}}}}