GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(arborist): ignore hidden entries in global update by Grynn · Pull Request #9299 · npm/cli

Conversation

@Grynn

@Grynn Grynn commented May 3, 2026

Copy link
Copy Markdown
Contributor

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 -g
node . run eslint -- workspaces/arborist/lib/arborist/build-ideal-tree.js workspaces/arborist/test/arborist/build-ideal-tree.js

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Grynn
fix(arborist): ignore hidden entries in global update
e35e023
@Grynn
Grynn requested a review from a team as a code owner May 3, 2026 06:41
@owlstronaut owlstronaut added the backport:v11 label May 4, 2026
owlstronaut
owlstronaut approved these changes May 4, 2026
View reviewed changes
@owlstronaut
owlstronaut merged commit 32940e2 into npm:latest May 4, 2026
18 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 4, 2026
fix(arborist): ignore hidden entries in global update #9303
Merged
@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

🎉 Backport to release/v11 created: #9303

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

owlstronaut pushed a commit that referenced this pull request May 4, 2026
@Grynn Michael Smith
fix(arborist): ignore hidden entries in global update (#9299)
3298369
## 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)
This was referenced May 4, 2026
chore: release 12.0.0-pre.0.0 #9229
Merged
chore: release 11.14.0 #9273
Merged
@github-actions github-actions Bot mentioned this pull request May 27, 2026
chore: release 12.0.0-pre.1 #9387
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@owlstronaut owlstronaut owlstronaut approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

backport:v11

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

npm up -g fails on hidden directories in global node_modules

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Grynn @owlstronaut
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.