chore: 兼容 pnpm v10,移除过严的版本上限限制

- 放宽 engines.pnpm 从 >=8.15.9 <9.0.0 至 >=8.15.9
- 添加 pnpm.onlyBuiltDependencies 以满足 pnpm v10 构建脚本审批要求
- 迁移 pnpm-lock.yaml 从格式 v6 到 v9(pnpm v10 自动生成)
- 更新 CLAUDE.md,移除已过时的 proto run pnpm 绕行方案

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
rqi14
2026-05-01 07:04:52 +01:00
co-authored by Claude Sonnet 4.6
parent 91b741394b
commit 3aeddd72f7
3 changed files with 5831 additions and 4662 deletions
+11 -11
View File
@@ -4,11 +4,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Package Manager ## Package Manager
**Always use `proto run pnpm -- <args>`** instead of bare `pnpm`. The project requires pnpm `>=8.15.9 <9.0.0`; the system pnpm (10.x) is incompatible and will cause errors. Use bare `pnpm` (v8 or v10+ both work). The `engines.pnpm` constraint is `>=8.15.9`.
```bash ```bash
proto run pnpm -- install pnpm install
proto run pnpm -- -F geekgeekrun-ui dev pnpm -F geekgeekrun-ui dev
``` ```
## Key Commands ## Key Commands
@@ -17,20 +17,20 @@ All UI development happens in `packages/ui`. The `dev`/`build`/`start` scripts a
```bash ```bash
# Electron app (main entry point for users) # Electron app (main entry point for users)
proto run pnpm -- -F geekgeekrun-ui dev # development mode pnpm -F geekgeekrun-ui dev # development mode
proto run pnpm -- -F geekgeekrun-ui build # production build pnpm -F geekgeekrun-ui build # production build
proto run pnpm -- -F geekgeekrun-ui build:win # Windows installer pnpm -F geekgeekrun-ui build:win # Windows installer
# Lint & format (run from packages/ui) # Lint & format (run from packages/ui)
proto run pnpm -- -F geekgeekrun-ui lint # eslint --fix pnpm -F geekgeekrun-ui lint # eslint --fix
proto run pnpm -- -F geekgeekrun-ui format # prettier --write pnpm -F geekgeekrun-ui format # prettier --write
# Type checking (run from packages/ui) # Type checking (run from packages/ui)
proto run pnpm -- -F geekgeekrun-ui typecheck # both node + web pnpm -F geekgeekrun-ui typecheck # both node + web
# SQLite plugin (must build before UI if changed) # SQLite plugin (must build before UI if changed)
proto run pnpm -- -F @geekgeekrun/sqlite-plugin build pnpm -F @geekgeekrun/sqlite-plugin build
proto run pnpm -- -F @geekgeekrun/sqlite-plugin dev # watch mode pnpm -F @geekgeekrun/sqlite-plugin dev # watch mode
``` ```
## Architecture ## Architecture
+9 -2
View File
@@ -30,12 +30,19 @@
"node": "20.16.0" "node": "20.16.0"
}, },
"engines": { "engines": {
"pnpm": ">=8.15.9 <9.0.0" "pnpm": ">=8.15.9"
}, },
"pnpm": { "pnpm": {
"patchedDependencies": { "patchedDependencies": {
"find-chrome-bin@2.0.4": "patches/find-chrome-bin@2.0.4.patch", "find-chrome-bin@2.0.4": "patches/find-chrome-bin@2.0.4.patch",
"puppeteer-extra-plugin-anonymize-ua@2.4.6": "patches/puppeteer-extra-plugin-anonymize-ua@2.4.6.patch" "puppeteer-extra-plugin-anonymize-ua@2.4.6": "patches/puppeteer-extra-plugin-anonymize-ua@2.4.6.patch"
} },
"onlyBuiltDependencies": [
"@parcel/watcher",
"better-sqlite3",
"electron",
"esbuild",
"puppeteer"
]
} }
} }
+5891 -4729
View File
File diff suppressed because it is too large Load Diff