Skip to content

Commit b2b6bbd

Browse files
committed
docs(cli): update TypeScript release flow
Replace the old Go/native package release notes with the current single-package TypeScript CLI flow and remove the obsolete CLI v2 PRD from tracked docs.
1 parent 6745985 commit b2b6bbd

5 files changed

Lines changed: 36 additions & 408 deletions

File tree

docs/adr/0005-bun-biome-typescript-6-toolchain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ The repo has one Bun lockfile and no pnpm workspace or lockfile metadata.
2828

2929
Biome lint failures are treated as errors, and Biome write mode is the supported formatting path.
3030

31-
Node.js remains the runtime boundary for package consumers and Node-based scripts. Vitest remains the TypeScript package test runner, Node's built-in test runner remains where already used, and Go tooling remains responsible for CLI build, lint, type-check, test, and packaging behavior.
31+
Node.js remains the runtime boundary for package consumers and Node-based scripts. Vitest remains the TypeScript package test runner, Node's built-in test runner remains where already used, and the CLI build, lint, type-check, test, and packaging behavior now runs through the TypeScript/Bun toolchain.

docs/how-tos/release-sdks-and-cli.md

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,13 @@ Check every package included in the release, not only these examples.
109109

110110
## Release the CLI
111111

112-
Use this flow for `@better-webhook/cli` and its native platform packages. The CLI is not released by Changesets.
112+
Use this flow for `@better-webhook/cli`. The CLI is not released by Changesets.
113113

114114
### 1. Choose the Version
115115

116-
Edit both version locations so they match:
116+
Edit the CLI package version:
117117

118118
- `packages/cli/package.json`
119-
- `packages/cli/internal/cli/version.go`
120119

121120
Use beta prereleases for beta tags:
122121

@@ -137,17 +136,17 @@ CLI prereleases must use the `beta` channel. Other prerelease identifiers are re
137136
Run the CLI check set:
138137

139138
```bash
140-
devbox run -- bun --filter @better-webhook/cli run format:check
141-
devbox run -- bun --filter @better-webhook/cli run lint
142-
devbox run -- bun --filter @better-webhook/cli run check-types
143-
devbox run -- bun --filter @better-webhook/cli run test
139+
devbox run -- bun run --filter @better-webhook/cli format:check
140+
devbox run -- bun run --filter @better-webhook/cli lint
141+
devbox run -- bun run --filter @better-webhook/cli check-types
142+
devbox run -- bun run --filter @better-webhook/cli test
144143
```
145144

146145
Build and smoke-test the local binary:
147146

148147
```bash
149-
devbox run -- bun --filter @better-webhook/cli run build
150-
devbox run -- bun --filter @better-webhook/cli run cli:built -- version --verbose
148+
devbox run -- bun run --filter @better-webhook/cli build
149+
devbox run -- bun run --filter @better-webhook/cli cli:built -- version --verbose
151150
```
152151

153152
Run full repo verification before merging:
@@ -168,7 +167,7 @@ Before publishing, run the manual GitHub workflow:
168167
CLI Release Dry Run
169168
```
170169

171-
It validates formatting, linting, type checks, tests, GoReleaser snapshot packaging, generated npm package directories, and `npm pack --dry-run` for every CLI npm package.
170+
It validates formatting, linting, type checks, tests, generated npm package directories, and `npm pack --dry-run` for the CLI npm package.
172171

173172
### 4. Merge to Main
174173

@@ -212,11 +211,10 @@ The workflow will:
212211

213212
- Validate the tag and npm availability.
214213
- Run CLI format, lint, type check, and tests.
215-
- Run GoReleaser, which runs `go mod tidy` and builds release artifacts.
214+
- Build the TypeScript CLI.
215+
- Generate the npm package directory.
216216
- Create or update the GitHub Release for the tag.
217-
- Generate npm package directories.
218-
- Publish native platform packages.
219-
- Publish the wrapper package last.
217+
- Publish `@better-webhook/cli` to npm.
220218

221219
If `release:check` says a package version already exists on npm, do not rerun the same version as a new release. Bump the CLI version and create a new annotated tag.
222220

@@ -226,26 +224,15 @@ For a beta release:
226224

227225
```bash
228226
devbox run -- npm view @better-webhook/cli@beta version dist-tags --json
229-
devbox run -- npm view @better-webhook/cli-darwin-arm64@beta version dist-tags --json
230-
devbox run -- npm view @better-webhook/cli-linux-x64@beta version dist-tags --json
231227
```
232228

233229
For a stable release:
234230

235231
```bash
236232
devbox run -- npm view @better-webhook/cli version dist-tags --json
237-
devbox run -- npm view @better-webhook/cli-darwin-arm64 version dist-tags --json
238-
devbox run -- npm view @better-webhook/cli-linux-x64 version dist-tags --json
239233
```
240234

241-
Also verify the GitHub Release exists for the pushed tag and contains:
242-
243-
- macOS arm64 tarball
244-
- macOS x64 tarball
245-
- Linux arm64 tarball
246-
- Linux x64 tarball
247-
- Windows x64 zip
248-
- checksum file
235+
Also verify the GitHub Release exists for the pushed tag and contains the packed `@better-webhook/cli` npm tarball.
249236

250237
### 8. Verify Current CLI npm State
251238

@@ -259,11 +246,11 @@ devbox run -- npm view @better-webhook/cli@latest version
259246

260247
Durable CLI package facts:
261248

262-
- The new Go CLI wrapper exposes the `bw` bin.
263-
- Older `@better-webhook/cli@latest` versions may use the legacy `better-webhook` bin until a stable Go CLI release moves `latest`.
264-
- `@better-webhook/cli@dev` is not part of the current Go CLI release flow.
249+
- The TypeScript CLI package exposes the `bw` bin.
250+
- Older `@better-webhook/cli@latest` versions may use older package contents until a stable CLI release moves `latest`.
251+
- `@better-webhook/cli@dev` is not part of the current CLI release flow.
265252

266-
Until a stable Go CLI version is published, use:
253+
Until a stable CLI version is published, use:
267254

268255
```bash
269256
npm install @better-webhook/cli@beta
@@ -275,14 +262,14 @@ or:
275262
npx @better-webhook/cli@beta
276263
```
277264

278-
After the first stable Go CLI release, verify that `@better-webhook/cli@latest` points to the stable Go CLI version.
265+
After the first stable CLI release, verify that `@better-webhook/cli@latest` points to the stable CLI version.
279266

280267
## Failure Recovery
281268

282269
If an SDK publish fails before any package is published, fix the issue and rerun the workflow.
283270

284271
If an SDK publish partially succeeds, inspect npm for every package in the release. Changesets will skip already-published versions on rerun, but verify the workflow logs before assuming rerun safety.
285272

286-
If a CLI release fails after some native platform packages publish but before the wrapper publishes, keep the same version only if `release:check` is adjusted or bypassed intentionally by a maintainer. The normal validator rejects any already-published package version, so the safer path is usually a new patch or beta version.
273+
If a CLI release fails after the npm package publishes, do not rerun the same version as a new release. The normal validator rejects already-published package versions, so the safer path is usually a new patch or beta version.
287274

288275
If the CLI GitHub Release exists but npm publish failed, compare the release artifacts with the npm package version before deciding whether to delete/recreate anything. Avoid moving or deleting published npm versions; npm package versions are effectively immutable.

0 commit comments

Comments
 (0)