Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .claude/rules/cli-version.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# CLI Version Management

**CRITICAL: Bump the version on every CLI change!**
**Version bumps are handled automatically by release-please.** Do NOT manually edit the version in `packages/cli/package.json`.

- **ANY change to `packages/cli/` requires a version bump** in `packages/cli/package.json`
- Use semantic versioning:
- **Patch** (0.2.X → 0.2.X+1): Bug fixes, minor improvements, documentation
- **Minor** (0.X.0 → 0.X+1.0): New features, significant improvements
- **Major** (X.0.0 → X+1.0.0): Breaking changes
- The CLI has auto-update enabled — users get new versions immediately on next run
- Version bumps ensure users always have the latest fixes and features
- Use **conventional commit types** to control the bump level:
- `fix:` → patch bump (0.15.17 → 0.15.18)
- `feat:` → minor bump (0.15.17 → 0.16.0)
- `feat!:` or `BREAKING CHANGE:` → major bump (but while pre-1.0, treated as minor: 0.15.17 → 0.16.0)
- release-please opens a PR that accumulates unreleased changes and bumps the version
- Merging that PR creates a GitHub release, which triggers the CLI build + publish workflow
- **NEVER commit `packages/cli/cli.js`** — it is a build artifact (already in `.gitignore`). It is produced during releases, not checked into the repo. Do NOT use `git add -f packages/cli/cli.js`.
9 changes: 3 additions & 6 deletions .github/workflows/cli-release.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Stale release notes text still references 'every push to main'

Line 57 of cli-release.yml contains the release notes text Pre-built CLI binary (auto-updated on every push to main). — but the workflow trigger has changed from push to release events. The text is now factually inaccurate. However, these lines were not modified in the diff (they are unchanged context), so this is a pre-existing issue that became semantically stale due to the trigger change. Worth updating to something like 'auto-updated on every CLI release' for accuracy.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: CLI Release

on:
push:
branches: [main]
paths:
- 'packages/cli/src/**'
- 'packages/cli/package.json'
- 'packages/cli/bun.lock'
release:
types: [published]
workflow_dispatch:

concurrency:
Expand All @@ -16,6 +12,7 @@ concurrency:
jobs:
build:
name: Build and release CLI
if: github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'packages/cli-v')
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Commitlint

on:
pull_request:
branches: [main]
types: [opened, edited, synchronize, reopened]

jobs:
lint:
name: Validate PR title
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install commitlint
run: bun install --no-save @commitlint/cli @commitlint/config-conventional

- name: Lint PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
printf '%s\n' "$PR_TITLE" > /tmp/pr_title.txt
bunx commitlint < /tmp/pr_title.txt
28 changes: 28 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Please

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

jobs:
release:
name: Create release PR
runs-on: ubuntu-latest

steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- name: Run release-please
uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
token: ${{ steps.app-token.outputs.token }}
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bunx --no-install commitlint --edit "$1"
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/cli": "0.15.17"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 release-please manifest version (0.15.17) is out of sync with actual package.json version (0.15.18)

The newly introduced .release-please-manifest.json hardcodes "packages/cli": "0.15.17", but packages/cli/package.json:3 on main already has version 0.15.18 (bumped by commit 48af1c3). release-please uses the manifest to determine the last released version and compute the next bump. With the manifest stuck at 0.15.17, the first release-please run will compute the wrong diff range for changelog generation and may attempt to bump to 0.15.18 — a version that already exists in package.json — producing a broken or no-op release PR.

Suggested change
"packages/cli": "0.15.17"
"packages/cli": "0.15.18"
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

}
204 changes: 202 additions & 2 deletions bun.lock

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
],
],
"header-max-length": [2, "always", 100],
},
};
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@
"packages/*",
".claude/skills/setup-spa",
".claude/scripts"
]
],
"scripts": {
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^19",
"@commitlint/config-conventional": "^19",
"husky": "^9"
}
}
22 changes: 22 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"packages": {
"packages/cli": {
"release-type": "node",
"bump-minor-pre-major": true,
"changelog-sections": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance" },
{ "type": "refactor", "section": "Refactoring" },
{ "type": "test", "section": "Tests", "hidden": true },
{ "type": "docs", "section": "Documentation", "hidden": true },
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
{ "type": "ci", "section": "CI", "hidden": true },
{ "type": "build", "section": "Build", "hidden": true },
{ "type": "style", "section": "Styles", "hidden": true },
{ "type": "revert", "section": "Reverts" }
]
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}