Skip to content

Commit ccebc3d

Browse files
committed
Tooling: Move to pnpm 11
- Pin pnpm to `11` in `mise.toml` (was `10`, while the manifest already required `>=11`). - Move pnpm settings out of the now-ignored `package.json` `pnpm` field into `pnpm-workspace.yaml`: `allowBuilds` (esbuild, renamed from `onlyBuiltDependencies`) and `peerDependencyRules`. - Set `verifyDepsBeforeRun: false` so `pnpm exec` stops printing an install summary that the check runner misread as unformatted files. - Ignore the `only-allow` binary in knip (used by the `preinstall` guard).
1 parent d8af75d commit ccebc3d

4 files changed

Lines changed: 23 additions & 14 deletions

File tree

knip.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const config: KnipConfig = {
44
entry: ['src/routes/**/+*.{ts,svelte}', 'src/hooks.ts', 'src/lib/worker/analyzer.worker.ts'],
55
project: ['src/**/*.{ts,svelte}'],
66
ignore: ['src/app.d.ts'],
7-
ignoreBinaries: ['wrangler'],
7+
ignoreBinaries: ['wrangler', 'only-allow'],
88
ignoreDependencies: ['buffer', 'tailwindcss', 'chartjs-adapter-date-fns', 'chartjs-plugin-zoom', 'date-fns'],
99
}
1010

mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[tools]
22
node = "25"
3-
pnpm = "10"
3+
pnpm = "11"
44
go = "1.25"

package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "0.0.1",
44
"private": true,
55
"type": "module",
6-
"packageManager": "pnpm@10.33.2",
6+
"packageManager": "pnpm@11.1.2",
77
"scripts": {
8-
"preinstall": "node -e \"if(!/pnpm/.test(process.env.npm_config_user_agent))throw new Error('Use pnpm to install dependencies')\"",
8+
"preinstall": "npx only-allow pnpm",
99
"dev": "concurrently -n app,proxy -c cyan,magenta --kill-others-on-fail 'pnpm dev:app' 'pnpm dev:cors-proxy'",
1010
"dev:app": "vite dev",
1111
"dev:cors-proxy": "pnpm -C cors-proxy dev",
@@ -19,16 +19,6 @@
1919
"test:coverage": "vitest run --coverage",
2020
"knip": "knip"
2121
},
22-
"pnpm": {
23-
"onlyBuiltDependencies": [
24-
"esbuild"
25-
],
26-
"peerDependencyRules": {
27-
"allowedVersions": {
28-
"vite-plugin-devtools-json>vite": "8"
29-
}
30-
}
31-
},
3222
"devDependencies": {
3323
"@eslint/js": "^10.0.1",
3424
"@sveltejs/adapter-static": "^3.0.10",
@@ -62,5 +52,8 @@
6252
"date-fns": "^4.1.0",
6353
"idb": "^8.0.3",
6454
"isomorphic-git": "^1.37.5"
55+
},
56+
"engines": {
57+
"pnpm": ">=11"
6558
}
6659
}

pnpm-workspace.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# pnpm 11 no longer reads the `pnpm` field in package.json — these settings live here now.
2+
# Not a monorepo; this file exists only to hold pnpm settings.
3+
4+
# Allow esbuild to run its install script (build the native binary) despite a global ignore-scripts.
5+
allowBuilds:
6+
esbuild: true
7+
8+
# vite-plugin-devtools-json declares a narrower vite peer range; we run vite 8.
9+
peerDependencyRules:
10+
allowedVersions:
11+
vite-plugin-devtools-json>vite: '8'
12+
13+
# pnpm 11's `pnpm exec`/`pnpm run` print an "Already up to date / Done in …" install summary by
14+
# default. The check runner parses `pnpm exec prettier --list-different` stdout as a file list, so
15+
# that noise reads as "unformatted files". Disabling the pre-run verification keeps stdout clean.
16+
verifyDepsBeforeRun: false

0 commit comments

Comments
 (0)