Skip to content

Commit d0f5bc1

Browse files
Alex Zherdevtargos
Alex Zherdev
authored andcommitted
doc: fix an error in resolution algorithm steps
As it is, if `X begins with './' or '/' or '../'` (step 3), it reads as if it were possible for the algorithm to do a node_modules lookup (step 4). But that doesn't seem to reflect the actual logic. PR-URL: #29940 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 66c6818 commit d0f5bc1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doc/api/modules.md

+1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ require(X) from module at path Y
159159
3. If X begins with './' or '/' or '../'
160160
a. LOAD_AS_FILE(Y + X)
161161
b. LOAD_AS_DIRECTORY(Y + X)
162+
c. THROW "not found"
162163
4. LOAD_NODE_MODULES(X, dirname(Y))
163164
5. THROW "not found"
164165

0 commit comments

Comments
 (0)