diff options
| author | Guy Bedford <guybedford@gmail.com> | 2019-07-28 17:58:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-28 17:58:10 -0400 |
| commit | 1e0f7fd2a2770c956a49b399ffdcd198e2a3eef1 (patch) | |
| tree | 0ed71c4644fe4bfd4f2f3fd8aca21f8ec7d026e5 | |
| parent | 779a05d5d1bfe2eeb05386f6415d36f80ca0b3b5 (diff) | |
| download | node-new-guybedford-patch-1.tar.gz | |
doc: fixup esm resolver spec formattingguybedford-patch-1
| -rw-r--r-- | doc/api/esm.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/esm.md b/doc/api/esm.md index 14035cbf5c..9e1a0cb888 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -667,7 +667,7 @@ _isMain_ is **true** when resolving the Node.js application entry point. <details> <summary>Resolver algorithm specification</summary> -**ESM_RESOLVE(_specifier_, _parentURL_, _isMain_)** +**ESM_RESOLVE**(_specifier_, _parentURL_, _isMain_) > 1. Let _resolvedURL_ be **undefined**. > 1. If _specifier_ is a valid URL, then > 1. Set _resolvedURL_ to the result of parsing and reserializing @@ -687,7 +687,7 @@ _isMain_ is **true** when resolving the Node.js application entry point. > 1. Let _format_ be the result of **ESM_FORMAT**(_resolvedURL_, _isMain_). > 1. Load _resolvedURL_ as module format, _format_. -PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_) +**PACKAGE_RESOLVE**(_packageSpecifier_, _parentURL_) > 1. Let _packageName_ be *undefined*. > 1. Let _packageSubpath_ be *undefined*. > 1. If _packageSpecifier_ is an empty string, then @@ -726,7 +726,7 @@ PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_) > 1. Return the URL resolution of _packageSubpath_ in _packageURL_. > 1. Throw a _Module Not Found_ error. -PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_) +**PACKAGE_MAIN_RESOLVE**(_packageURL_, _pjson_) > 1. If _pjson_ is **null**, then > 1. Throw a _Module Not Found_ error. > 1. If _pjson.main_ is a String, then @@ -743,7 +743,7 @@ PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_) > 1. Throw an _Unsupported File Extension_ error. > 1. Return _legacyMainURL_. -**ESM_FORMAT(_url_, _isMain_)** +**ESM_FORMAT**(_url_, _isMain_) > 1. Assert: _url_ corresponds to an existing file. > 1. Let _pjson_ be the result of **READ_PACKAGE_SCOPE**(_url_). > 1. If _url_ ends in _".mjs"_, then @@ -760,7 +760,7 @@ PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_) > 1. Return _"commonjs"_. > 1. Throw an _Unsupported File Extension_ error. -READ_PACKAGE_SCOPE(_url_) +**READ_PACKAGE_SCOPE**(_url_) > 1. Let _scopeURL_ be _url_. > 1. While _scopeURL_ is not the file system root, > 1. Let _pjson_ be the result of **READ_PACKAGE_JSON**(_scopeURL_). @@ -769,7 +769,7 @@ READ_PACKAGE_SCOPE(_url_) > 1. Set _scopeURL_ to the parent URL of _scopeURL_. > 1. Return **null**. -READ_PACKAGE_JSON(_packageURL_) +**READ_PACKAGE_JSON**(_packageURL_) > 1. Let _pjsonURL_ be the resolution of _"package.json"_ within _packageURL_. > 1. If the file at _pjsonURL_ does not exist, then > 1. Return **null**. |
