Skip to content

Commit e304628

Browse files
sapphi-reddanielleadams
authored andcommitted
doc: fix RESOLVE_ESM_MATCH in modules.md
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 <guybedford@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3197b91 commit e304628

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

doc/api/modules.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,10 @@ LOAD_PACKAGE_SELF(X, DIR)
272272
6. RESOLVE_ESM_MATCH(MATCH)
273273

274274
RESOLVE_ESM_MATCH(MATCH)
275-
1. let { RESOLVED, EXACT } = MATCH
276-
2. let RESOLVED_PATH = fileURLToPath(RESOLVED)
277-
3. If EXACT is true,
278-
a. If the file at RESOLVED_PATH exists, load RESOLVED_PATH as its extension
279-
format. STOP
280-
4. Otherwise, if EXACT is false,
281-
a. LOAD_AS_FILE(RESOLVED_PATH)
282-
b. LOAD_AS_DIRECTORY(RESOLVED_PATH)
283-
5. THROW "not found"
275+
1. let RESOLVED_PATH = fileURLToPath(MATCH)
276+
2. If the file at RESOLVED_PATH exists, load RESOLVED_PATH as its extension
277+
format. STOP
278+
3. THROW "not found"
284279
</pre>
285280

286281
## Caching

0 commit comments

Comments
 (0)