diff options
author | Derek Lewis <DerekNonGeneric@inf.is> | 2020-08-03 00:27:51 +0300 |
---|---|---|
committer | Node.js GitHub Bot <github-bot@iojs.org> | 2020-08-15 05:22:13 +0300 |
commit | 0347574834ab1a0714c2c97bf6bb07592556abd8 (patch) | |
tree | e29e1a297ef852f88da312e286e84fcb068d71d2 /doc/api/esm.md | |
parent | 5f78dea1a42eba373df57beac18a252aad74df65 (diff) |
module: fix check for package.json at volume root
This patch converts the "read package scope" algorithm's while loop
into a do-while loop enabling items at the filesystem root dir to
be considered within the scope of a sibling package.json also at the
filesystem root dir.
Fixes: https://github.com/nodejs/node/issues/33438
Co-authored-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/34595
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Diffstat (limited to 'doc/api/esm.md')
-rw-r--r-- | doc/api/esm.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/esm.md b/doc/api/esm.md index 8a675182ba7..12aed8ff772 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -1864,11 +1864,11 @@ _conditions_) > 1. Let _scopeURL_ be _url_. > 1. While _scopeURL_ is not the file system root, +> 1. Set _scopeURL_ to the parent URL of _scopeURL_. > 1. If _scopeURL_ ends in a _"node_modules"_ path segment, return **null**. > 1. Let _pjson_ be the result of **READ_PACKAGE_JSON**(_scopeURL_). > 1. If _pjson_ is not **null**, then > 1. Return _pjson_. -> 1. Set _scopeURL_ to the parent URL of _scopeURL_. > 1. Return **null**. **READ_PACKAGE_JSON**(_packageURL_) |