From 1b76377bcec8b4b6bdbad27acde54dc46ddf7fe2 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Wed, 13 May 2020 20:37:22 -0700 Subject: [PATCH] doc: correct CommonJS self-resolve spec PR-URL: https://github.com/nodejs/node/pull/33391 Reviewed-By: James M Snell Reviewed-By: Geoffrey Booth --- doc/api/modules.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index db1f56d901a928..a72646ae9f2cec 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -208,9 +208,9 @@ LOAD_SELF_REFERENCE(X, START) 1. Find the closest package scope to START. 2. If no scope was found, 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". -5. Otherwise, load the remainder of X relative to this package as if it - was loaded via `LOAD_NODE_MODULES` with a name in `package.json`. +4. If the name in `package.json` is a prefix of X, then + a. Load the remainder of X relative to this package as if it was + loaded via `LOAD_NODE_MODULES` with a name in `package.json`. LOAD_PACKAGE_EXPORTS(DIR, X) 1. Try to interpret X as a combination of name and subpath where the name