Skip to content

Commit 113b1a1

Browse files
chore(pnpm): upgrade to pnpm 12 (#8912)
* chore(pnpm): upgrade to pnpm 12 * ci: use native pnpm 12 bootstrap for compiler jobs * fix(benchmarks): invoke the Nx CLI directly * refactor(benchmarks): run Nx through pnpm exec
1 parent fd5b0b8 commit 113b1a1

9 files changed

Lines changed: 180 additions & 40 deletions

File tree

‎.github/workflows/compiler-platforms.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
persist-credentials: false
7171
- name: Setup pnpm
7272
if: ${{ !matrix.container }}
73-
uses: pnpm/action-setup@739bfe42ca9233c5e6aca07c1a25a9d34aca49b0 # v6.0.7
73+
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
7474
- name: Setup Node
7575
if: ${{ !matrix.container }}
7676
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0

‎docs/start/framework/react/migrate-from-next-js.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Start does not interpret Next.js route conventions or configuration. Keep your a
1010

1111
## Run the reference application
1212

13-
Use Node 24 or newer and pnpm 11:
13+
Use Node 24 or newer and pnpm 12:
1414

1515
```sh
1616
git clone --depth 1 https://github.com/TanStack/router.git

‎examples/react/start-next-migration/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The private page saves one article in an encrypted session cookie. This keeps th
66

77
## Run
88

9-
Use Node 24 or newer and pnpm 11. From the repository root:
9+
Use Node 24 or newer and pnpm 12. From the repository root:
1010

1111
```sh
1212
pnpm install

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"type": "git",
66
"url": "git+https://github.com/TanStack/router.git"
77
},
8-
"packageManager": "pnpm@11.21.0",
8+
"packageManager": "pnpm@12.18.0",
99
"engines": {
10-
"pnpm": ">=11.21.0"
10+
"pnpm": ">=12.18.0"
1111
},
1212
"type": "module",
1313
"scripts": {

‎pnpm-lock.yaml‎

Lines changed: 158 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎scripts/benchmarks/bundle-size/build.mjs‎

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,11 @@ const repoRoot = fileURLToPath(new URL('../../../', import.meta.url))
1010
* @param {import('./run.mjs').Execute} [execute]
1111
*/
1212
export function build(args, execute = spawnSync) {
13-
const pnpmPath = process.env.npm_execpath
1413
/** @type {import('./run.mjs').CommandOptions} */
1514
const options = { cwd: repoRoot, env: process.env, stdio: 'inherit' }
1615
const result = execute(
17-
pnpmPath
18-
? process.execPath
19-
: process.platform === 'win32'
20-
? 'pnpm.cmd'
21-
: 'pnpm',
22-
[
23-
...(pnpmPath ? [pnpmPath] : []),
24-
'nx',
25-
'run',
26-
'@benchmarks/bundle-size:measure',
27-
...args,
28-
],
16+
process.env.npm_execpath || 'pnpm',
17+
['exec', 'nx', 'run', '@benchmarks/bundle-size:measure', ...args],
2918
options,
3019
)
3120
if (result.status !== 0) {

‎scripts/benchmarks/bundle-size/build.test.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ test('generates a fresh report after a successful Nx run, including cache hits',
1717
)
1818
assert.equal(status, 0)
1919
assert.equal(calls.length, 2)
20-
assert.deepEqual(calls[0]?.slice(-5), [
20+
assert.deepEqual(calls[0], [
21+
'exec',
2122
'nx',
2223
'run',
2324
'@benchmarks/bundle-size:measure',

‎scripts/benchmarks/bundle-size/measure.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ function buildRequiredPackages({ repoRoot, scenarios, skipPackageBuilds }) {
479479
)
480480

481481
const args = [
482+
'exec',
482483
'nx',
483484
'run-many',
484485
'--target=build',
@@ -494,7 +495,7 @@ function buildRequiredPackages({ repoRoot, scenarios, skipPackageBuilds }) {
494495
args.push('--skipNxCache')
495496
}
496497

497-
execFileSync(process.platform === 'win32' ? 'pnpm.cmd' : 'pnpm', args, {
498+
execFileSync(process.env.npm_execpath || 'pnpm', args, {
498499
cwd: repoRoot,
499500
stdio: 'inherit',
500501
env: process.env,

‎scripts/benchmarks/bundle-size/run.mjs‎

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -180,26 +180,17 @@ Arguments after -- go to the selected unit tests, not the measurement.`)
180180
}
181181

182182
if (values['test-projects']) {
183-
const pnpmPath = process.env.npm_execpath
184-
const status = step(
185-
'tests',
186-
pnpmPath
187-
? process.execPath
188-
: process.platform === 'win32'
189-
? 'pnpm.cmd'
190-
: 'pnpm',
191-
[
192-
...(pnpmPath ? [pnpmPath] : []),
193-
'nx',
194-
'run-many',
195-
'--target=test:unit',
196-
`--projects=${values['test-projects']}`,
197-
'--parallel=1',
198-
'--outputStyle=stream',
199-
'--skipRemoteCache',
200-
...(testArgs.length > 0 ? ['--', ...testArgs] : []),
201-
],
202-
)
183+
const status = step('tests', process.env.npm_execpath || 'pnpm', [
184+
'exec',
185+
'nx',
186+
'run-many',
187+
'--target=test:unit',
188+
`--projects=${values['test-projects']}`,
189+
'--parallel=1',
190+
'--outputStyle=stream',
191+
'--skipRemoteCache',
192+
...(testArgs.length > 0 ? ['--', ...testArgs] : []),
193+
])
203194
if (status !== 0) {
204195
return status
205196
}

0 commit comments

Comments
 (0)