module: fix check for package.json at volume root · nodejs/node@740c958 · GitHub
Skip to content

Commit 740c958

Browse files
Derek Lewiscodebytere
authored andcommitted
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: #33438 Co-authored-by: Guy Bedford <guybedford@gmail.com> PR-URL: #34595 Backport-PR-URL: #35385 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me>
1 parent cecc193 commit 740c958

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

doc/api/esm.md

Lines changed: 1 addition & 1 deletion

lib/internal/modules/cjs/loader.js

Lines changed: 12 additions & 9 deletions

0 commit comments

Comments
 (0)