pier-setup 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.en.md +20 -0
  2. package/README.md +20 -0
  3. package/package.json +3 -2
package/README.en.md CHANGED
@@ -116,6 +116,26 @@ npm install --ignore-scripts
116
116
  npm test # node --test, 244 unit tests (planner / todo replay / session tail / GC / lifecycle)
117
117
  ```
118
118
 
119
+ ## Release process (tag → auto-publish to npm)
120
+
121
+ Three version numbers must stay in sync when releasing (enforced by `.githooks/pre-push`; mismatched pushes are rejected):
122
+
123
+ | Location | npm package |
124
+ |---|---|
125
+ | git tag (`v0.2.0` or `0.2.0`) | release trigger |
126
+ | `packages/pier-ext/package.json` `version` | `pi-pier` |
127
+ | root `package.json` `version` | `pier-setup` |
128
+
129
+ ```sh
130
+ # 1. Bump both versions to the target (must be greater than anything already on npm)
131
+ # 2. Commit, then tag with the same number and push:
132
+ git commit -am "release: 0.2.0"
133
+ git tag 0.2.0
134
+ git push && git push --tags # GitHub Actions runs tests and publishes via Trusted Publishing
135
+ ```
136
+
137
+ > Hook setup: run once after cloning — `git config core.hooksPath .githooks` (the npm prepare script does this automatically on `npm install`). Versions only go up: npm rejects re-publishing the same version, and old tag names cannot be reused.
138
+
119
139
  ## Design principles
120
140
 
121
141
  - **Session JSONL is the single source of truth**: todos, delegations, and registries replay from session branches — restart and branch switches stay correct
package/README.md CHANGED
@@ -112,6 +112,26 @@ npm install --ignore-scripts
112
112
  npm test # node --test,244 项单测(规划器 / todo 重放 / 会话尾 / GC / 生命周期)
113
113
  ```
114
114
 
115
+ ## 发版流程(tag → npm 自动发布)
116
+
117
+ 发版时**三处版本号必须一致**(由 `.githooks/pre-push` 守卫,不一致会拒绝 push tag):
118
+
119
+ | 位置 | 对应 npm 包 |
120
+ |---|---|
121
+ | git tag(兼容 `v0.2.0` / `0.2.0`) | 触发发布 |
122
+ | `packages/pier-ext/package.json` 的 `version` | `pi-pier` |
123
+ | 根 `package.json` 的 `version` | `pier-setup` |
124
+
125
+ ```sh
126
+ # 1. 同时修改两处 version → 目标版本(必须大于 npm 已有版本)
127
+ # 2. 提交后打同名 tag 并推送:
128
+ git commit -am "release: 0.2.0"
129
+ git tag 0.2.0
130
+ git push && git push --tags # GitHub Actions 自动跑测试并经 Trusted Publishing 发布到 npm
131
+ ```
132
+
133
+ > hook 安装:clone 后执行一次 `git config core.hooksPath .githooks`(`npm install` 会经 prepare 脚本自动配置)。版本号只能递增:npm 同版本不可重发;旧 tag 名不可复用。
134
+
115
135
  ## 设计原则
116
136
 
117
137
  - **会话 JSONL 是唯一权威**:todo / 委派 / 注册表全部回放自会话分支,重启与分支切换正确
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pier-setup",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "One-shot installer for pier: registers the pi-pier extension with pi and the pier.workbench plugin with herdr (install / uninstall / update)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,7 +31,8 @@
31
31
  "packages/*"
32
32
  ],
33
33
  "scripts": {
34
- "test": "node --test \"packages/*/test/*.test.ts\""
34
+ "test": "node --test \"packages/*/test/*.test.ts\"",
35
+ "prepare": "git config core.hooksPath .githooks"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@deepseek-ai/cordis-plugin-group": "^1.0.1",