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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @bounded-systems/maintainers
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: ci

# Quality gate: build, test, and a JSR publish dry-run on every PR and push to
# main. Trust is mechanical — the publish path is validated before a release tag
# is ever cut.

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Build (tsc)
run: bun run build

- name: Test
run: bun test

- name: JSR publish dry-run
run: bunx jsr publish --dry-run --allow-slow-types
46 changes: 46 additions & 0 deletions .github/workflows/publish-jsr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: publish-jsr

# Publish @bounded-systems/verbspec to JSR (https://jsr.io) via tokenless OIDC.
# JSR exchanges the GitHub OIDC token (id-token: write) for publish rights,
# verified against the package's linked GitHub repo (bounded-systems/verbspec) —
# no token or secret.
#
# Trigger: push a release tag `v<version>` (matching package.json/jsr.json), or
# run manually via workflow_dispatch.
#
# JSR publishes the TypeScript source directly (no dist build). --allow-slow-types
# keeps parity with the monorepo: a package without explicit public-API types
# still publishes (lower JSR score, not a hard block).

on:
workflow_dispatch:
push:
tags:
- "v*"

permissions:
contents: read
id-token: write # tokenless JSR publish (OIDC)

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit

- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.14

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Publish to JSR
run: bunx jsr publish --allow-slow-types
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
*.tsbuildinfo
30 changes: 30 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@
},
"peerDependencies": {
"zod": "^3.25.0 || ^4.0.0"
},
"devDependencies": {
"@types/bun": "^1.3.14",
"typescript": "^6.0.3",
"zod": "^4.4.3"
}
}
4 changes: 2 additions & 2 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"module": "NodeNext",
Expand All @@ -12,5 +12,5 @@
"rootDir": "./src"
},
"include": ["src/**/*.ts"],
"exclude": ["src/**/__tests__/**"]
"exclude": ["src/**/__tests__/**", "**/*.test.ts"]
}
16 changes: 15 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"exactOptionalPropertyTypes": true,
"noUncheckedIndexedAccess": true,
"noEmit": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"verbatimModuleSyntax": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["src/**/*.ts"]
}