Skip to content

Commit

Permalink
doc: fix an error in resolution algorithm steps
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Alex Zherdev authored and targos committed Oct 31, 2019
1 parent 2505f67 commit dfb4a24
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ require(X) from module at path Y
3. If X begins with './' or '/' or '../'
a. LOAD_AS_FILE(Y + X)
b. LOAD_AS_DIRECTORY(Y + X)
c. THROW "not found"
4. LOAD_NODE_MODULES(X, dirname(Y))
5. LOAD_SELF_REFERENCE(X, dirname(Y))
6. THROW "not found"
Expand Down

0 comments on commit dfb4a24

Please sign in to comment.