{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/comments/239046871","pull_request_review_id":181732721,"id":239046871,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTA0Njg3MQ==","diff_hunk":"@@ -157,37 +153,132 @@ The resolver has the following properties:\n \n ### Resolver Algorithm\n \n-The algorithm to resolve an ES module specifier is provided through\n-_ESM_RESOLVE_:\n+The algorithm to load an ES module specifier is given through the\n+**ESM_RESOLVE** method below. It returns the resolved URL for a \n+module specifier relative to a parentURL, in addition to the unique module\n+format for that resolved URL given by the **ESM_FORMAT** routine.\n+\n+In the following algorithms, all subroutine errors are propogated as errors\n+of these top-level routines.\n \n-**ESM_RESOLVE**(_specifier_, _parentURL_)\n-> 1. Let _resolvedURL_ be _undefined_.\n-> 1. If _specifier_ is a valid URL then,\n+#### ESM_RESOLVE(_specifier_, _parentURL_)\n+> 1. Let _resolvedURL_ be *undefined*.\n+> 1. If _specifier_ is a valid URL, then\n >    1. Set _resolvedURL_ to the result of parsing and reserializing\n >       _specifier_ as a URL.\n-> 1. Otherwise, if _specifier_ starts with _\"/\"_, _\"./\"_ or _\"../\"_ then,\n+> 1. Otherwise, if _specifier_ starts with _\"/\"_, then\n+>    1. Throw an _Invalid Specifier_ error.\n+> 1. Otherwise, if _specifier_ starts with _\"./\"_ or _\"../\"_, then\n >    1. Set _resolvedURL_ to the URL resolution of _specifier_ relative to\n >       _parentURL_.\n > 1. Otherwise,\n >    1. Note: _specifier_ is now a bare specifier.\n >    1. Set _resolvedURL_ the result of\n >       **PACKAGE_RESOLVE**(_specifier_, _parentURL_).\n-> 1. If the file at _resolvedURL_ does not exist then,\n+> 1. If the file at _resolvedURL_ does not exist, then\n >    1. Throw a _Module Not Found_ error.\n-> 1. Return _resolvedURL_.\n-\n-**PACKAGE_RESOLVE**(_packageSpecifier_, _parentURL_)\n-> 1. Assert: _packageSpecifier_ is a bare specifier.\n-> 1. If _packageSpecifier_ is a Node.js builtin module then,\n+> 1. Let _format_ be the result of **ESM_FORMAT**(_url_).\n+> 1. Return _{ resolvedURL, format }_.\n+\n+PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_)\n+> 1. Let _packageName_ be *undefined*.\n+> 1. Let _packagePath_ be *undefined*.\n+> 1. If _packageSpecifier_ does not start with _\"@\"_, then","path":"doc/api/esm.md","position":57,"original_position":57,"commit_id":"b2654360f9e81eff96f9e1e3ba3a712586b6168c","original_commit_id":"b2654360f9e81eff96f9e1e3ba3a712586b6168c","user":{"login":"SMotaal","id":849613,"node_id":"MDQ6VXNlcjg0OTYxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/849613?v=4","gravatar_id":"","url":"https://api.github.com/users/SMotaal","html_url":"https://github.com/SMotaal","followers_url":"https://api.github.com/users/SMotaal/followers","following_url":"https://api.github.com/users/SMotaal/following{/other_user}","gists_url":"https://api.github.com/users/SMotaal/gists{/gist_id}","starred_url":"https://api.github.com/users/SMotaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SMotaal/subscriptions","organizations_url":"https://api.github.com/users/SMotaal/orgs","repos_url":"https://api.github.com/users/SMotaal/repos","events_url":"https://api.github.com/users/SMotaal/events{/privacy}","received_events_url":"https://api.github.com/users/SMotaal/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n> 1. If _packageSpecifier_ is an empty string, then\r\n>    1. Throw an _Invalid Package Name_ error.\r\n> 1. Otherwise, if _packageSpecifier_ starts with _\"@\"_, then\r\n>    1. If _packageSpecifier_ does not contain a _\"/\"_ separator, then\r\n>       1. Throw an _Invalid Package Name_ error.\r\n>    1. Set _packageName_ to the substring of _packageSpecifier_\r\n>       until the second _\"/\"_ separator or the end of the string.\r\n> 1. Otherwise, then\r\n>    1. Note: _packageSpecifier_ does not start with _\"@\"\r\n>    1. Set _packageName_ to the substring of _packageSpecifier_ until the\r\n>       first _\"/\"_ separator or the end of the string.\r\n```\r\n\r\nSorry, can't seem to get multiple lines selected (using beta UI).\r\n\r\nI am actually going through a quick implementation of the algorithm.","created_at":"2018-12-05T12:34:24Z","updated_at":"2018-12-05T12:34:24Z","html_url":"https://github.com/nodejs/ecmascript-modules/pull/19#discussion_r239046871","pull_request_url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/comments/239046871"},"html":{"href":"https://github.com/nodejs/ecmascript-modules/pull/19#discussion_r239046871"},"pull_request":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19","id":235982396,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1OTgyMzk2","html_url":"https://github.com/nodejs/ecmascript-modules/pull/19","diff_url":"https://github.com/nodejs/ecmascript-modules/pull/19.diff","patch_url":"https://github.com/nodejs/ecmascript-modules/pull/19.patch","issue_url":"https://api.github.com/repos/nodejs/ecmascript-modules/issues/19","number":19,"state":"open","locked":false,"title":"Specify import file specifier resolution proposal","user":{"login":"guybedford","id":598730,"node_id":"MDQ6VXNlcjU5ODczMA==","avatar_url":"https://avatars1.githubusercontent.com/u/598730?v=4","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"body":"This PR provides a specification for the [node-import-file-specifier-resolution-proposal](https://github.com/GeoffreyBooth/node-import-file-specifier-resolution-proposal).\r\n\r\nFurther to last meeting where some of the properties of this proposal were discussed, hopefully this can allow for a more concrete discussion about the interactions at work.\r\n\r\nI think what would help is perhaps using this spec to try to understand some concrete use cases, and then fleshing out those discussions further.\r\n\r\nThis PR does not yet implement ES modules mains or subpaths as this is currently delegated to the [package exports proposal](https://github.com/jkrems/proposal-pkg-exports/).\r\n\r\nHopefully we can continue to discuss that proposal too in order to work towards a refinement of a complete specification here.","created_at":"2018-12-04T22:29:42Z","updated_at":"2018-12-05T12:34:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"971c0358d068302b24b0dc5d242fd5c7093e55bc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1077467706,"node_id":"MDU6TGFiZWwxMDc3NDY3NzA2","url":"https://api.github.com/repos/nodejs/ecmascript-modules/labels/modules-agenda","name":"modules-agenda","color":"6cc24a","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19/commits","review_comments_url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19/comments","review_comment_url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/ecmascript-modules/issues/19/comments","statuses_url":"https://api.github.com/repos/nodejs/ecmascript-modules/statuses/b2654360f9e81eff96f9e1e3ba3a712586b6168c","head":{"label":"guybedford:irp","ref":"irp","sha":"b2654360f9e81eff96f9e1e3ba3a712586b6168c","user":{"login":"guybedford","id":598730,"node_id":"MDQ6VXNlcjU5ODczMA==","avatar_url":"https://avatars1.githubusercontent.com/u/598730?v=4","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"repo":{"id":146468401,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY0Njg0MDE=","name":"ecmascript-modules","full_name":"guybedford/ecmascript-modules","private":false,"owner":{"login":"guybedford","id":598730,"node_id":"MDQ6VXNlcjU5ODczMA==","avatar_url":"https://avatars1.githubusercontent.com/u/598730?v=4","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"html_url":"https://github.com/guybedford/ecmascript-modules","description":"A fork of Node.js to hash out ideas related to ESModules","fork":true,"url":"https://api.github.com/repos/guybedford/ecmascript-modules","forks_url":"https://api.github.com/repos/guybedford/ecmascript-modules/forks","keys_url":"https://api.github.com/repos/guybedford/ecmascript-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guybedford/ecmascript-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guybedford/ecmascript-modules/teams","hooks_url":"https://api.github.com/repos/guybedford/ecmascript-modules/hooks","issue_events_url":"https://api.github.com/repos/guybedford/ecmascript-modules/issues/events{/number}","events_url":"https://api.github.com/repos/guybedford/ecmascript-modules/events","assignees_url":"https://api.github.com/repos/guybedford/ecmascript-modules/assignees{/user}","branches_url":"https://api.github.com/repos/guybedford/ecmascript-modules/branches{/branch}","tags_url":"https://api.github.com/repos/guybedford/ecmascript-modules/tags","blobs_url":"https://api.github.com/repos/guybedford/ecmascript-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guybedford/ecmascript-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guybedford/ecmascript-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/guybedford/ecmascript-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guybedford/ecmascript-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/guybedford/ecmascript-modules/languages","stargazers_url":"https://api.github.com/repos/guybedford/ecmascript-modules/stargazers","contributors_url":"https://api.github.com/repos/guybedford/ecmascript-modules/contributors","subscribers_url":"https://api.github.com/repos/guybedford/ecmascript-modules/subscribers","subscription_url":"https://api.github.com/repos/guybedford/ecmascript-modules/subscription","commits_url":"https://api.github.com/repos/guybedford/ecmascript-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/guybedford/ecmascript-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/guybedford/ecmascript-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/guybedford/ecmascript-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/guybedford/ecmascript-modules/contents/{+path}","compare_url":"https://api.github.com/repos/guybedford/ecmascript-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guybedford/ecmascript-modules/merges","archive_url":"https://api.github.com/repos/guybedford/ecmascript-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guybedford/ecmascript-modules/downloads","issues_url":"https://api.github.com/repos/guybedford/ecmascript-modules/issues{/number}","pulls_url":"https://api.github.com/repos/guybedford/ecmascript-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/guybedford/ecmascript-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/guybedford/ecmascript-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guybedford/ecmascript-modules/labels{/name}","releases_url":"https://api.github.com/repos/guybedford/ecmascript-modules/releases{/id}","deployments_url":"https://api.github.com/repos/guybedford/ecmascript-modules/deployments","created_at":"2018-08-28T15:29:04Z","updated_at":"2018-08-28T15:29:15Z","pushed_at":"2018-12-05T03:21:34Z","git_url":"git://github.com/guybedford/ecmascript-modules.git","ssh_url":"git@github.com:guybedford/ecmascript-modules.git","clone_url":"https://github.com/guybedford/ecmascript-modules.git","svn_url":"https://github.com/guybedford/ecmascript-modules","homepage":null,"size":346313,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:modules-lkgr","ref":"modules-lkgr","sha":"7bf886a2e656557f2e60984ecfdab9a4c49d6b3f","user":{"login":"nodejs","id":9950313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTAzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","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":145752541,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU3NTI1NDE=","name":"ecmascript-modules","full_name":"nodejs/ecmascript-modules","private":false,"owner":{"login":"nodejs","id":9950313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTAzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","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},"html_url":"https://github.com/nodejs/ecmascript-modules","description":"A fork of Node.js to hash out ideas related to ESModules","fork":false,"url":"https://api.github.com/repos/nodejs/ecmascript-modules","forks_url":"https://api.github.com/repos/nodejs/ecmascript-modules/forks","keys_url":"https://api.github.com/repos/nodejs/ecmascript-modules/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/ecmascript-modules/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/ecmascript-modules/teams","hooks_url":"https://api.github.com/repos/nodejs/ecmascript-modules/hooks","issue_events_url":"https://api.github.com/repos/nodejs/ecmascript-modules/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/ecmascript-modules/events","assignees_url":"https://api.github.com/repos/nodejs/ecmascript-modules/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/ecmascript-modules/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/ecmascript-modules/tags","blobs_url":"https://api.github.com/repos/nodejs/ecmascript-modules/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/ecmascript-modules/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/ecmascript-modules/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/ecmascript-modules/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/ecmascript-modules/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/ecmascript-modules/languages","stargazers_url":"https://api.github.com/repos/nodejs/ecmascript-modules/stargazers","contributors_url":"https://api.github.com/repos/nodejs/ecmascript-modules/contributors","subscribers_url":"https://api.github.com/repos/nodejs/ecmascript-modules/subscribers","subscription_url":"https://api.github.com/repos/nodejs/ecmascript-modules/subscription","commits_url":"https://api.github.com/repos/nodejs/ecmascript-modules/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/ecmascript-modules/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/ecmascript-modules/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/ecmascript-modules/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/ecmascript-modules/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/ecmascript-modules/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/ecmascript-modules/merges","archive_url":"https://api.github.com/repos/nodejs/ecmascript-modules/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/ecmascript-modules/downloads","issues_url":"https://api.github.com/repos/nodejs/ecmascript-modules/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/ecmascript-modules/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/ecmascript-modules/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/ecmascript-modules/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/ecmascript-modules/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/ecmascript-modules/deployments","created_at":"2018-08-22T19:18:29Z","updated_at":"2018-12-05T03:16:43Z","pushed_at":"2018-12-05T04:15:09Z","git_url":"git://github.com/nodejs/ecmascript-modules.git","ssh_url":"git@github.com:nodejs/ecmascript-modules.git","clone_url":"https://github.com/nodejs/ecmascript-modules.git","svn_url":"https://github.com/nodejs/ecmascript-modules","homepage":null,"size":346320,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":3,"watchers":23,"default_branch":"modules-lkgr"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19"},"html":{"href":"https://github.com/nodejs/ecmascript-modules/pull/19"},"issue":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/issues/19"},"comments":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/ecmascript-modules/statuses/b2654360f9e81eff96f9e1e3ba3a712586b6168c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"SMotaal"}}