| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
🎉 Backport to release/v11 created: #9303 |
Sorry, something went wrong.
## Description Fixes #9298. `buildIdealTree` handles global updates by reading the global `node_modules` folder directly and adding each entry as a synthetic top-level dependency. That path did not ignore hidden entries, so a directory like `.hidden-non-package` was converted to `.hidden-non-package@*` and rejected by `npm-package-arg`. This applies the same hidden-entry filter already used by `loadActual`, so hidden directories and retired scoped package folders are not treated as installed global packages during `npm up -g`. ## Testing ```sh node node_modules/tap/bin/run.js workspaces/arborist/test/arborist/build-ideal-tree.js -g "update global ignores hidden" ``` ```sh npm_config_prefix=/tmp/npm-hidden-global-patched.azXmRd node . up -g ``` ```sh node . run eslint -- workspaces/arborist/lib/arborist/build-ideal-tree.js workspaces/arborist/test/arborist/build-ideal-tree.js ``` (cherry picked from commit 32940e2)
| Back | FazBrowse Home | New Git URL |
Description
Fixes #9298.
buildIdealTree handles global updates by reading the global node_modules folder directly and adding each entry as a synthetic top-level dependency. That path did not ignore hidden entries, so a directory like .hidden-non-package was converted to .hidden-non-package@* and rejected by npm-package-arg.
This applies the same hidden-entry filter already used by loadActual, so hidden directories and retired scoped package folders are not treated as installed global packages during npm up -g.
Testing
node node_modules/tap/bin/run.js workspaces/arborist/test/arborist/build-ideal-tree.js -g "update global ignores hidden"npm_config_prefix=/tmp/npm-hidden-global-patched.azXmRd node . up -gnode . run eslint -- workspaces/arborist/lib/arborist/build-ideal-tree.js workspaces/arborist/test/arborist/build-ideal-tree.js