Skip to content

fix: honor ignore-extension in completion Arborist loads - #10162

Closed
priyankn wants to merge 1 commit into
npm:latestfrom
priyankn:fix/installed-deep-ignore-extension
Closed

priyankn wants to merge 1 commit into
npm:latestfrom
priyankn:fix/installed-deep-ignore-extension

Conversation

@priyankn

Copy link
Copy Markdown

Summary

Tab-completion for ls, explain, fund, rebuild, and update calls installedDeep(), which built Arborist without npm.flatOptions. loadActual() then imported a project-root .npm-extension even when ignore-scripts / ignore-extension was set.

This spreads ...npm.flatOptions into both Arborist constructors (same as ls exec) and forces ignoreExtension: true because completion is read-only name inventory.

Tests

node . test test/lib/utils/installed-deep.js

  • 5/5 subtests passed, including does not execute .npm-extension during completion inventory
  • lib/utils/installed-deep.js coverage 100%
  • Full-repo coverage threshold fails when running this file alone (expected; global 100% gate)

Notes

  • Reproduces on npm 12.2.1: installedDeep() with ignoreExtension: true in flatOptions still executed .npm-extension.mjs before this change.
  • After this change the same probe does not run.

Tab-completion for ls/explain/fund/rebuild/update used installedDeep()
without spreading npm.flatOptions, so loadActual() imported
.npm-extension even when ignore-scripts/ignore-extension was set.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@priyankn
priyankn requested a review from a team as a code owner October 23, 2026 20:42
@priyankn

priyankn commented Oct 23, 2026 •

Copy link
Copy Markdown
Author

Closing this PR

@priyankn priyankn closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant