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

feat(core): add support for pnpm lockfile v9 #22906

Merged
merged 24 commits into from
May 27, 2024

Conversation

meeroslav
Copy link
Contributor

@meeroslav meeroslav commented Apr 19, 2024

  • Fix parenthesis separator detection
  • Fix leading dash detection
  • Migrate existing pnpm normalizer to latest code
  • Add unit tests for v9
  • Dogfooding Pnpm v9 to Nx repo and agents

Fixes regression with alias packages introduced via #23017

Benchmarks

PNPM v9 Branch (migrated to branch's code)

  Time (mean ± σ):      3.526 s ±  0.081 s    [User: 0.717 s, System: 0.948 s]
  Range (min … max):    3.390 s …  3.714 s    20 runs

Master (running nx 19.1.0-beta.3)

  Time (mean ± σ):     11.160 s ±  0.112 s    [User: 0.799 s, System: 0.979 s]
  Range (min … max):   10.955 s … 11.379 s    20 runs

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #22850
Fixes #23256

@meeroslav meeroslav self-assigned this Apr 19, 2024
@meeroslav meeroslav requested a review from a team as a code owner April 19, 2024 12:10
@meeroslav meeroslav requested a review from AgentEnder April 19, 2024 12:10
Copy link

vercel bot commented Apr 19, 2024

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

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview May 27, 2024 4:41pm

@mattfysh
Copy link

great work @meeroslav ! would it also be useful to raise an error if the lockfileVersion encountered is outside the expected range?

binary64 added a commit to binary64/blabber that referenced this pull request May 6, 2024
@meeroslav meeroslav marked this pull request as ready for review May 17, 2024 08:20
@meeroslav meeroslav requested a review from a team as a code owner May 17, 2024 08:20
result[key] = snapshot;
} else {
snapshot['dev'] = false; // all dependencies are prod
if (lockfileVersion < 9) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove this

@FrozenPandaz FrozenPandaz merged commit 8403f03 into nrwl:master May 27, 2024
4 of 6 checks passed
@meeroslav meeroslav deleted the bump-pnpm-to-9 branch May 27, 2024 20:17
@terrymun
Copy link

This is amazing news! That’s the last link in the chain needed for pnpm@9 support for Nx 🙌 thank you so much

ndcunningham pushed a commit that referenced this pull request May 28, 2024
- [X] Fix parenthesis separator detection
- [x] Fix leading dash detection
- [x] Migrate existing pnpm normalizer to latest code
- [X] Add unit tests for v9
- [X] Dogfooding Pnpm v9 to Nx repo and agents

Fixes regression with alias packages introduced via
#23017

## Benchmarks

PNPM v9 Branch (migrated to branch's code)
```
  Time (mean ± σ):      3.526 s ±  0.081 s    [User: 0.717 s, System: 0.948 s]
  Range (min … max):    3.390 s …  3.714 s    20 runs
```
Master (running nx 19.1.0-beta.3)
```
  Time (mean ± σ):     11.160 s ±  0.112 s    [User: 0.799 s, System: 0.979 s]
  Range (min … max):   10.955 s … 11.379 s    20 runs
```

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #22850
Fixes #23256

---------

Co-authored-by: James Henry <[email protected]>
Copy link

github-actions bot commented Jun 5, 2024

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 Jun 5, 2024
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
5 participants