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(core): fix lock file pruning optional dependencies #13830

Merged

Conversation

skrtheboss
Copy link
Contributor

Current Behavior

Optional dependencies are omitted from the pruned .lock file.

Expected Behavior

Optional dependencies should be included in the .lock file

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Dec 14, 2022

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

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Dec 15, 2022 at 8:35AM (UTC)

@skrtheboss
Copy link
Contributor Author

@meeroslav as far as I understood, you have implemented this functionality, so may I ask you to have a look at this?
Thank you.

Copy link
Contributor

@meeroslav meeroslav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. Please add test for npm V1 or V2 to ensure all three variants of npm lock file are working (v2 is backward compatible and contains both V1 and V3 formats).

The rest looks good to me!

packages/nx/src/lock-file/npm.spec.ts Show resolved Hide resolved
@meeroslav meeroslav added the scope: core core nx functionality label Dec 14, 2022
@skrtheboss
Copy link
Contributor Author

Hi @meeroslav, i have added the missing lock file tests:

  • npm v1 and v3
  • yarn berry

Let me know if i should add/change something else

@skrtheboss skrtheboss force-pushed the fix/lock-file-prining-optional-dependencies branch from 002fe77 to 092c0c0 Compare December 15, 2022 08:28
@meeroslav
Copy link
Contributor

Amazing work, @skrtheboss, thank you!

@meeroslav meeroslav merged commit a2adf50 into nrwl:master Dec 15, 2022
@skrtheboss skrtheboss deleted the fix/lock-file-prining-optional-dependencies branch December 15, 2022 10:03
FrozenPandaz pushed a commit that referenced this pull request Dec 19, 2022
@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 Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: core core nx functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants