cannwork-rehearsal 0.3.2 → 0.3.3
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.
- package/README.md +17 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -91,25 +91,33 @@ Build artifacts are written to `dist/`.
|
|
|
91
91
|
|
|
92
92
|
## Maintainer release runbook
|
|
93
93
|
|
|
94
|
-
Releases are published manually to <https://registry.npmjs.org/> in two phases: an unscoped **trial release** that is kept live for real users, then (later) the official scoped release, after which the trial name is retired.
|
|
94
|
+
Releases are published **manually by the maintainer** to <https://registry.npmjs.org/> in two phases: an unscoped **trial release** that is kept live for real users, then (later) the official scoped release, after which the trial name is retired. AI assistants and other automation must not run a real release — they may only read release files, run checks/tests/builds, and use `--dry-run`.
|
|
95
95
|
|
|
96
96
|
### Phase 1 — unscoped trial release (kept live)
|
|
97
97
|
|
|
98
|
-
1. Set `name` to `cannwork-rehearsal` and `version` to
|
|
98
|
+
1. Set `name` to `cannwork-rehearsal` and `version` to the intended version in the root `package.json` (single source of truth). The script never bumps the version or creates git tags for you.
|
|
99
99
|
2. `npm login` (any account with publish rights).
|
|
100
|
-
3. `bun run release
|
|
101
|
-
4.
|
|
102
|
-
5.
|
|
103
|
-
6.
|
|
100
|
+
3. Optional preview: `bun run release --dry-run`. It prints the release plan (package names, version, package count, sub-packages-before-main order), runs typecheck + tests, cross-compiles, and verifies the packed artifacts **without uploading or asking for confirmation**.
|
|
101
|
+
4. Real release: run `bun run release` in an **interactive terminal**. After checks, build, and artifact verification it prints the same plan and asks `确认发布 <name>@<version>…`; only `y` / `yes` continues. Any other input (including an empty line) cancels with exit code 0 and uploads nothing.
|
|
102
|
+
5. The script publishes the 5 platform packages first, then the main package, and finally queries the registry for every package. It succeeds only when all 6 target versions are `live`. If any package is still staged (`0.0.0-stage`) or the query fails, the command exits non-zero, names the package, and tells you to wait for npm to promote it (or approve it on npmjs.com) before smoke-testing.
|
|
103
|
+
6. Smoke-test in a clean directory: `npx cannwork-rehearsal`. On success the script writes `dist/.rehearsal-ok`, which unlocks phase 2.
|
|
104
|
+
7. **Keep it live**: do not unpublish. During the trial, ship updates by repeating steps 3–6 with a bumped version.
|
|
104
105
|
|
|
105
106
|
### Phase 2 — official scoped release (deferred), then retire the trial name
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
8. Set `name` to `@zhoufangchaojs/cannwork`, then run `bun run release` in an interactive terminal and confirm. The script refuses to publish a scoped name until the trial-release marker exists, and it performs the same registry check afterwards.
|
|
109
|
+
9. Verify: `npm view @zhoufangchaojs/cannwork version`, smoke-test `npx @zhoufangchaojs/cannwork`, then tag the release yourself (tagging is intentionally outside the script):
|
|
109
110
|
```bash
|
|
110
111
|
git tag <version>
|
|
111
112
|
```
|
|
112
|
-
|
|
113
|
+
10. Retire the trial packages: `npm unpublish` all 6 (`cannwork-rehearsal` and `cannwork-rehearsal-*`) within the 72-hour window, otherwise `npm deprecate` them as trial packages. If the active credential is a `Granular access token` that bypasses 2FA, unpublish is rejected with 403 — delete the packages on npmjs.com instead, or run `npm login --auth-type=web` first.
|
|
114
|
+
|
|
115
|
+
### Release script options
|
|
116
|
+
|
|
117
|
+
- `--dry-run` — plan, check, build, and pack without uploading or confirming.
|
|
118
|
+
- `--yes` — skip the interactive confirmation. Only for rehearsals or explicitly authorized automation; a real release without a TTY is rejected unless this flag is present.
|
|
119
|
+
- `--no-build` / `--skip-checks` — reuse existing artifacts / skip typecheck and tests (use with care).
|
|
120
|
+
- `--root <dir>` — run against another checkout.
|
|
113
121
|
|
|
114
122
|
Rollback: `npm unpublish` the affected version within the allowed window; afterwards `npm deprecate` and publish a fixed version.
|
|
115
123
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cannwork-rehearsal",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cannwork": "bin/cannwork.js"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"cannwork-rehearsal-win32-x64": "0.3.
|
|
14
|
-
"cannwork-rehearsal-linux-x64": "0.3.
|
|
15
|
-
"cannwork-rehearsal-linux-arm64": "0.3.
|
|
16
|
-
"cannwork-rehearsal-darwin-x64": "0.3.
|
|
17
|
-
"cannwork-rehearsal-darwin-arm64": "0.3.
|
|
13
|
+
"cannwork-rehearsal-win32-x64": "0.3.3",
|
|
14
|
+
"cannwork-rehearsal-linux-x64": "0.3.3",
|
|
15
|
+
"cannwork-rehearsal-linux-arm64": "0.3.3",
|
|
16
|
+
"cannwork-rehearsal-darwin-x64": "0.3.3",
|
|
17
|
+
"cannwork-rehearsal-darwin-arm64": "0.3.3"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"registry": "https://registry.npmjs.org/",
|