Skip to content

Commit a4e477c

Browse files
hershmireclaudemathieudi
authored
feat!: migrate to Biome + Lefthook + Vitest + esbuild + Node 24 (#8)
* feat!: migrate to Biome + Lefthook + Vitest + esbuild + Node 24 Brings the action in line with the org's modern toolchain template (mirroring reside-eng/npm-dependency-stats-action#1655): - Replace ESLint 8 + Prettier 3 + Husky + lint-staged + @side/eslint-config-* + @side/prettier-config with @biomejs/biome 2.4.15 + lefthook 2.1.8. - Replace @vercel/ncc with esbuild 0.28.0 — bundle output is now dist/index.mjs (ESM) with a createRequire banner for CommonJS deps. - Add Vitest 4.1.7 + @vitest/coverage-v8 plus smoke tests for action.ts and github.ts (80% line coverage, gate set at 75%). - Bump Node engine ^24.0.0, @tsconfig/node24, @types/node@^24, TypeScript ^6.0.3 (required by @tsconfig/node24's lib values). - action.yml: runs.using node20 -> node24, main dist/index.js -> dist/index.mjs. - Bump cycjimmy/semantic-release-action v2.7.0 -> v6.0.0 and semantic_version ^18 -> ^25 in the release workflow. - gitignore dist/ on main (release workflow continues to force-commit the rebuilt bundle to the v<major> branch, matching the reference template). - Add Claude Code scaffolding: AGENTS.md, CLAUDE.md stub, .claude/{agents,commands}/.gitkeep, .claude/settings.json permissions, .vscode/extensions.json, .github/workflows/claude-code.yml. BREAKING CHANGE: action.yml now uses node24 runtime and dist/index.mjs entrypoint. Consumers must pin to @v2 (the new major branch produced by semantic-release). Existing @v1 consumers are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(agents): trim AGENTS.md to load-bearing content only Drops three sections that don't change agent behaviour at execution time: - Release: version pins and trigger branches aren't load-bearing for dev work; the dist/ ownership rule (the one piece that mattered) is now folded into Conventions. - Atlassian: already declared in ~/.claude/CLAUDE.md and the parent Side/CLAUDE.md; no Atlassian touchpoints in this repo anyway. - Side org context: already declared in the parent Side/CLAUDE.md. Adds the non-obvious things an agent would otherwise rediscover: - The two action modes (upsert vs create-only) and the parent-selector behaviour. - A pointer to the reorderTableRows quirk in src/action.ts. - The module-load side effect in src/github.ts (why tests mock @actions/core before importing it). - The feat!: / BREAKING CHANGE: rule for triggering major bumps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: upload test coverage to Coveralls The pre-migration verify.yml and release.yml had a commented-out Coveralls upload step waiting for tests to exist. Now that we have 11 tests at 80% line coverage, wire it up: - vitest.config.ts: add 'lcov' to coverage.reporter so coverage/lcov.info is produced (Coveralls default input path). Keeps 'text' for local CLI output. - verify.yml + release.yml: add Coveralls upload step (coverallsapp/github-action@v2.3.6, SHA-pinned) immediately after the test step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci: add claude code review action --------- Co-authored-by: Eddie Leffler <757524+hershmire@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Mathieu Di-Majo <mathieu.dimajo@gmail.com>
1 parent 204cab6 commit a4e477c

29 files changed

Lines changed: 2040 additions & 3219 deletions

.claude/agents/.gitkeep

Whitespace-only changes.

.claude/commands/.gitkeep

Whitespace-only changes.

