{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/18593","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/18593/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/18593/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/18593/events","html_url":"https://github.com/nodejs/node/pull/18593","id":294642703,"number":18593,"title":"module: use undefined if no main","user":{"login":"Trott","id":718899,"avatar_url":"https://avatars2.githubusercontent.com/u/718899?v=4","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},"labels":[{"id":155267502,"url":"https://api.github.com/repos/nodejs/node/labels/C++","name":"C++","color":"e11d21","default":false},{"id":155435785,"url":"https://api.github.com/repos/nodejs/node/labels/fs","name":"fs","color":"0052cc","default":false},{"id":155435814,"url":"https://api.github.com/repos/nodejs/node/labels/module","name":"module","color":"fbca04","default":false},{"id":169485514,"url":"https://api.github.com/repos/nodejs/node/labels/semver-major","name":"semver-major","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-02-06T06:07:28Z","updated_at":"2018-02-09T21:27:21Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/18593","html_url":"https://github.com/nodejs/node/pull/18593","diff_url":"https://github.com/nodejs/node/pull/18593.diff","patch_url":"https://github.com/nodejs/node/pull/18593.patch"},"body":"If the package.json file does not have a \"main\" entry, return undefined\r\nrather than an empty string. This is to make more consistent behavior.\r\nFor example, when package.json is a directory, \"main\" is undefined\r\nrather than an empty string.\r\n\r\n@bmeck @bnoordhuis Is this an acceptable resolution of the \"package.json as a directory leaves `main` undefined if we land https://github.com/nodejs/node/pull/18270, but package.json as a file without a `main` sets `main` to an empty string\" disagreement? Opening a PR because I figure it would be easier to determine \"yes\" or \"no\" with an actual proposal to look at. I *believe* @bmeck would prefer the empty string for both scenarios, but I also believe that `undefined` is acceptable to them too as long as it applies to both scenarios. But I could be wrong...\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] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.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\nmodule"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/364573000","html_url":"https://github.com/nodejs/node/pull/18593#issuecomment-364573000","issue_url":"https://api.github.com/repos/nodejs/node/issues/18593","id":364573000,"user":{"login":"Trott","id":718899,"avatar_url":"https://avatars2.githubusercontent.com/u/718899?v=4","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},"created_at":"2018-02-09T21:27:21Z","updated_at":"2018-02-09T21:27:21Z","author_association":"OWNER","body":"Still needs one more @nodejs/tsc approval."}}
{"actor":{"display_login":"Trott"}}