Skip to content

Commit

Permalink
doc: fix some errors in esm resolution algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Nov 24, 2023
1 parent cf45a62 commit ede44b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ The resolver can throw the following errors:
> 2. If _resolved_ is not **null** or **undefined**, return _resolved_.
> 3. Otherwise, if _exports_ is an Object and all keys of _exports_ start with
> _"."_, then
> 1. Let _matchKey_ be the string _"./"_ concatenated with _subpath_.
> 1. Let _matchKey_ be _subpath_ (by this point, it should be prefixed with _"./"_).
> 2. Let _resolved_ be the result of **PACKAGE\_IMPORTS\_EXPORTS\_RESOLVE**(
> _matchKey_, _exports_, _packageURL_, **false**, _conditions_).
> 3. If _resolved_ is not **null** or **undefined**, return _resolved_.
Expand Down Expand Up @@ -1019,7 +1019,7 @@ _isImports_, _conditions_)
> Package Target_ error.
> 3. Let _resolvedTarget_ be the URL resolution of the concatenation of
> _packageURL_ and _target_.
> 4. Assert: _resolvedTarget_ is contained in _packageURL_.
> 4. Assert: _packageURL_ is contained in _resolvedTarget_.
> 5. If _patternMatch_ is **null**, then
> 1. Return _resolvedTarget_.
> 6. If _patternMatch_ split on _"/"_ or _"\\"_ contains any _""_, _"."_,
Expand Down

0 comments on commit ede44b8

Please sign in to comment.