Skip to content

Commit d080a51

Browse files
authored
Initial commit
0 parents  commit d080a51

File tree

16 files changed

+470
-0
lines changed

16 files changed

+470
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Setup Bun Environment'
2+
description: 'Setup Bun runtime and install dependencies'
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1
7+
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
8+
with:
9+
path: ~/.bun/install/cache
10+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
11+
restore-keys: |
12+
${{ runner.os }}-bun-
13+
- run: bun install --frozen-lockfile
14+
shell: bash

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions: {}
16+
17+
jobs:
18+
lint:
19+
timeout-minutes: 10
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
steps:
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
persist-credentials: false
27+
- uses: ./.github/actions/setup
28+
- run: bun run lint
29+
30+
build:
31+
timeout-minutes: 10
32+
runs-on: ubuntu-latest
33+
permissions:
34+
contents: read
35+
steps:
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
persist-credentials: false
39+
- uses: ./.github/actions/setup
40+
- run: bun run build
41+
42+
typecheck:
43+
timeout-minutes: 10
44+
runs-on: ubuntu-latest
45+
permissions:
46+
contents: read
47+
steps:
48+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
with:
50+
persist-credentials: false
51+
- uses: ./.github/actions/setup
52+
- run: bun run typecheck
53+
54+
test:
55+
timeout-minutes: 10
56+
runs-on: ubuntu-latest
57+
permissions:
58+
contents: read
59+
steps:
60+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
persist-credentials: false
63+
- uses: ./.github/actions/setup
64+
- run: bun test
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: GitHub Actions Lint
2+
3+
permissions: {}
4+
5+
on:
6+
pull_request:
7+
paths:
8+
- ".github/**"
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- ".github/**"
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
actionlint:
21+
timeout-minutes: 5
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
steps:
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27+
with:
28+
persist-credentials: false
29+
- uses: koki-develop/github-actions-lint/actionlint@62dfef5c9854a07712bad7af3bee7edb0c1109b1 # v1.4.1
30+
31+
ghalint:
32+
timeout-minutes: 5
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: read
36+
steps:
37+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
with:
39+
persist-credentials: false
40+
- uses: koki-develop/github-actions-lint/ghalint@62dfef5c9854a07712bad7af3bee7edb0c1109b1 # v1.4.1
41+
with:
42+
action-path: ./.github/actions/**/action.yml
43+
44+
zizmor:
45+
timeout-minutes: 5
46+
runs-on: ubuntu-latest
47+
permissions:
48+
contents: read
49+
steps:
50+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
with:
52+
persist-credentials: false
53+
- uses: koki-develop/github-actions-lint/zizmor@62dfef5c9854a07712bad7af3bee7edb0c1109b1 # v1.4.1
54+
with:
55+
github-token: ${{ github.token }}
56+
persona: auditor
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
permissions: {}
13+
14+
jobs:
15+
release-please:
16+
timeout-minutes: 10
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
issues: write
21+
runs-on: ubuntu-latest
22+
outputs:
23+
should-release: ${{ steps.release-please.outputs.release_created }}
24+
steps:
25+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
- id: release-please
29+
uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
30+
with:
31+
release-type: node
32+
token: ${{ github.token }}
33+
34+
publish:
35+
needs: release-please
36+
timeout-minutes: 10
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: read
40+
if: ${{ needs.release-please.outputs.should-release == 'true' }}
41+
steps:
42+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
with:
44+
persist-credentials: false
45+
46+
- uses: ./.github/actions/setup
47+
48+
- name: Create .npmrc
49+
run: |
50+
(
51+
# shellcheck disable=SC2016
52+
echo '//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}'
53+
echo 'registry=https://registry.npmjs.org'
54+
) > .npmrc
55+
- run: npm publish
56+
env:
57+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# dependencies
2+
node_modules
3+
4+
# output
5+
dist

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bunx lint-staged

.lintstagedrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"*": [
3+
"biome check --write --no-errors-on-unmatched --files-ignore-unknown=true"
4+
]
5+
}

biome.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
3+
"vcs": {
4+
"enabled": false,
5+
"clientKind": "git",
6+
"useIgnoreFile": false
7+
},
8+
"files": {
9+
"ignoreUnknown": false,
10+
"includes": ["**", "!dist/**"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space"
15+
},
16+
"linter": {
17+
"enabled": true,
18+
"rules": {
19+
"recommended": true,
20+
"correctness": {
21+
"noUnusedVariables": "error",
22+
"noUnusedImports": "error"
23+
}
24+
}
25+
},
26+
"javascript": {
27+
"formatter": {
28+
"quoteStyle": "double"
29+
}
30+
},
31+
"assist": {
32+
"enabled": true,
33+
"actions": {
34+
"source": {
35+
"organizeImports": "on"
36+
}
37+
}
38+
}
39+
}

bun.lock

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

bunfig.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[install]
2+
exact = true

0 commit comments

Comments
 (0)