Skip to content

Commit

Permalink
doc: fix RESOLVE_ESM_MATCH in modules.md
Browse files Browse the repository at this point in the history
Return type of PACKAGE_EXPORTS_RESOLVE was changed when subpath folder
mappings reached EOL. But RESOLVE_ESM_MATCH was not updated.

Refs: #40121
PR-URL: #45280
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
sapphi-red authored and danielleadams committed Jan 4, 2023
1 parent 04bae26 commit 3f16f3c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,10 @@ LOAD_PACKAGE_SELF(X, DIR)
6. RESOLVE_ESM_MATCH(MATCH)

RESOLVE_ESM_MATCH(MATCH)
1. let { RESOLVED, EXACT } = MATCH
2. let RESOLVED_PATH = fileURLToPath(RESOLVED)
3. If EXACT is true,
a. If the file at RESOLVED_PATH exists, load RESOLVED_PATH as its extension
format. STOP
4. Otherwise, if EXACT is false,
a. LOAD_AS_FILE(RESOLVED_PATH)
b. LOAD_AS_DIRECTORY(RESOLVED_PATH)
5. THROW "not found"
1. let RESOLVED_PATH = fileURLToPath(MATCH)
2. If the file at RESOLVED_PATH exists, load RESOLVED_PATH as its extension
format. STOP
3. THROW "not found"
</pre>

## Caching
Expand Down

0 comments on commit 3f16f3c

Please sign in to comment.