Skip to content

Commit

Permalink
feat(core): add support for pnpm lockfile v9 (#22906)
Browse files Browse the repository at this point in the history
- [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]>
  • Loading branch information
meeroslav and JamesHenry authored May 27, 2024
1 parent c9f3c05 commit 8403f03
Show file tree
Hide file tree
Showing 19 changed files with 23,068 additions and 564 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Install PNPM
run: |
npm install -g @pnpm/exe@8.14
npm install -g @pnpm/exe@8
- name: Set node
uses: actions/setup-node@v3
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:

- name: Install PNPM
run: |
npm install -g @pnpm/exe@8.7.4
npm install -g @pnpm/exe@8
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/generate-embeddings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
node-version: [18]

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -25,7 +25,7 @@ jobs:
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 7
version: 8
run_install: false

- name: Get pnpm store directory
Expand All @@ -46,8 +46,8 @@ jobs:
run: pnpm install --no-frozen-lockfile

- name: Run embeddings script
run: pnpm exec nx run tools-documentation-create-embeddings:run-node
run: pnpm exec nx run tools-documentation-create-embeddings:run-node
env:
NX_NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.NX_NEXT_PUBLIC_SUPABASE_URL }}
NX_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.NX_SUPABASE_SERVICE_ROLE_KEY }}
NX_OPENAI_KEY: ${{ secrets.NX_OPENAI_KEY }}
NX_OPENAI_KEY: ${{ secrets.NX_OPENAI_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/issue-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: pnpm/action-setup@v2
with:
version: 8.2
version: 8

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Install PNPM
run: |
npm install -g @pnpm/exe@8.3.1
npm install -g @pnpm/exe@8
- name: Run a security audit
run: pnpm dlx audit-ci --critical --report-type summary
Expand Down
2 changes: 1 addition & 1 deletion .nx/workflows/agents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ launch-templates:
sudo apt-get install -y ca-certificates lsof
- name: Install Pnpm
script: |
npm install -g pnpm@8.15.5
npm install -g pnpm@8
- name: Pnpm Install
script: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"@phenomnomnominal/tsquery": "~5.0.1",
"@playwright/test": "^1.36.1",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
"@pnpm/lockfile-types": "^5.0.0",
"@pnpm/lockfile-types": "^6.0.0",
"@reduxjs/toolkit": "1.9.0",
"@remix-run/dev": "^2.8.1",
"@remix-run/node": "^2.8.1",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
export default `lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
dependencies:
'@isaacs/cliui':
specifier: ^8.0.2
version: 8.0.2
cliui:
specifier: ^8.0.1
version: 8.0.1
packages:
'@isaacs/[email protected]':
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
[email protected]:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
[email protected]:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
[email protected]:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
[email protected]:
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
[email protected]:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
[email protected]:
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
engines: {node: '>=12'}
snapshots:
'@isaacs/[email protected]':
dependencies:
string-width: 5.1.2
string-width-cjs: [email protected]
strip-ansi: 7.1.0
strip-ansi-cjs: [email protected]
wrap-ansi: 8.1.0
wrap-ansi-cjs: [email protected]
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
color-convert: 2.0.1
[email protected]: {}
[email protected]:
dependencies:
string-width: 4.2.3
strip-ansi: 6.0.1
wrap-ansi: 7.0.0
[email protected]:
dependencies:
color-name: 1.1.4
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
[email protected]:
dependencies:
eastasianwidth: 0.2.0
emoji-regex: 9.2.2
strip-ansi: 7.1.0
[email protected]:
dependencies:
ansi-regex: 5.0.1
[email protected]:
dependencies:
ansi-regex: 6.0.1
[email protected]:
dependencies:
ansi-styles: 4.3.0
string-width: 4.2.3
strip-ansi: 6.0.1
[email protected]:
dependencies:
ansi-styles: 6.2.1
string-width: 5.1.2
strip-ansi: 7.1.0
`;
Loading

0 comments on commit 8403f03

Please sign in to comment.