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
parent 91b741394b
commit 3aeddd72f7
3 changed files with 5831 additions and 4662 deletions

View File

@@ -4,11 +4,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## 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
proto run pnpm -- install
proto run pnpm -- -F geekgeekrun-ui dev
pnpm install
pnpm -F geekgeekrun-ui dev
```
## Key Commands
@@ -17,20 +17,20 @@ All UI development happens in `packages/ui`. The `dev`/`build`/`start` scripts a
```bash
# Electron app (main entry point for users)
proto run pnpm -- -F geekgeekrun-ui dev # development mode
proto run pnpm -- -F geekgeekrun-ui build # production build
proto run pnpm -- -F geekgeekrun-ui build:win # Windows installer
pnpm -F geekgeekrun-ui dev # development mode
pnpm -F geekgeekrun-ui build # production build
pnpm -F geekgeekrun-ui build:win # Windows installer
# Lint & format (run from packages/ui)
proto run pnpm -- -F geekgeekrun-ui lint # eslint --fix
proto run pnpm -- -F geekgeekrun-ui format # prettier --write
pnpm -F geekgeekrun-ui lint # eslint --fix
pnpm -F geekgeekrun-ui format # prettier --write
# 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)
proto run pnpm -- -F @geekgeekrun/sqlite-plugin build
proto run pnpm -- -F @geekgeekrun/sqlite-plugin dev # watch mode
pnpm -F @geekgeekrun/sqlite-plugin build
pnpm -F @geekgeekrun/sqlite-plugin dev # watch mode
```
## Architecture

View File

@@ -30,12 +30,19 @@
"node": "20.16.0"
},
"engines": {
"pnpm": ">=8.15.9 <9.0.0"
"pnpm": ">=8.15.9"
},
"pnpm": {
"patchedDependencies": {
"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"
}
},
"onlyBuiltDependencies": [
"@parcel/watcher",
"better-sqlite3",
"electron",
"esbuild",
"puppeteer"
]
}
}

10460
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff