Skip to content

Commit 89a473c

Browse files
committed
feat: first release
1 parent ad2bf6b commit 89a473c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4296
-0
lines changed

.editorconfig

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

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto eol=lf
2+
*.md text diff=markdown
3+
*.lockb binary diff=lockb
4+
*.json linguist-language=jsonc

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* @codeismyid
2+
/.github/ @codeismyid
3+
/.husky/ @codeismyid
4+
/docs/* @codeismyid
5+
/scripts/ @codeismyid

.github/renovate.json

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:best-practices",
5+
":semanticCommits",
6+
":semanticCommitScopeDisabled"
7+
],
8+
"labels": ["renovate", "bot"],
9+
"schedule": ["at any time"],
10+
"prHourlyLimit": 0,
11+
"prConcurrentLimit": 0,
12+
"dependencyDashboardTitle": "Renovate Dependency Dashboard",
13+
"dependencyDashboardLabels": ["renovate", "bot"],
14+
"dependencyDashboardOSVVulnerabilitySummary": "all",
15+
"osvVulnerabilityAlerts": true,
16+
"vulnerabilityAlerts": {
17+
"addLabels": ["dependency", "security"],
18+
"groupName": null,
19+
"schedule": ["at any time"],
20+
"dependencyDashboardApproval": false,
21+
"minimumReleaseAge": null,
22+
"rangeStrategy": "pin",
23+
"prCreation": "immediate",
24+
"vulnerabilityFixStrategy": "lowest",
25+
"additionalBranchPrefix": "security/",
26+
"branchTopic": "{{{datasource}}}-{{{depNameSanitized}}}",
27+
"commitMessageSuffix": "due to security vulnerability",
28+
"commitBody": "Resolve security vulnerability with {{{vulnerabilitySeverity}}} severity level",
29+
"packageRules": [
30+
{
31+
"matchDepTypes": ["dependencies"],
32+
"semanticCommitType": "fix"
33+
}
34+
]
35+
},
36+
"pin": {
37+
"extends": ["mergeConfidence:all-badges", "security:openssf-scorecard"],
38+
"rebaseWhen": "behind-base-branch",
39+
"groupName": "",
40+
"groupSlug": null,
41+
"group": {},
42+
"commitMessageAction": "pin",
43+
"prBodyDefinitions": {
44+
"Change": "`{{#if currentDigestShort}}{{{currentDigestShort}}}{{else}}{{{currentValue}}}{{/if}}` -> `{{#if newDigestShort}}{{{newDigestShort}}}{{else}}{{{newValue}}}{{/if}}`"
45+
}
46+
},
47+
"pinDigest": {
48+
"extends": ["mergeConfidence:all-badges", "security:openssf-scorecard"],
49+
"rebaseWhen": "behind-base-branch",
50+
"groupName": "",
51+
"groupSlug": "",
52+
"group": {},
53+
"commitMessageAction": "pin",
54+
"prBodyDefinitions": {
55+
"Change": "`{{#if currentDigestShort}}{{{currentDigestShort}}}{{else}}{{{currentValue}}}{{/if}}` -> `{{#if newDigestShort}}{{{newDigestShort}}}{{else}}{{{newValue}}}{{/if}}`"
56+
}
57+
},
58+
"packageRules": [
59+
{
60+
"rebaseWhen": "behind-base-branch",
61+
"matchFileNames": ["**/bun.lock?(b)", "**/package.json"],
62+
"additionalBranchPrefix": "{{{datasource}}}/",
63+
"addLabels": ["dependency"],
64+
"semanticCommitType": "build",
65+
"commitMessageExtra": "from {{#if currentDigestShort}}{{{currentDigestShort}}}{{else}}{{{currentValue}}}{{/if}} to {{#if newDigestShort}}{{{newDigestShort}}}{{else}}{{{newValue}}}{{/if}}"
66+
},
67+
{
68+
"matchDepTypes": ["dependencies"],
69+
"commitMessageTopic": "dependency {{{depName}}}"
70+
},
71+
{
72+
"matchDepTypes": ["devDependencies"],
73+
"commitMessageTopic": "dev-dependency {{{depName}}}"
74+
},
75+
{
76+
"matchDepTypes": ["peerDependencies"],
77+
"commitMessageTopic": "peer-dependency {{{depName}}}"
78+
},
79+
{
80+
"rebaseWhen": "behind-base-branch",
81+
"matchFileNames": [
82+
"**/{workflow-templates,.github,.gitea,.forgejo}/{workflows,actions}/*.yaml",
83+
"**/action.yaml"
84+
],
85+
"pinDigests": true,
86+
"additionalBranchPrefix": "{{{datasource}}}/",
87+
"addLabels": ["dependency", "workflow"],
88+
"semanticCommitType": "ci",
89+
"commitMessageTopic": "{{{depType}}} {{{depName}}}",
90+
"commitMessageExtra": "from {{#if currentDigestShort}}{{{currentDigestShort}}}{{else}}{{{currentValue}}}{{/if}} to {{#if newDigestShort}}{{{newDigestShort}}}{{else}}{{{newValue}}}{{/if}}"
91+
},
92+
{
93+
"matchFileNames": ["**/*"],
94+
"prBodyDefinitions": {
95+
"OpenSSF": "[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/{{sourceRepo}}/badge)](https://securityscorecards.dev/viewer/?uri=github.com/{{sourceRepo}})"
96+
},
97+
"matchUpdateTypes": ["patch", "minor", "major"],
98+
"prBodyColumns": [
99+
"Package",
100+
"Change",
101+
"Age",
102+
"Adoption",
103+
"Passing",
104+
"Confidence",
105+
"OpenSSF"
106+
]
107+
}
108+
]
109+
}

