Skip to content

fix(arborist): preserve nested dependency bundles - #10278

Open
ychampion wants to merge 1 commit into
npm:latestfrom
ychampion:fix/nested-root-bundles
Open

ychampion wants to merge 1 commit into
npm:latestfrom
ychampion:fix/nested-root-bundles

Conversation

@ychampion

Copy link
Copy Markdown
Contributor

Fixes #9289.

Installing aws-cdk-lib@2.251.0 from a root project's bundledDependencies fails with ENOENT because npm tries to extract packages already present in an inner bundle. Ignore the root's bundle declaration when checking dependency bundle ownership, so the inner bundles remain protected.

Add coverage for fresh, repeated and lockfile installs, scoped nested bundles, deduped dependencies and ordinary dependencies that still need installation. Update the two existing saved-bundle snapshots to retain the dependency's bundled contents.

Validation:

  • node . run test-all
  • The reported AWS CDK setup: fresh install, repeat install, npm ci, npm ls --all --json and npm pack --dry-run --json. Both nested semver and jsonschema copies remain present and usable.

Assisted by AI.

Signed-off-by: ychampion <68075205+ychampion@users.noreply.github.com>
@ychampion
ychampion requested a review from a team as a code owner November 11, 2026 15:00
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.

[BUG] Same package at multiple levels in bundleDependencies triggers NPM failures

1 participant