{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/18308","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/18308/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/18308/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/18308/events","html_url":"https://github.com/nodejs/node/pull/18308","id":290688713,"number":18308,"title":"fs: throw errors on invalid paths synchronously","user":{"login":"joyeecheung","id":4299420,"avatar_url":"https://avatars0.githubusercontent.com/u/4299420?v=4","gravatar_id":"","url":"https://api.github.com/users/joyeecheung","html_url":"https://github.com/joyeecheung","followers_url":"https://api.github.com/users/joyeecheung/followers","following_url":"https://api.github.com/users/joyeecheung/following{/other_user}","gists_url":"https://api.github.com/users/joyeecheung/gists{/gist_id}","starred_url":"https://api.github.com/users/joyeecheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyeecheung/subscriptions","organizations_url":"https://api.github.com/users/joyeecheung/orgs","repos_url":"https://api.github.com/users/joyeecheung/repos","events_url":"https://api.github.com/users/joyeecheung/events{/privacy}","received_events_url":"https://api.github.com/users/joyeecheung/received_events","type":"User","site_admin":false},"labels":[{"id":155435785,"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc","default":false},{"id":169485514,"url":"https://api.github.com/repos/nodejs/node/labels/semver-major","name":"semver-major","color":"fbca04","default":false},{"id":678967907,"url":"https://api.github.com/repos/nodejs/node/labels/tsc-review","name":"tsc-review","color":"006b75","default":false},{"id":512071972,"url":"https://api.github.com/repos/nodejs/node/labels/url-whatwg","name":"url-whatwg","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/nodejs/node/milestones/26","html_url":"https://github.com/nodejs/node/milestone/26","labels_url":"https://api.github.com/repos/nodejs/node/milestones/26/labels","id":2551352,"number":26,"title":"10.0.0","description":"","creator":{"login":"jasnell","id":439929,"avatar_url":"https://avatars2.githubusercontent.com/u/439929?v=4","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},"open_issues":2,"closed_issues":10,"state":"open","created_at":"2017-05-30T19:07:02Z","updated_at":"2018-02-02T19:41:56Z","due_on":"2018-04-30T07:00:00Z","closed_at":null},"comments":20,"created_at":"2018-01-23T02:37:27Z","updated_at":"2018-02-07T10:57:54Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/18308","html_url":"https://github.com/nodejs/node/pull/18308","diff_url":"https://github.com/nodejs/node/pull/18308.diff","patch_url":"https://github.com/nodejs/node/pull/18308.patch"},"body":"Since type check errors on paths are throw synchronously, it makes more sense to throw other types of checks on the paths synchronously as well.\r\n\r\nfs: throw errors on invalid paths synchronously\r\n\r\n- Throw getPathFromURL() and nullCheck() errors synchronously instead\r\n  of deferring them to the next tick, since we already throw\r\n  validatePath() errors synchronously.\r\n- Merge nullCheck() into validatePath()\r\n- Never throws in `fs.exists()`, instead, invoke the callback with\r\n  false, or emit a warning when the callback is not a function.\r\n  This is to bring it inline with fs.existsSync(), which never throws.\r\n- Updates the comment of rethrow()\r\n- Throw ERR_INVALID_ARG_VALUE for null checks\r\n\r\n<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests and possibly benchmarks.\r\n\r\nContributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md\r\n-->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [x] tests and/or benchmarks are included\r\n- [x] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#commit-message-guidelines)\r\n\r\n##### Affected core subsystem(s)\r\n<!-- Provide affected core subsystem(s) (like doc, cluster, crypto, etc). -->\r\nfs, whatwg-url"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/363733413","html_url":"https://github.com/nodejs/node/pull/18308#issuecomment-363733413","issue_url":"https://api.github.com/repos/nodejs/node/issues/18308","id":363733413,"user":{"login":"joyeecheung","id":4299420,"avatar_url":"https://avatars0.githubusercontent.com/u/4299420?v=4","gravatar_id":"","url":"https://api.github.com/users/joyeecheung","html_url":"https://github.com/joyeecheung","followers_url":"https://api.github.com/users/joyeecheung/followers","following_url":"https://api.github.com/users/joyeecheung/following{/other_user}","gists_url":"https://api.github.com/users/joyeecheung/gists{/gist_id}","starred_url":"https://api.github.com/users/joyeecheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyeecheung/subscriptions","organizations_url":"https://api.github.com/users/joyeecheung/orgs","repos_url":"https://api.github.com/users/joyeecheung/repos","events_url":"https://api.github.com/users/joyeecheung/events{/privacy}","received_events_url":"https://api.github.com/users/joyeecheung/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T10:57:54Z","updated_at":"2018-02-07T10:57:54Z","author_association":"CONTRIBUTOR","body":"CI before landing: https://ci.nodejs.org/job/node-test-pull-request/13003/"}}
{"actor":{"display_login":"joyeecheung"}}