Skip to content

Commit 59f57d2

Browse files
authored
doc: fix some errors in esm resolution algorithms
PR-URL: #50898 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 2793e8b commit 59f57d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/esm.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,9 @@ The resolver can throw the following errors:
937937
> 2. If _resolved_ is not **null** or **undefined**, return _resolved_.
938938
> 3. Otherwise, if _exports_ is an Object and all keys of _exports_ start with
939939
> _"."_, then
940-
> 1. Let _matchKey_ be the string _"./"_ concatenated with _subpath_.
940+
> 1. Assert: _subpath_ begins with _"./"_.
941941
> 2. Let _resolved_ be the result of **PACKAGE\_IMPORTS\_EXPORTS\_RESOLVE**(
942-
> _matchKey_, _exports_, _packageURL_, **false**, _conditions_).
942+
> _subpath_, _exports_, _packageURL_, **false**, _conditions_).
943943
> 3. If _resolved_ is not **null** or **undefined**, return _resolved_.
944944
> 4. Throw a _Package Path Not Exported_ error.
945945
@@ -1019,7 +1019,7 @@ _isImports_, _conditions_)
10191019
> Package Target_ error.
10201020
> 3. Let _resolvedTarget_ be the URL resolution of the concatenation of
10211021
> _packageURL_ and _target_.
1022-
> 4. Assert: _resolvedTarget_ is contained in _packageURL_.
1022+
> 4. Assert: _packageURL_ is contained in _resolvedTarget_.
10231023
> 5. If _patternMatch_ is **null**, then
10241024
> 1. Return _resolvedTarget_.
10251025
> 6. If _patternMatch_ split on _"/"_ or _"\\"_ contains any _""_, _"."_,
@@ -1028,7 +1028,7 @@ _isImports_, _conditions_)
10281028
> 7. Return the URL resolution of _resolvedTarget_ with every instance of
10291029
> _"\*"_ replaced with _patternMatch_.
10301030
> 2. Otherwise, if _target_ is a non-null Object, then
1031-
> 1. If _exports_ contains any index property keys, as defined in ECMA-262
1031+
> 1. If _target_ contains any index property keys, as defined in ECMA-262
10321032
> [6.1.7 Array Index][], throw an _Invalid Package Configuration_ error.
10331033
> 2. For each property _p_ of _target_, in object insertion order as,
10341034
> 1. If _p_ equals _"default"_ or _conditions_ contains an entry for _p_,

0 commit comments

Comments
 (0)