Skip to content

Commit 9c59170

Browse files
committed
build: standardize workspace tooling, CI, tests and release flow
- pin toolchain in .prototools (pnpm 11, node 24, npm 11) and typescript 6.0.3 - add Vitest scaffold (config + spec tsconfig + smoke test) and test scripts - add composite .github/actions/setup, 3-job CI and a GitHub Pages deploy; switch the publish workflow to the composite action - add a github-pages build configuration to the demo app - exempt @angular/* from the release-age cooldown; set verifyDepsBeforeRun false - single-source the library README from the root README at build time - add a shared .claude/settings.json and gitignore settings.local.json - add .vscode/extensions.json; add release script; set engines node >=24 - drop stale biome-ignore comments and rename the workspace to the singular name
1 parent 8bc6746 commit 9c59170

23 files changed

Lines changed: 472 additions & 82 deletions
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
{
22
"permissions": {
33
"allow": [
4+
"Bash(pnpm:*)",
5+
"Bash(oxlint:*)",
6+
"Bash(oxfmt:*)",
7+
"Bash(ng:*)",
8+
"Bash(git status:*)",
9+
"Bash(git log:*)",
10+
"Bash(git diff:*)",
11+
"Bash(git add:*)",
12+
"Bash(git commit:*)",
413
"WebFetch(domain:github.com)",
5-
"WebFetch(domain:tsx.is)",
6-
"WebFetch(domain:oxc.rs)",
714
"WebFetch(domain:angular.dev)",
8-
"Bash(git commit:*)",
9-
"Bash(git add:*)",
10-
"Bash(git diff:*)",
11-
"Bash(git log:*)",
12-
"Bash(git status:*)",
13-
"Bash(pnpm build:*)",
14-
"Bash(pnpm build-app:*)",
15-
"Bash(pnpm check:*)",
16-
"Bash(pnpm format:*)",
17-
"Bash(pnpm watch:*)",
18-
"Bash(pnpm serve:*)",
19-
"Bash(pnpm --filter:*)"
15+
"WebFetch(domain:oxc.rs)",
16+
"WebFetch(domain:tsx.is)"
2017
],
2118
"deny": []
2219
},

.github/actions/setup/action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Setup
2+
description: Install Node.js, pnpm, and dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v6
9+
with:
10+
node-version: 24
11+
registry-url: "https://registry.npmjs.org"
12+
13+
- name: Setup pnpm
14+
uses: pnpm/action-setup@v6
15+
with:
16+
version: 11
17+
run_install: true

.github/workflows/ci.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,24 @@ on:
99
- main
1010

1111
jobs:
12-
test:
12+
build:
1313
runs-on: ubuntu-latest
14-
1514
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v7
18-
19-
- name: Setup Node.js
20-
uses: actions/setup-node@v6
21-
with:
22-
node-version: 24
23-
registry-url: "https://registry.npmjs.org"
24-
25-
- name: Setup pnpm
26-
uses: pnpm/action-setup@v6
27-
with:
28-
version: 10
29-
run_install: true
30-
31-
- name: Build library
32-
run: pnpm build
15+
- uses: actions/checkout@v7
16+
- uses: ./.github/actions/setup
17+
- run: pnpm build
18+
- run: pnpm build-app
3319

34-
- name: Build demo app
35-
run: pnpm build-app
20+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v7
24+
- uses: ./.github/actions/setup
25+
- run: pnpm test
3626

37-
- name: Check code quality
38-
run: pnpm check
27+
lint:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v7
31+
- uses: ./.github/actions/setup
32+
- run: pnpm check

.github/workflows/pages.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy Demo to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v7
24+
25+
- name: Setup
26+
uses: ./.github/actions/setup
27+
28+
- name: Build library
29+
run: pnpm build
30+
31+
- name: Build demo app
32+
run: pnpm --filter=app exec ng build -c github-pages
33+
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v6
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v5
39+
with:
40+
path: projects/app/dist/browser
41+
42+
deploy:
43+
runs-on: ubuntu-latest
44+
needs: build
45+
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v5

.github/workflows/publish.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,8 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@v7
2020

21-
- name: Setup Node.js
22-
uses: actions/setup-node@v6
23-
with:
24-
node-version: 24
25-
registry-url: "https://registry.npmjs.org"
26-
27-
- name: Setup pnpm
28-
uses: pnpm/action-setup@v6
29-
with:
30-
version: 10
31-
run_install: true
21+
- name: Setup
22+
uses: ./.github/actions/setup
3223

3324
- name: Update npm
3425
run: npm install -g npm@latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ testem.log
2929
.DS_Store
3030
Thumbs.db
3131
*.tsbuildinfo
32+
.claude/settings.local.json

.prototools

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
node = "^24.15.0"
2-
pnpm = "^10.20.0"
3-
npm = "^11.6.2"
1+
node = "^24.18.0"
2+
pnpm = "^11.9.0"
3+
npm = "^11.17.0"

.release-it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"plugins": {
1818
"@release-it/bumper": {
19-
"out": ["projects/angular-extended-builder/package.json"]
19+
"out": ["projects/angular-extended-builder/package.json", "package.json"]
2020
}
2121
}
2222
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["oxc.oxc-vscode"]
3+
}

CLAUDE.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Consider analyzing their implementation when:
3535
- `pnpm build` - Build the angular-extended-builder package
3636
- `pnpm build-app` - Build the demo app (with debug logging enabled)
3737
- `pnpm serve` - Serve the demo app with hot reload
38+
- `pnpm test` - Run unit tests (Vitest)
39+
- `pnpm test:watch` - Run unit tests in watch mode
3840
- `pnpm check` - Run oxlint and oxfmt checks on entire codebase
3941
- `pnpm format` - Run oxlint --fix and oxfmt to auto-fix
4042

@@ -97,20 +99,20 @@ Before creating a release:
9799

98100
### 3. Publishing
99101

100-
The package uses a one-step release process:
102+
Releasing is a two-stage flow:
101103

102104
```bash
103105
pnpm release
104106
```
105107

108+
`pnpm release` runs release-it: it runs `pnpm check`, bumps the version in both `projects/angular-extended-builder/package.json` and the root `package.json` (via @release-it/bumper), commits `build: release v<version>`, and tags `v<version>` on `main`. It does **not** publish. Pushing the `v*` tag triggers the GitHub Actions `publish.yml` workflow, which builds the package and runs `npm publish` from the package root via npm OIDC trusted publishing.
109+
106110
### 4. Post-release
107111

108112
After publishing:
109113

110-
1. **Tag the release** in git with version number
111-
2. **Create GitHub release** with changelog
112-
3. **Update documentation** if API changes were made
113-
4. **Test installation** in a fresh Angular project
114+
1. **Update documentation** if API changes were made
115+
2. **Test installation** in a fresh Angular project
114116

115117
### 5. Release Notes
116118

@@ -182,8 +184,8 @@ To use this builder in an Angular project:
182184

183185
This project uses [Proto](https://moonrepo.dev/proto) (.prototools) to manage binary versions:
184186

185-
- **Node.js**: ^24.15.0 (managed by Proto)
186-
- **pnpm**: ^10.20.0 (managed by Proto)
187+
- **Node.js**: ^24.18.0 (managed by Proto)
188+
- **pnpm**: ^11.9.0 (managed by Proto)
187189

188190
**Important**: When updating dependencies, be careful not to accidentally update `@types/node` to versions incompatible with the Node.js version specified in .prototools. The upgrade scripts should respect the Node.js version constraint.
189191

0 commit comments

Comments
 (0)