From ee65e90a39ffef217c98d6c5b93147a97df98f0f Mon Sep 17 00:00:00 2001 From: boojack Date: Tue, 28 Apr 2026 22:16:22 +0800 Subject: [PATCH] chore: upgrade pnpm to 11 (#5911) --- .github/workflows/build-canary-image.yml | 2 +- .github/workflows/frontend-tests.yml | 2 +- .github/workflows/release.yml | 2 +- AGENTS.md | 2 +- web/package.json | 6 +----- web/pnpm-workspace.yaml | 2 ++ 6 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 web/pnpm-workspace.yaml diff --git a/.github/workflows/build-canary-image.yml b/.github/workflows/build-canary-image.yml index 8be60768e..ce32aa28c 100644 --- a/.github/workflows/build-canary-image.yml +++ b/.github/workflows/build-canary-image.yml @@ -19,7 +19,7 @@ jobs: - uses: pnpm/action-setup@v4.2.0 with: - version: 10 + version: 11.0.0 - uses: actions/setup-node@v6 with: node-version: "24" diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index ee5fc2c33..10f62b71c 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -14,7 +14,7 @@ concurrency: env: NODE_VERSION: "24" - PNPM_VERSION: "10" + PNPM_VERSION: "11.0.0" jobs: lint: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5150f24ae..cecba48e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ permissions: env: GO_VERSION: "1.26.2" NODE_VERSION: "24" - PNPM_VERSION: "10" + PNPM_VERSION: "11.0.0" ARTIFACT_RETENTION_DAYS: 60 ARTIFACT_PREFIX: memos diff --git a/AGENTS.md b/AGENTS.md index 6118f7e7d..a02ea2760 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -100,7 +100,7 @@ web/src/ - **backend-tests.yml:** Go 1.26.2, `go mod tidy -go=1.26.2`, golangci-lint v2.11.3, tests parallelized by group (store, server, internal, other) - **build-canary-image.yml:** Builds frontend with `pnpm release`, then publishes canary multi-arch container images for linux/amd64 and linux/arm64 -- **frontend-tests.yml:** Node 24, pnpm 10, lint + build +- **frontend-tests.yml:** Node 24, pnpm 11, lint + build - **proto-linter.yml:** buf lint + format check - **release.yml:** On version tags, builds frontend once, packages binaries for Linux/macOS/Windows, and publishes release container images/tags - **Docker:** Multi-stage (`scripts/Dockerfile`), Alpine 3.21, non-root user, port 5230, multi-arch (amd64/arm64/arm/v7) diff --git a/web/package.json b/web/package.json index 38fde024b..9921d750f 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,7 @@ { "name": "memos", "private": true, + "packageManager": "pnpm@11.0.0", "engines": { "node": ">=24" }, @@ -101,10 +102,5 @@ "typescript": "^6.0.3", "vite": "^7.3.2", "vitest": "^4.1.5" - }, - "pnpm": { - "onlyBuiltDependencies": [ - "esbuild" - ] } } diff --git a/web/pnpm-workspace.yaml b/web/pnpm-workspace.yaml new file mode 100644 index 000000000..5ed0b5af0 --- /dev/null +++ b/web/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +allowBuilds: + esbuild: true