Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collectDependencies marks some top-level deps as not top-level (angular builder) #17729

Closed
1 of 4 tasks
daiscog opened this issue Jun 22, 2023 · 2 comments · Fixed by #17730
Closed
1 of 4 tasks

collectDependencies marks some top-level deps as not top-level (angular builder) #17729

daiscog opened this issue Jun 22, 2023 · 2 comments · Fixed by #17730

Comments

@daiscog
Copy link
Contributor

daiscog commented Jun 22, 2023

Current Behavior

When automatically addiing peerDependencies to the built package.json files for publishable libs, some top-level dependencies can be missing if they are also dependencies of other dependencies.

Expected Behavior

All top-level dependencies are included in the peerDependencies section of the built package.json, even if they are also dependencies of other dependencies.

GitHub Repo

No response

Steps to Reproduce

With publishable Angular libs where:

`lib-a` imports from `lib-b` and also from npm package `@external/package`
`lib-b` imports from npm package `@external/package`

After running nx run lib-a:build, the dist package.json file for the lib does not contain @external/package in the peerDependencies, even though lib-a imports from it.

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 16.16.0
   OS     : darwin x64
   npm    : 8.11.0
   Hasher : Native
   
   nx                      : 16.3.2
   @nx/js                  : 16.3.2
   @nx/jest                : 16.3.2
   @nx/linter              : 16.3.2
   @nx/workspace           : 16.3.2
   @nrwl/angular           : 16.3.2
   @nx/cypress             : 16.3.2
   @nx/devkit              : 16.3.2
   @nrwl/eslint-plugin-nx  : 16.3.2
   @nrwl/tao               : 16.3.2
   @nx/webpack             : 16.3.2
   typescript              : 4.8.4
   ---------------------------------------
   Community plugins:
   @ng-bootstrap/ng-bootstrap       : 13.1.1
   @ngrx/effects                    : 14.3.3
   @ngrx/store                      : 14.3.3
   ---------------------------------------

Failure Logs

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Same as #14513 which fixed the issue in @nx/workspace (which is what the Angular package builder used back in nx 14) - however, it seems out the affected buggy code is duplicated in the @nx/js pacakge as well, and the Angular builder delegates to that package now.

Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

Copy link

github-actions bot commented Feb 4, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants