Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 085eb48

Browse filesBrowse files
guybedfordtargos
authored andcommitted
doc: fixup esm resolver spec formatting
PR-URL: #28885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 5533d48 commit 085eb48
Copy full SHA for 085eb48

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/esm.md‎

Copy file name to clipboardExpand all lines: doc/api/esm.md
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ _isMain_ is **true** when resolving the Node.js application entry point.
667667
<details>
668668
<summary>Resolver algorithm specification</summary>
669669
670-
**ESM_RESOLVE(_specifier_, _parentURL_, _isMain_)**
670+
**ESM_RESOLVE**(_specifier_, _parentURL_, _isMain_)
671671
> 1. Let _resolvedURL_ be **undefined**.
672672
> 1. If _specifier_ is a valid URL, then
673673
> 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.
687687
> 1. Let _format_ be the result of **ESM_FORMAT**(_resolvedURL_, _isMain_).
688688
> 1. Load _resolvedURL_ as module format, _format_.
689689
690-
PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_)
690+
**PACKAGE_RESOLVE**(_packageSpecifier_, _parentURL_)
691691
> 1. Let _packageName_ be *undefined*.
692692
> 1. Let _packageSubpath_ be *undefined*.
693693
> 1. If _packageSpecifier_ is an empty string, then
@@ -726,7 +726,7 @@ PACKAGE_RESOLVE(_packageSpecifier_, _parentURL_)
726726
> 1. Return the URL resolution of _packageSubpath_ in _packageURL_.
727727
> 1. Throw a _Module Not Found_ error.
728728
729-
PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_)
729+
**PACKAGE_MAIN_RESOLVE**(_packageURL_, _pjson_)
730730
> 1. If _pjson_ is **null**, then
731731
> 1. Throw a _Module Not Found_ error.
732732
> 1. If _pjson.main_ is a String, then
@@ -743,7 +743,7 @@ PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_)
743743
> 1. Throw an _Unsupported File Extension_ error.
744744
> 1. Return _legacyMainURL_.
745745
746-
**ESM_FORMAT(_url_, _isMain_)**
746+
**ESM_FORMAT**(_url_, _isMain_)
747747
> 1. Assert: _url_ corresponds to an existing file.
748748
> 1. Let _pjson_ be the result of **READ_PACKAGE_SCOPE**(_url_).
749749
> 1. If _url_ ends in _".mjs"_, then
@@ -760,7 +760,7 @@ PACKAGE_MAIN_RESOLVE(_packageURL_, _pjson_)
760760
> 1. Return _"commonjs"_.
761761
> 1. Throw an _Unsupported File Extension_ error.
762762
763-
READ_PACKAGE_SCOPE(_url_)
763+
**READ_PACKAGE_SCOPE**(_url_)
764764
> 1. Let _scopeURL_ be _url_.
765765
> 1. While _scopeURL_ is not the file system root,
766766
> 1. Let _pjson_ be the result of **READ_PACKAGE_JSON**(_scopeURL_).
@@ -769,7 +769,7 @@ READ_PACKAGE_SCOPE(_url_)
769769
> 1. Set _scopeURL_ to the parent URL of _scopeURL_.
770770
> 1. Return **null**.
771771
772-
READ_PACKAGE_JSON(_packageURL_)
772+
**READ_PACKAGE_JSON**(_packageURL_)
773773
> 1. Let _pjsonURL_ be the resolution of _"package.json"_ within _packageURL_.
774774
> 1. If the file at _pjsonURL_ does not exist, then
775775
> 1. Return **null**.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.