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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.2
bun-version: 1.4.3
- run: bun install --frozen-lockfile
- name: Install shellcheck and shfmt
run: |
Expand All @@ -44,7 +44,7 @@ jobs:
persist-credentials: false
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.4.2
bun-version: 1.4.3
- run: bun install --frozen-lockfile
- name: Install shellcheck and shfmt
shell: pwsh
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ an older result with the version it was measured on.
to Sync Server, then Deploy. When the build test passes, click Make Release
and enter `X.Y.Z`. The saved build spec (build steps
`["npm install -g bun@1.4.2"]`, CMD `["bun", "scripts/glama.ts"]`) needs a
change only when the Bun version CI uses or `scripts/glama.ts` changes.
change only when the Bun version the server needs (`engines.bun` in `package.json`) or
`scripts/glama.ts` changes. CI runs a newer Bun for `bun check`, which the server does not need.
6. Check every accepted listing in the next section. Update by hand any that
still shows an older version or outdated details.

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ bun test
bun run check # format, lint and type check
```

`bun run check` type-checks with Bun's `bun check`, which needs Bun 1.4.3 or later.

`bun scripts/build.ts --if-stale` rebuilds the binary only when a source file,
the dependency manifest or lockfile, the bytecode-order profile, the build
script, or the Bun version changed. Restart the unit
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"scripts": {
"build": "bun scripts/build.ts",
"test": "bun test",
"typecheck": "tsc --noEmit -p tsconfig.json",
"typecheck": "bun scripts/typecheck.ts",
"lint": "oxlint --deny-warnings .",
"fmt": "oxfmt",
"check:published": "bun scripts/check-published.ts",
"check": "bun scripts/check-release.ts && oxfmt --check && oxlint --deny-warnings . && tsc --noEmit -p tsconfig.json && bun run check:shell",
"check": "bun scripts/check-release.ts && oxfmt --check && oxlint --deny-warnings . && bun run typecheck && bun run check:shell",
"check:shell": "bun scripts/check-shell.ts"
},
"devDependencies": {
Expand Down
15 changes: 15 additions & 0 deletions scripts/typecheck.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Type check with Bun's built-in `bun check` (Bun 1.4.3 or later). A `check` script in
// package.json shadows the built-in in any directory that script belongs to, so the built-in runs
// from the temporary directory with an absolute project path.
import { tmpdir } from "node:os";
import { resolve } from "node:path";

const proc = Bun.spawnSync(
[process.execPath, "check", "-p", resolve(import.meta.dir, "..", "tsconfig.json")],
{
cwd: tmpdir(),
stdout: "inherit",
stderr: "inherit",
},
);
process.exit(proc.exitCode);
Loading