Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .agents/skills/recreate-terminal-demo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Regenerate the README GIF from the current Zig executable and verify that the an
```

Approve Docker access if the official VHS image must be pulled.

4. Inspect `docs/assets/terminal-demo.gif` and every PNG printed by the script with the image viewing tool.
5. Confirm:
- The colored help screen fits without wrapping or clipping.
Expand All @@ -28,7 +29,7 @@ Regenerate the README GIF from the current Zig executable and verify that the an
6. Run:

```bash
ZIG_GLOBAL_CACHE_DIR=/tmp/quick-commitlint-zig-cache yarn validate
ZIG_GLOBAL_CACHE_DIR=/tmp/quick-commitlint-zig-cache bun run validate
git diff --check
git diff --cached --check
```
Expand Down
6 changes: 3 additions & 3 deletions .agents/skills/recreate-terminal-demo/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface:
display_name: "Recreate Terminal Demo"
short_description: "Render and verify the README terminal GIF"
default_prompt: "Use $recreate-terminal-demo to regenerate and validate the README terminal demo GIF."
display_name: 'Recreate Terminal Demo'
short_description: 'Render and verify the README terminal GIF'
default_prompt: 'Use $recreate-terminal-demo to regenerate and validate the README terminal demo GIF.'
18 changes: 6 additions & 12 deletions .github/actions/cached-deps/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Get & Cache Dependencies
description: Install Yarn dependencies and cache node_modules
description: Install Bun dependencies and cache the Bun package cache
inputs:
caching:
description: Whether to cache dependencies
required: false
default: "true"
default: 'true'
runs:
using: composite
steps:
Expand All @@ -13,17 +13,11 @@ runs:
id: cache
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-bun-

- name: 🛠️ Install dependencies
if: steps.cache.outputs.cache-hit != 'true' || inputs.caching != 'true'
run: yarn install --frozen-lockfile
shell: bash

- name: 🪝 Restore lifecycle setup
if: steps.cache.outputs.cache-hit == 'true' && inputs.caching == 'true'
run: yarn prepare
run: bun ci
shell: bash
20 changes: 19 additions & 1 deletion .github/actions/report-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ inputs:
coverage-file:
description: Code coverage file
required: true
report-name:
description: Coverage report heading
required: true
comment-header:
description: Unique sticky comment header
required: true
runs:
using: composite
steps:
Expand All @@ -24,9 +30,21 @@ runs:
output: both
thresholds: '70 80'

- name: 📝 Add report heading
shell: bash
env:
REPORT_NAME: ${{ inputs.report-name }}
COMMENT_HEADER: ${{ inputs.comment-header }}
run: |
{
printf '## %s\n\n' "$REPORT_NAME"
cat code-coverage-results.md
} > "$RUNNER_TEMP/code-coverage-results-$COMMENT_HEADER.md"

- name: 💬 Add coverage PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.finder.outputs.pr }}
header: ${{ inputs.comment-header }}
recreate: true
path: code-coverage-results.md
path: ${{ runner.temp }}/code-coverage-results-${{ inputs.comment-header }}.md
16 changes: 16 additions & 0 deletions .github/actions/verify-artifact-layout/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 🔎 Verify artifact layout
description: Verify the packaged application artifact layout
runs:
using: composite
steps:
- name: 🔎 Verify artifact layout
shell: bash
run: |
test -f dist/portal/browser/index.html
test -x dist/quick-commitlint/bin/quick-commitlint.js
test -x dist/quick-commitlint/bin/native/darwin-arm64/quick-commitlint
test -x dist/quick-commitlint/bin/native/darwin-x64/quick-commitlint
test -x dist/quick-commitlint/bin/native/linux-arm64/quick-commitlint
test -x dist/quick-commitlint/bin/native/linux-x64/quick-commitlint
test -f dist/quick-commitlint/bin/native/win32-x64/quick-commitlint.exe
test -f dist/quick-commitlint/package.json
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ _None_

- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] I have run `yarn validate` when required.
- [ ] I have run `bun run validate` when required.
- [ ] If CLI behavior changed, I have smoke-tested the affected commands.
30 changes: 14 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org

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

- name: 🗜️ Setup Zig
uses: mlugg/setup-zig@v2
with:
Expand All @@ -38,24 +41,19 @@ jobs:
uses: ./.github/actions/cached-deps

- name: 🧹 Clean
run: yarn clean
run: bun run clean

- name: 📦 Validate package
run: bun run package:validate

- name: Validate
run: yarn validate
- name: 🌐 Validate portal
run: bun run portal:validate

- name: 📦 Build cross-platform package
run: yarn package
run: bun run package

- name: 🔎 Verify artifact layout
run: |
test -f dist/portal/browser/index.html
test -x dist/quick-commitlint/bin/quick-commitlint.js
test -x dist/quick-commitlint/bin/native/darwin-arm64/quick-commitlint
test -x dist/quick-commitlint/bin/native/darwin-x64/quick-commitlint
test -x dist/quick-commitlint/bin/native/linux-arm64/quick-commitlint
test -x dist/quick-commitlint/bin/native/linux-x64/quick-commitlint
test -f dist/quick-commitlint/bin/native/win32-x64/quick-commitlint.exe
test -f dist/quick-commitlint/package.json
uses: ./.github/actions/verify-artifact-layout

- name: 🚀 Publish npm
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
Expand All @@ -73,7 +71,7 @@ jobs:

- name: 📦 Create GitHub Packages manifest
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
run: yarn script:package-github
run: bun run script:package-github

- name: 🗜️ Setup GitHub Packages
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, 'beta') == false
Expand All @@ -91,10 +89,10 @@ jobs:
NODE_AUTH_TOKEN: ${{ github.token }}

- name: 📦 Build portal app
run: yarn portal:build:pages
run: bun run portal:build:pages

- name: 🔎 Verify prerendered pages
run: yarn portal:ssg:verify
run: bun run portal:ssg:verify

- name: 🛠️ Copy index.html to 404.html
run: cp ./dist/portal/browser/index.html ./dist/portal/browser/404.html
Expand Down
45 changes: 28 additions & 17 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org

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

- name: 🗜️ Setup Zig
uses: mlugg/setup-zig@v2
with:
Expand All @@ -29,39 +32,44 @@ jobs:
uses: ./.github/actions/cached-deps

- name: 🧹 Clean
run: yarn clean
run: bun run clean

- name: 📦 Validate package
run: bun run package:validate

- name: ✅ Validate
run: yarn validate
- name: 🌐 Validate portal
run: bun run portal:validate:coverage

- name: 📊 Report portal coverage
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/actions/report-pr
with:
coverage-file: coverage/portal/cobertura-coverage.xml
report-name: Documentation portal (Angular)
comment-header: portal-coverage-report

- name: 🛠️ Build coverage tests
run: yarn coverage:build
run: bun run coverage:build

- name: 🧪 Generate coverage
uses: ./.github/actions/generate-coverage

- name: 📊 Report coverage
- name: 📊 Report native coverage
if: github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/actions/report-pr
with:
coverage-file: coverage/merged/kcov-merged/cobertura.xml
report-name: Native CLI (Zig)
comment-header: native-coverage-report

- name: 📦 Build cross-platform package
run: yarn package
run: bun run package

- name: 🔎 Verify artifact layout
run: |
test -f dist/portal/browser/index.html
test -x dist/quick-commitlint/bin/quick-commitlint.js
test -x dist/quick-commitlint/bin/native/darwin-arm64/quick-commitlint
test -x dist/quick-commitlint/bin/native/darwin-x64/quick-commitlint
test -x dist/quick-commitlint/bin/native/linux-arm64/quick-commitlint
test -x dist/quick-commitlint/bin/native/linux-x64/quick-commitlint
test -f dist/quick-commitlint/bin/native/win32-x64/quick-commitlint.exe
test -f dist/quick-commitlint/package.json
uses: ./.github/actions/verify-artifact-layout

- name: 🏁 Benchmark performance gate
run: yarn benchmark
run: bun run benchmark

package-smoke-test:
name: 📦 Package Smoke Test (${{ matrix.os }})
Expand All @@ -80,6 +88,9 @@ jobs:
with:
node-version-file: .nvmrc

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

- name: 🗜️ Setup Zig
uses: mlugg/setup-zig@v2
with:
Expand All @@ -91,4 +102,4 @@ jobs:
caching: 'false'

- name: 📦 Build and smoke-test cross-platform package
run: yarn package
run: bun run package
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ dist/
coverage/
*.tgz
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json

# Editors and operating systems
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install commitlint --edit
bunx --no-install commitlint --edit "$1"
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bunx --no-install lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"**/*.{js,cjs,mjs,ts,html}": ["eslint --fix", "prettier --write"],
"**/*.{css,scss}": ["prettier --write"]
}
4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"ziglang.vscode-zig"
]
"recommendations": ["ziglang.vscode-zig"]
}
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
{
"label": "clean",
"type": "shell",
"command": "yarn",
"args": ["clean"],
"command": "bun",
"args": ["run", "clean"],
"problemMatcher": []
}
]
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

## Toolchain

- Use Zig 0.16.0, Node.js 24, and Yarn 1.22.22.
- Node is used for development, publishing, and the small platform launcher; all linting executes in the bundled Zig binary.
- Use Zig 0.16.0, Node.js 24, and Bun 1.3.14.
- Bun is used for development and packaging, while Node.js is used for publishing and the small platform launcher; all linting executes in the bundled Zig binary.
- Treat `package.json` as the sole source of truth for the release version. Keep `build.zig.zon` at the neutral `0.0.0` placeholder and derive build/test/package expectations from `package.json`.
- Never change the `build.zig.zon` fingerprint.

## Required validation

Run `yarn validate` after source, build, test, packaging, or workflow changes. For packaging changes, also run the release build, package scripts, and `yarn package:smoke`. Run `git diff --check` before handoff. Do not weaken tests to make validation pass.
Run `bun run validate` after source, build, test, packaging, or workflow changes. For packaging changes, also run the release build, package scripts, and `bun run package:smoke`. Run `git diff --check` before handoff. Do not weaken tests to make validation pass.

If the global Zig cache is not writable, set `ZIG_GLOBAL_CACHE_DIR` to a directory under `/tmp`.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing

Use Zig 0.16.0, Node.js 24, and Yarn 1.22.22. Install dependencies with `yarn install` and run `yarn validate` before submitting a change. Behavior changes should include tests, and public interface changes should update the README.
Use Zig 0.16.0, Node.js 24, and Bun 1.3.14. Install dependencies with `bun install` and run `bun run validate` before submitting a change. The pre-commit hook runs ESLint and Prettier fixes on staged TypeScript and Angular template files; it does not replace full validation. Behavior changes should include tests, and public interface changes should update the README.
Loading
Loading