.github/workflows/ci.yaml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
commit:
20+
name: Commit check
21+
runs-on: ubuntu-24.04
22+
steps:
23+
- name: Harden runner
24+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
25+
with:
26+
disable-sudo: true
27+
egress-policy: block
28+
allowed-endpoints: >
29+
bun.sh:443
30+
github.com:443
31+
objects.githubusercontent.com:443
32+
registry.npmjs.org:443
33+
34+
- name: Git checkout
35+
if: github.event_name == 'push'
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
fetch-depth: 1
39+
sparse-checkout: .
40+
persist-credentials: false
41+
42+
- name: Git checkout (full-history)
43+
if: github.event_name == 'pull_request'
44+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
45+
with:
46+
fetch-depth: 0
47+
sparse-checkout: .
48+
ref: ${{ github.head_ref }}
49+
repository: ${{ github.event.pull_request.head.repo.full_name }}
50+
persist-credentials: false
51+
52+
- name: Set up bun@latest
53+
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
54+
55+
- name: Install dependencies
56+
run: bun ci
57+
58+
- name: Run check (push)
59+
if: github.event_name == 'push'
60+
run: bunx commitlint --last --verbose
61+
62+
- name: Run check (pull_request)
63+
if: github.event_name == 'pull_request'
64+
run: bunx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
65+
66+
dependency:
67+
name: Dependency check
68+
runs-on: ubuntu-24.04
69+
permissions:
70+
pull-requests: write
71+
steps:
72+
- name: Harden runner
73+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
74+
with:
75+
disable-sudo: true
76+
egress-policy: block
77+
allowed-endpoints: >
78+
api.github.com:443
79+
api.securityscorecards.dev:443
80+
github.com:443
81+
82+
- name: Git checkout
83+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
84+
with:
85+
fetch-depth: ${{ github.event_name == 'pull_request' && 1 || 2 }}
86+
repository: ${{ github.event.pull_request.head.repo.full_name }}
87+
persist-credentials: false
88+
89+
- name: Run check (push)
90+
if: github.event_name == 'push'
91+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 #v4.5.0
92+
with:
93+
allow-licenses: MIT, ISC, CC0-1.0, Apache-2.0, BSD-3-Clause, Unlicense
94+
head-ref: ${{ github.sha }}
95+
base-ref: ${{ github.event.before }}
96+
fail-on-severity: low
97+
comment-summary-in-pr: never
98+
warn-on-openssf-scorecard-level: 3
99+
100+
- name: Run check (pull_request)
101+
if: github.event_name == 'pull_request'
102+
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 #v4.5.0
103+
with:
104+
allow-licenses: MIT, ISC, CC0-1.0, Apache-2.0, BSD-3-Clause, Unlicense
105+
fail-on-severity: low
106+
comment-summary-in-pr: on-failure
107+
warn-on-openssf-scorecard-level: 3
108+
109+
format:
110+
name: Format check
111+
runs-on: ubuntu-24.04
112+
steps:
113+
- name: Harden runner
114+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
115+
with:
116+
disable-sudo: true
117+
egress-policy: block
118+
allowed-endpoints: >
119+
bun.sh:443
120+
github.com:443
121+
objects.githubusercontent.com:443
122+
raw.githubusercontent.com:443
123+
registry.npmjs.org:443
124+
125+
- name: Git checkout
126+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
127+
with:
128+
persist-credentials: false
129+
130+
- name: Set up bun@latest
131+
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
132+
133+
- name: Install dependencies
134+
run: bun ci
135+
136+
- name: Run check
137+
run: bunx biome ci --reporter=github --max-diagnostics=none --no-errors-on-unmatched
138+
139+
spec:
140+
name: Spec check
141+
runs-on: ubuntu-24.04
142+
steps:
143+
- name: Harden runner
144+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
145+
with:
146+
disable-sudo: true
147+
egress-policy: block
148+
allowed-endpoints: >
149+
bun.sh:443
150+
cli.codecov.io:443
151+
github.com:443
152+
ingest.codecov.io:443
153+
keybase.io:443
154+
objects.githubusercontent.com:443
155+
registry.npmjs.org:443
156+
storage.googleapis.com:443
157+
158+
- name: Git checkout
159+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
160+
with:
161+
persist-credentials: false
162+
163+
- name: Set up bun@latest
164+
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
165+
166+
- name: Install dependencies
167+
run: bun ci
168+
169+
- name: Run check
170+
env:
171+
FORCE_COLOR: 3
172+
run: bun test --coverage --coverage-reporter=lcov --coverage-reporter=text --reporter=junit --reporter-outfile=junit.xml
173+
174+
- name: Upload lcov
175+
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
176+
with:
177+
fail_ci_if_error: true
178+
179+
- name: Upload test result
180+
uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706 # v1.1.0
181+
with:
182+
fail_ci_if_error: true
183+
184+
type:
185+
name: Type check
186+
runs-on: ubuntu-24.04
187+
steps:
188+
- name: Harden runner
189+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
190+
with:
191+
disable-sudo: true
192+
egress-policy: block
193+
allowed-endpoints: >
194+
api.github.com:443
195+
bun.sh:443
196+
github.com:443
197+
objects.githubusercontent.com:443
198+
raw.githubusercontent.com:443
199+
registry.npmjs.org:443
200+
201+
- name: Git checkout
202+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
203+
with:
204+
persist-credentials: false
205+
206+
- name: Set up bun@latest
207+
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
208+
209+
- name: Install dependencies
210+
run: bun ci
211+
212+
- name: Run check
213+
run: |
214+
tsc_output=$(bunx tsc; bunx type-coverage)
215+
printf "%s" "$tsc_output" | bun bin/tsc-output-format.ts --formatOnly --formatOutput gha

0 commit comments

Comments
 (0)