.claude/settings.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Edit(/**)",
5+
"Bash(yarn *)",
6+
"Bash(npx *)",
7+
"Bash(find *)",
8+
"Bash(ls *)",
9+
"Bash(cat *)",
10+
"Bash(grep *)",
11+
"Bash(node --version)",
12+
"Bash(yarn --version)",
13+
"Bash(tsc --version)",
14+
"Bash(biome --version)",
15+
"Bash(lefthook --version)",
16+
"Bash(gh --version)",
17+
"Bash(git *)",
18+
"Bash(gh auth status)",
19+
"Bash(gh repo view*)",
20+
"Bash(gh pr*)",
21+
"Bash(gh issue*)",
22+
"Bash(gh api*)",
23+
"WebFetch(domain:github.com)",
24+
"WebFetch(domain:raw.githubusercontent.com)",
25+
"WebFetch(domain:biomejs.dev)",
26+
"WebFetch(domain:lefthook.dev)",
27+
"mcp__atlassian__get*",
28+
"mcp__atlassian__search*",
29+
"mcp__atlassian__lookup*",
30+
"mcp__atlassian__fetch",
31+
"mcp__atlassian__atlassianUserInfo",
32+
"mcp__context7__resolve-library-id",
33+
"mcp__context7__query-docs"
34+
],
35+
"deny": [
36+
"Bash(sudo *)",
37+
"Read(**/.env)",
38+
"Read(**/.env.*)",
39+
"Edit(**/.env)",
40+
"Edit(**/.env.*)",
41+
"Bash(git reset*)",
42+
"Bash(git push --force*)",
43+
"Bash(git clean -f*)",
44+
"Bash(git checkout -- *)",
45+
"Bash(git checkout .)",
46+
"Bash(git branch -D *)",
47+
"Bash(git branch --delete --force *)",
48+
"Bash(gh auth login)",
49+
"Bash(gh auth logout)",
50+
"Bash(gh repo create)",
51+
"Bash(gh repo delete)",
52+
"Bash(gh repo archive)",
53+
"Bash(gh pr merge*)",
54+
"Bash(gh release*)",
55+
"Bash(gh secret*)",
56+
"Bash(gh variable*)"
57+
],
58+
"ask": ["Bash(yarn dlx *)", "Bash(rm -rf *)"]
59+
}
60+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/claude-code.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Claude Code
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, assigned]
10+
pull_request_review:
11+
types: [submitted]
12+
13+
permissions:
14+
actions: write
15+
contents: write
16+
deployments: write
17+
id-token: write
18+
issues: write
19+
pull-requests: write
20+
statuses: write
21+
22+
jobs:
23+
claude:
24+
uses: reside-eng/workflow-templates/.github/workflows/claude-code.yml@v12
25+
secrets: inherit

.github/workflows/code-review.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: PR code Review
2+
3+
on:
4+
pull_request:
5+
types: [opened, ready_for_review, reopened]
6+
issue_comment:
7+
types: [created]
8+
9+
jobs:
10+
code-review:
11+
uses: reside-eng/workflow-templates/.github/workflows/code-review.yml@v12
12+
secrets: inherit

.github/workflows/release.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
group: release-${{ github.ref }}
1616

1717
env:
18-
NODE_VERSION: 20.x
18+
NODE_VERSION: 24.x
1919

2020
jobs:
2121
publish:
@@ -40,30 +40,30 @@ jobs:
4040
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
4141

4242
- name: Install dependencies
43-
run: yarn install --frozen-lockfile
43+
run: yarn install --immutable
4444

45-
- name: Verify formatting
46-
run: yarn format:check
45+
- name: Check
46+
run: yarn check
4747

48-
- name: Lint
49-
run: yarn lint
48+
- name: Type check
49+
run: yarn types:check
5050

51-
# - name: Test
52-
# run: yarn test --coverage --silent
51+
- name: Test
52+
run: yarn test:cov
5353

54-
# - name: Upload coverage to Coveralls
55-
# uses: coverallsapp/github-action@95b1a2355bd0e526ad2fd62da9fd386ad4c98474 # v2.2.1
56-
# with:
57-
# github-token: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Upload coverage to Coveralls
55+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
56+
with:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
5858

5959
- name: Build
6060
run: yarn build
6161

6262
- name: Semantic Release
63-
uses: cycjimmy/semantic-release-action@5982a02995853159735cb838992248c4f0f16166 # v2.7.0
63+
uses: cycjimmy/semantic-release-action@b12c8f6015dc215fe37bc154d4ad456dd3833c90 # v6.0.0
6464
id: semantic
6565
with:
66-
semantic_version: ^18
66+
semantic_version: ^25
6767
branches: |
6868
[
6969
'+([0-9])?(.{+([0-9]),x}).x',

.github/workflows/verify.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Verify
33
on: [pull_request]
44

55
env:
6-
NODE_VERSION: 20.x
6+
NODE_VERSION: 24.x
77

88
jobs:
99
build:
@@ -20,21 +20,21 @@ jobs:
2020
cache: 'yarn'
2121

2222
- name: Install dependencies
23-
run: yarn install --frozen-lockfile
23+
run: yarn install --immutable
2424

25-
- name: Verify formatting
26-
run: yarn format:check
25+
- name: Check
26+
run: yarn check
2727

28-
- name: Lint
29-
run: yarn lint
28+
- name: Type check
29+
run: yarn types:check
3030

31-
# - name: Test
32-
# run: yarn test --coverage --silent
31+
- name: Test
32+
run: yarn test:cov
3333

34-
# - name: Upload coverage to Coveralls
35-
# uses: coverallsapp/github-action@95b1a2355bd0e526ad2fd62da9fd386ad4c98474 # v2.2.1
36-
# with:
37-
# github-token: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Upload coverage to Coveralls
35+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
36+
with:
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
3838

3939
- name: Build
4040
run: yarn build

0 commit comments

Comments
 (0)