Skip to content

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Aug 12, 2025

When using build targets with nested library dependencies (App -> lib1 -> lib2),
dependencies from the deepest libraries were not being included in the generated
package.json due to restrictive target input patterns.

This fix adds an isTransitiveDependency parameter to findAllNpmDeps function that
uses broader file patterns ({projectRoot}/**/*) when processing transitive
project dependencies instead of the restrictive build target patterns.

Fixes #30895

When using build targets with nested library dependencies (App -> lib1 -> lib2),
dependencies from the deepest libraries were not being included in the generated
package.json due to restrictive target input patterns.

This fix adds an isTransitiveDependency parameter to findAllNpmDeps function that
uses broader file patterns ({projectRoot}/**/*) when processing transitive
project dependencies instead of the restrictive build target patterns.
@Coly010 Coly010 requested a review from a team as a code owner August 12, 2025 11:56
@Coly010 Coly010 requested a review from FrozenPandaz August 12, 2025 11:56
@Coly010 Coly010 self-assigned this Aug 12, 2025
Copy link

vercel bot commented Aug 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Updated (UTC)
nx-dev Ready Preview Aug 12, 2025 0:09am
Copy link
Contributor

nx-cloud bot commented Aug 12, 2025

View your CI Pipeline Execution ↗ for commit 10cb939

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 2m 40s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 2m 23s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 7s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 6s View ↗
nx documentation ✅ Succeeded 13s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-12 12:44:47 UTC

@Coly010 Coly010 changed the title fix(js): include nested library dependencies in generated package.json Aug 12, 2025
@Coly010 Coly010 merged commit 85e1b9d into master Aug 12, 2025
7 of 8 checks passed
@Coly010 Coly010 deleted the fix/rspack-nested-lib-dependencies-30895 branch August 12, 2025 16:34
Copy link
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants