Skip to content

Commit 93a087d

Browse files
committed
docs: module resolution pseudocode corrections
1 parent 579fc67 commit 93a087d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/esm.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ The resolver can throw the following errors:
876876
> 10. If _selfUrl_ is not **undefined**, return _selfUrl_.
877877
> 11. While _parentURL_ is not the file system root,
878878
> 1. Let _packageURL_ be the URL resolution of _"node\_modules/"_
879-
> concatenated with _packageSpecifier_, relative to _parentURL_.
879+
> concatenated with _packageName_, relative to _parentURL_.
880880
> 2. Set _parentURL_ to the parent folder URL of _parentURL_.
881881
> 3. If the folder at _packageURL_ does not exist, then
882882
> 1. Continue the next loop iteration.
@@ -947,7 +947,8 @@ The resolver can throw the following errors:
947947
**PACKAGE\_IMPORTS\_EXPORTS\_RESOLVE**(_matchKey_, _matchObj_, _packageURL_,
948948
_isImports_, _conditions_)
949949
950-
> 1. If _matchKey_ is a key of _matchObj_ and does not contain _"\*"_, then
950+
> 1. If _matchKey_ is a key of _matchObj_, does not contain _"\*"_, and does not
951+
> end with _"/"_ then
951952
> 1. Let _target_ be the value of _matchObj_\[_matchKey_].
952953
> 2. Return the result of **PACKAGE\_TARGET\_RESOLVE**(_packageURL_,
953954
> _target_, **null**, _isImports_, _conditions_).

0 commit comments

Comments
 (0)