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

fix(js): workspace lib devDependencies should not be added to package.json #17802

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

ajwootto
Copy link
Contributor

Fix a regression where libraries with dependencies on other libraries in your Nx workspace would list those dependencies in the "dependencies" output of package.json, even when explicitly listed in "devDependencies"

Note: there should probably be a test for this, which I tried to write but couldn't figure out how to get the structure of the "dependencies" argument correct. All the existing tests just pass an empty array here.

Current Behavior

Nx incorrectly outputs library dependencies in "dependencies" section of package.json even when listed in the "devDependencies" explicitly

Expected Behavior

The packages should not be listed in "dependencies". This fixes a regression introduced by this PR:
#13968

Related Issue(s)

Fixes #17758

@ajwootto ajwootto requested a review from a team as a code owner June 26, 2023 18:47
@ajwootto ajwootto requested a review from jaysoo June 26, 2023 18:47
@vercel
Copy link

vercel bot commented Jun 26, 2023

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

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 16, 2023 2:37pm

@ndcunningham
Copy link
Contributor

Can you rebase this with master

@ajwootto
Copy link
Contributor Author

ajwootto commented Aug 4, 2023

@ndcunningham done

@jaysoo jaysoo merged commit 9ba98f4 into nrwl:master Sep 6, 2023
3 checks passed
FrozenPandaz pushed a commit that referenced this pull request Sep 7, 2023
@github-actions
Copy link

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 Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manually adding a devDependency to a package.json file no longer excludes it from dependencies
3 participants