Skip to content

Commit 4662059

Browse files
authored
upgrading coana to version 14.12.174 (#1064)
1 parent eaec268 commit 4662059

File tree

4 files changed

+97
-47
lines changed

4 files changed

+97
-47
lines changed

.claude/skills/bump-coana.md

Lines changed: 85 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,122 @@
11
---
2-
description: Bump @coana-tech/cli to a new version, update changelog, and create a PR
2+
name: bump-coana
3+
description: Bump @coana-tech/cli to a new version, update changelog, and create a PR. Use when user wants to upgrade Coana CLI, bump Coana version, or says "bump coana" with a version number.
34
allowed-tools: Read, Edit, Write, Bash, Glob
5+
user-invocable: true
46
---
57

68
# Bump Coana CLI Version
79

8-
Automates the process of upgrading the @coana-tech/cli dependency to a new version.
10+
Automates the process of upgrading the @coana-tech/cli dependency to a new version, including package.json updates, changelog entry, and PR creation.
911

10-
## Usage
12+
## Input
1113

12-
```
13-
/bump-coana <version>
14-
```
14+
- **Version**: The Coana version to upgrade to (e.g., `14.12.173`)
15+
- Passed via `$ARGUMENTS` (e.g., `/bump-coana 14.12.173`)
16+
17+
If no version is provided, ask the user for the Coana version to upgrade to.
1518

16-
Where `<version>` is the Coana version number (e.g., `14.12.173`).
19+
## Workflow
1720

18-
## Instructions
21+
### Step 1: Parse and Validate Input
1922

20-
When this command is invoked with a version argument ($ARGUMENTS), perform the following steps:
23+
Extract the version number from `$ARGUMENTS`:
24+
25+
```bash
26+
COANA_VERSION="$ARGUMENTS"
27+
28+
# Validate version format (should be semver-like: X.Y.Z)
29+
if [[ ! "$COANA_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
30+
echo "ERROR: Invalid version format. Expected X.Y.Z (e.g., 14.12.173)"
31+
exit 1
32+
fi
33+
```
2134

22-
### 1. Validate Input
23-
- Extract the version from $ARGUMENTS (e.g., "14.12.173").
24-
- If no version is provided, ask the user for the Coana version to upgrade to.
35+
### Step 2: Update package.json
2536

26-
### 2. Update package.json
27-
- Read `package.json` in the repository root.
28-
- Find the current `@coana-tech/cli` version in devDependencies and note it for the PR body.
29-
- Update the `@coana-tech/cli` version to the provided version.
30-
- Bump the patch version of the package (e.g., `1.1.59` becomes `1.1.60`).
31-
- Write the updated package.json.
37+
1. Read `package.json` in the repository root.
38+
2. Find the current `@coana-tech/cli` version in `devDependencies` and note it as `CURRENT_VERSION`.
39+
3. Update `@coana-tech/cli` to the new version.
40+
4. Bump the patch version of the package (e.g., `1.1.59``1.1.60`).
41+
5. Write the updated `package.json`.
3242

33-
### 3. Update CHANGELOG.md
34-
- Read `CHANGELOG.md` in the repository root.
35-
- Add a new version entry at the top (after the header section that ends with "The format is based on..."), using today's date in YYYY-MM-DD format.
36-
- The new version should match the bumped package.json version.
37-
- Use this exact format for the new entry:
43+
**Values to extract**:
44+
- `CURRENT_VERSION`: The old @coana-tech/cli version (for PR body)
45+
- `NEW_PKG_VERSION`: The bumped package.json version (for changelog)
3846

47+
### Step 3: Update CHANGELOG.md
48+
49+
1. Read `CHANGELOG.md` in the repository root.
50+
2. Add a new version entry after the header section (which ends with "The format is based on...").
51+
3. Use today's date in `YYYY-MM-DD` format.
52+
53+
**Entry format**:
3954
```markdown
40-
## [NEW_VERSION](https://github.com/SocketDev/socket-cli/releases/tag/vNEW_VERSION) - YYYY-MM-DD
55+
## [NEW_PKG_VERSION](https://github.com/SocketDev/socket-cli/releases/tag/vNEW_PKG_VERSION) - YYYY-MM-DD
4156

4257
### Changed
4358
- Updated the Coana CLI to v `COANA_VERSION`.
4459

4560
```
4661

47-
Note: Include the blank line after the changelog entry.
62+
**Note**: Include a blank line after the entry.
63+
64+
### Step 4: Update Lock File
65+
66+
```bash
67+
pnpm install
68+
```
4869

49-
### 4. Update Lock File
50-
- Run `pnpm install` to update pnpm-lock.yaml with the new dependency version.
70+
This updates `pnpm-lock.yaml` with the new dependency version.
5171

52-
### 5. Create Branch and Commit
53-
- Create a new branch named `coana-COANA_VERSION` (e.g., `coana-14.12.173`) from the current branch.
54-
- Stage the changes: package.json, CHANGELOG.md, and pnpm-lock.yaml.
55-
- Create a commit with the message: `upgrading coana to version COANA_VERSION`.
56-
- Use the `-n` flag to skip pre-commit hooks.
72+
### Step 5: Create Branch and Commit
5773

58-
### 6. Push and Create PR
59-
- Push the branch to origin with `-u` flag.
60-
- Create a PR using `gh pr create` targeting the `v1.x` branch with:
61-
- Title: `upgrading coana to version COANA_VERSION`
62-
- Body using the format below.
74+
```bash
75+
# Create branch
76+
git checkout -b "coana-$COANA_VERSION"
6377

64-
Use this PR body format (use a HEREDOC for proper formatting):
78+
# Stage changes
79+
git add package.json CHANGELOG.md pnpm-lock.yaml
80+
81+
# Commit (skip pre-commit hooks with -n)
82+
git commit -n -m "upgrading coana to version $COANA_VERSION"
6583
```
84+
85+
### Step 6: Push and Create PR
86+
87+
```bash
88+
# Push branch
89+
git push -u origin "coana-$COANA_VERSION"
90+
91+
# Create PR targeting v1.x branch
92+
gh pr create --base v1.x --title "upgrading coana to version $COANA_VERSION" --body "$(cat <<'EOF'
6693
## Summary
6794
- Upgrades @coana-tech/cli from CURRENT_VERSION to COANA_VERSION
6895
6996
## Coana Changelog
7097
For details on what's included in this Coana release, see the [Coana Changelogs](https://docs.coana.tech/changelogs).
98+
EOF
99+
)"
71100
```
72101

73-
Replace CURRENT_VERSION with the old version found in step 2, and COANA_VERSION with the new version.
102+
Replace `CURRENT_VERSION` and `COANA_VERSION` with actual values.
103+
104+
## Output
105+
106+
- Branch: `coana-<VERSION>` pushed to origin
107+
- PR: Created targeting `v1.x` branch
108+
- Files modified: `package.json`, `CHANGELOG.md`, `pnpm-lock.yaml`
109+
110+
Report the PR URL to the user when complete.
111+
112+
## Error Handling
113+
114+
- **No version provided**: Ask user for the version number
115+
- **Invalid version format**: Report error with expected format
116+
- **pnpm install fails**: Check network connectivity and npm registry access
117+
- **PR creation fails**: Verify `gh` CLI is authenticated
118+
119+
## Important Notes
74120

75-
### Important Notes
76121
- Do NOT add any AI/Claude co-authorship or attribution to the commit message or PR.
77122
- Do NOT include "Generated with Claude Code" or similar text anywhere.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7+
## [1.1.61](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.61) - 2026-01-29
8+
9+
### Changed
10+
- Updated the Coana CLI to v `14.12.174`.
11+
712
## [1.1.60](https://github.com/SocketDev/socket-cli/releases/tag/v1.1.60) - 2026-01-28
813

914
### Changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "socket",
3-
"version": "1.1.60",
3+
"version": "1.1.61",
44
"description": "CLI for Socket.dev",
55
"homepage": "https://github.com/SocketDev/socket-cli",
66
"license": "MIT AND OFL-1.1",
@@ -94,7 +94,7 @@
9494
"@babel/preset-typescript": "7.27.1",
9595
"@babel/runtime": "7.28.4",
9696
"@biomejs/biome": "2.2.4",
97-
"@coana-tech/cli": "14.12.173",
97+
"@coana-tech/cli": "14.12.174",
9898
"@cyclonedx/cdxgen": "11.11.0",
9999
"@dotenvx/dotenvx": "1.49.0",
100100
"@eslint/compat": "1.3.2",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)