build: update pnpm to v11 (#37591)
Update to https://github.com/pnpm/pnpm/releases/tag/v11.0.0 - move all pnpm settings to `pnpm-workspace.yaml`, pnpm v11 only reads that file - drop redundant or no-op settings - disable `strictDepBuilds` to avoid having to manually specify deps with build scripts, this is equivalent to v10 where it will not execute and warn. - add workarounds for https://github.com/SukkaW/nolyfill/issues/119 - remove dead eslintrc entry --- This PR was written with the help of Claude Opus 4.7 --------- Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -71,15 +71,15 @@ jobs:
|
|||||||
- "assets/emoji.json"
|
- "assets/emoji.json"
|
||||||
- "package.json"
|
- "package.json"
|
||||||
- "pnpm-lock.yaml"
|
- "pnpm-lock.yaml"
|
||||||
|
- "pnpm-workspace.yaml"
|
||||||
- "Makefile"
|
- "Makefile"
|
||||||
- ".eslintrc.cjs"
|
|
||||||
- ".npmrc"
|
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
- "**/*.md"
|
- "**/*.md"
|
||||||
- ".markdownlint.yaml"
|
- ".markdownlint.yaml"
|
||||||
- "package.json"
|
- "package.json"
|
||||||
- "pnpm-lock.yaml"
|
- "pnpm-lock.yaml"
|
||||||
|
- "pnpm-workspace.yaml"
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
- ".github/workflows/*"
|
- ".github/workflows/*"
|
||||||
@@ -108,6 +108,7 @@ jobs:
|
|||||||
- "Makefile"
|
- "Makefile"
|
||||||
- "package.json"
|
- "package.json"
|
||||||
- "pnpm-lock.yaml"
|
- "pnpm-lock.yaml"
|
||||||
|
- "pnpm-workspace.yaml"
|
||||||
- ".spectral.yaml"
|
- ".spectral.yaml"
|
||||||
|
|
||||||
yaml:
|
yaml:
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
check-latest: true
|
check-latest: true
|
||||||
cache: false
|
cache: false
|
||||||
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
@@ -130,7 +130,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cache-name: e2e
|
cache-name: e2e
|
||||||
build-cache: "false"
|
build-cache: "false"
|
||||||
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
|
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
audit=false
|
|
||||||
fund=false
|
|
||||||
update-notifier=false
|
|
||||||
save-exact=true
|
|
||||||
auto-install-peers=true
|
|
||||||
dedupe-peer-dependents=false
|
|
||||||
enable-pre-post-scripts=true
|
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.23 AS frontend-build
|
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.23 AS frontend-build
|
||||||
RUN apk --no-cache add build-base git nodejs pnpm
|
RUN apk --no-cache add build-base git nodejs pnpm
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
|
||||||
COPY --exclude=.git/ . .
|
COPY --exclude=.git/ . .
|
||||||
RUN make frontend
|
RUN make frontend
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.23 AS frontend-build
|
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.26-alpine3.23 AS frontend-build
|
||||||
RUN apk --no-cache add build-base git nodejs pnpm
|
RUN apk --no-cache add build-base git nodejs pnpm
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
|
RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install --frozen-lockfile
|
||||||
COPY --exclude=.git/ . .
|
COPY --exclude=.git/ . .
|
||||||
RUN make frontend
|
RUN make frontend
|
||||||
|
|||||||
@@ -613,6 +613,7 @@ update-js: node_modules ## update js dependencies
|
|||||||
.PHONY: nolyfill
|
.PHONY: nolyfill
|
||||||
nolyfill: node_modules ## apply nolyfill overrides to package.json and relock
|
nolyfill: node_modules ## apply nolyfill overrides to package.json and relock
|
||||||
pnpm exec nolyfill install
|
pnpm exec nolyfill install
|
||||||
|
node tools/migrate-nolyfills.ts
|
||||||
pnpm install
|
pnpm install
|
||||||
@touch node_modules
|
@touch node_modules
|
||||||
|
|
||||||
|
|||||||
+2
-31
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@10.33.2",
|
"packageManager": "pnpm@11.0.8",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 22.18.0",
|
"node": ">= 22.18.0",
|
||||||
"pnpm": ">= 10.0.0"
|
"pnpm": ">= 11.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@citation-js/core": "0.7.21",
|
"@citation-js/core": "0.7.21",
|
||||||
@@ -124,34 +124,5 @@
|
|||||||
"updates": "17.16.8",
|
"updates": "17.16.8",
|
||||||
"vitest": "4.1.5",
|
"vitest": "4.1.5",
|
||||||
"vue-tsc": "3.2.8"
|
"vue-tsc": "3.2.8"
|
||||||
},
|
|
||||||
"pnpm": {
|
|
||||||
"peerDependencyRules": {
|
|
||||||
"allowedVersions": {
|
|
||||||
"eslint-plugin-github>eslint": ">=9"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"array-includes": "npm:@nolyfill/array-includes@^1",
|
|
||||||
"array.prototype.findlastindex": "npm:@nolyfill/array.prototype.findlastindex@^1",
|
|
||||||
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@^1",
|
|
||||||
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@^1",
|
|
||||||
"es-aggregate-error": "npm:@nolyfill/es-aggregate-error@^1",
|
|
||||||
"hasown": "npm:@nolyfill/hasown@^1",
|
|
||||||
"is-core-module": "npm:@nolyfill/is-core-module@^1",
|
|
||||||
"object.assign": "npm:@nolyfill/object.assign@^1",
|
|
||||||
"object.fromentries": "npm:@nolyfill/object.fromentries@^1",
|
|
||||||
"object.groupby": "npm:@nolyfill/object.groupby@^1",
|
|
||||||
"object.values": "npm:@nolyfill/object.values@^1",
|
|
||||||
"safe-buffer": "npm:@nolyfill/safe-buffer@^1",
|
|
||||||
"safe-regex-test": "npm:@nolyfill/safe-regex-test@^1",
|
|
||||||
"safer-buffer": "npm:@nolyfill/safer-buffer@^1",
|
|
||||||
"string.prototype.includes": "npm:@nolyfill/string.prototype.includes@^1",
|
|
||||||
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@^1",
|
|
||||||
"object-keys": "npm:@nolyfill/object-keys@^1",
|
|
||||||
"object.entries": "npm:@nolyfill/object.entries@^1",
|
|
||||||
"abab": "npm:@nolyfill/abab@^1",
|
|
||||||
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@^1"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
packages: [.] # workaround for https://github.com/SukkaW/nolyfill/issues/119
|
||||||
|
savePrefix: ''
|
||||||
|
dedupePeerDependents: false
|
||||||
|
updateNotifier: false
|
||||||
|
strictDepBuilds: false
|
||||||
|
minimumReleaseAge: 0
|
||||||
|
|
||||||
|
peerDependencyRules:
|
||||||
|
allowedVersions:
|
||||||
|
eslint-plugin-github>eslint: '>=9'
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
array-includes: npm:@nolyfill/array-includes@^1
|
||||||
|
array.prototype.findlastindex: npm:@nolyfill/array.prototype.findlastindex@^1
|
||||||
|
array.prototype.flat: npm:@nolyfill/array.prototype.flat@^1
|
||||||
|
array.prototype.flatmap: npm:@nolyfill/array.prototype.flatmap@^1
|
||||||
|
es-aggregate-error: npm:@nolyfill/es-aggregate-error@^1
|
||||||
|
hasown: npm:@nolyfill/hasown@^1
|
||||||
|
is-core-module: npm:@nolyfill/is-core-module@^1
|
||||||
|
object.assign: npm:@nolyfill/object.assign@^1
|
||||||
|
object.fromentries: npm:@nolyfill/object.fromentries@^1
|
||||||
|
object.groupby: npm:@nolyfill/object.groupby@^1
|
||||||
|
object.values: npm:@nolyfill/object.values@^1
|
||||||
|
safe-buffer: npm:@nolyfill/safe-buffer@^1
|
||||||
|
safe-regex-test: npm:@nolyfill/safe-regex-test@^1
|
||||||
|
safer-buffer: npm:@nolyfill/safer-buffer@^1
|
||||||
|
string.prototype.includes: npm:@nolyfill/string.prototype.includes@^1
|
||||||
|
string.prototype.trimend: npm:@nolyfill/string.prototype.trimend@^1
|
||||||
|
object-keys: npm:@nolyfill/object-keys@^1
|
||||||
|
object.entries: npm:@nolyfill/object.entries@^1
|
||||||
|
abab: npm:@nolyfill/abab@^1
|
||||||
|
es-set-tostringtag: npm:@nolyfill/es-set-tostringtag@^1
|
||||||
+1
-1
@@ -85,7 +85,7 @@
|
|||||||
"matchManagers": ["npm"],
|
"matchManagers": ["npm"],
|
||||||
"postUpgradeTasks": {
|
"postUpgradeTasks": {
|
||||||
"commands": ["make svg nolyfill"],
|
"commands": ["make svg nolyfill"],
|
||||||
"fileFilters": ["package.json", "pnpm-lock.yaml", "public/assets/img/svg/**"],
|
"fileFilters": ["package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml", "public/assets/img/svg/**"],
|
||||||
"executionMode": "branch",
|
"executionMode": "branch",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
// nolyfill writes overrides to package.json#pnpm.overrides which pnpm v11 ignores.
|
||||||
|
// This moves them to pnpm-workspace.yaml until SukkaW/nolyfill#119 is fixed.
|
||||||
|
import {readFileSync, writeFileSync} from 'node:fs';
|
||||||
|
import {exit} from 'node:process';
|
||||||
|
import {fileURLToPath} from 'node:url';
|
||||||
|
import {dump} from 'js-yaml';
|
||||||
|
|
||||||
|
const packagePath = fileURLToPath(new URL('../package.json', import.meta.url));
|
||||||
|
const workspacePath = fileURLToPath(new URL('../pnpm-workspace.yaml', import.meta.url));
|
||||||
|
|
||||||
|
const packageJson: {pnpm?: {overrides?: Record<string, string>}} = JSON.parse(readFileSync(packagePath, 'utf8'));
|
||||||
|
const overrides = packageJson.pnpm?.overrides;
|
||||||
|
|
||||||
|
if (!overrides || !Object.keys(overrides).length) {
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
const block = dump({overrides}, {lineWidth: -1, quotingType: "'"});
|
||||||
|
const workspace = readFileSync(workspacePath, 'utf8');
|
||||||
|
const overridesRegex = /^overrides:[^\n]*(?:\n(?:[ \t][^\n]*|[ \t]*(?=\n[ \t])))*\n?/m;
|
||||||
|
|
||||||
|
if (!overridesRegex.test(workspace)) {
|
||||||
|
console.error(`No 'overrides:' block found in pnpm-workspace.yaml`);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
writeFileSync(workspacePath, workspace.replace(overridesRegex, block));
|
||||||
|
|
||||||
|
const pnpm = packageJson.pnpm!;
|
||||||
|
delete pnpm.overrides;
|
||||||
|
if (!Object.keys(pnpm).length) delete packageJson.pnpm;
|
||||||
|
writeFileSync(packagePath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
||||||
Reference in New Issue
Block a user