doc: correct CommonJS self-resolve spec

PR-URL: https://github.com/nodejs/node/pull/33391
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
pull/33449/head
Guy Bedford 2020-05-13 20:37:22 -07:00 committed by Geoffrey Booth
parent e14786f69f
commit e88d098e50
1 changed files with 3 additions and 3 deletions

View File

@ -208,9 +208,9 @@ LOAD_SELF_REFERENCE(X, START)
1. Find the closest package scope to START. 1. Find the closest package scope to START.
2. If no scope was found, return. 2. If no scope was found, return.
3. If the `package.json` has no "exports", return. 3. If the `package.json` has no "exports", return.
4. If the name in `package.json` isn't a prefix of X, throw "not found". 4. If the name in `package.json` is a prefix of X, then
5. Otherwise, load the remainder of X relative to this package as if it a. Load the remainder of X relative to this package as if it was
was loaded via `LOAD_NODE_MODULES` with a name in `package.json`. loaded via `LOAD_NODE_MODULES` with a name in `package.json`.
LOAD_PACKAGE_EXPORTS(DIR, X) LOAD_PACKAGE_EXPORTS(DIR, X)
1. Try to interpret X as a combination of name and subpath where the name 1. Try to interpret X as a combination of name and subpath where the name