Skip to content

Commit 84578e1

Browse files
authored
chore: use bun check for local typechecks and TypeScript 7.1 in CI (#58253)
1 parent 3d21312 commit 84578e1

59 files changed

Lines changed: 199 additions & 101 deletions

Some content is hidden

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

‎.github/workflows/check.yml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ jobs:
2525
- name: Setup Bun
2626
uses: ./.github/actions/setup-bun
2727

28-
- name: Run checks
29-
run: bun run check
28+
- name: Lint
29+
run: bun run lint
30+
31+
# Local `bun run check` uses `bun check`; CI keeps the official TypeScript compiler as the source of truth.
32+
- name: Typecheck (TypeScript 7.1)
33+
run: bun run typecheck:tsc
3034

3135
# Every GUI package file (app, desktop, gui-extensions, ui, session-ui) a pull request adds or edits must be free of
3236
# oxlint problems, warn-level rules (anti-slop) included. Other packages are not affected.

‎.github/workflows/deploy-changelog.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Typecheck
2929
working-directory: services/changelog
30-
run: bun typecheck
30+
run: bun run typecheck:tsc
3131

3232
- name: Test
3333
working-directory: services/changelog

‎.github/workflows/deploy-files.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Typecheck
2727
working-directory: services/files
28-
run: bun typecheck
28+
run: bun run typecheck:tsc
2929

3030
- name: Deploy
3131
working-directory: services/files

‎.github/workflows/deploy-update.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- name: Typecheck
2626
working-directory: services/update
27-
run: bun typecheck
27+
run: bun run typecheck:tsc
2828

2929
- name: Deploy
3030
working-directory: services/update

‎AGENTS.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ const table = sqliteTable("session", {
172172

173173
- Run `bun run check` from the repository root as the canonical full lint and type-check verification.
174174
- During focused iteration, run `bun typecheck` from the affected package directory (for example, `packages/core`). Never run `tsc` directly.
175+
- Local `typecheck` scripts use `bun check`. CI and package publishing run `typecheck:tsc`, which uses the official TypeScript compiler (`@typescript/native`). When the two disagree, `tsc` is the source of truth; reproduce with `bun run typecheck:tsc` from the package directory.
176+
- `bun check` aims to match TypeScript 7.1, not the `7.0.2` that `process.versions.typescript` reports (oven-sh/bun#46536). When `bun check` and `tsc` from the pinned `@typescript/native` report different errors, file a minimal, dependency-free repro at https://github.com/oven-sh/bun/issues, with the output of both. `bun check` writes no declaration files, so declaration-emit errors such as TS5088 or TS2883 are expected to appear only in `tsc`; do not report those.
175177

176178
## Session Core
177179

‎bun.lock‎

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

‎bunfig.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
exact = true
33
# Only install newly resolved package versions published at least 3 days ago.
44
minimumReleaseAge = 259200
5-
minimumReleaseAgeExcludes = ["@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@brendonovich/vite-plugin-opencode", "@kitlangton/solid-motion", "@opencode/sdk", "@opencode-ai/pty", "@opencode-ai/pty-darwin-arm64", "@opencode-ai/pty-darwin-x64", "@opencode-ai/pty-linux-arm64-gnu", "@opencode-ai/pty-linux-arm64-musl", "@opencode-ai/pty-linux-x64-gnu", "@opencode-ai/pty-linux-x64-musl", "@opencode-ai/pty-win32-arm64", "@opencode-ai/pty-win32-x64", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "@opentunnel/client", "@opentunnel/protocol", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/highlights", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron", "electron-builder", "electron-publish", "blume", "mermaid", "bun-types"]
5+
minimumReleaseAgeExcludes = ["@ai-sdk/amazon-bedrock", "@ai-sdk/anthropic", "@brendonovich/vite-plugin-opencode", "@kitlangton/solid-motion", "@opencode/sdk", "@opencode-ai/pty", "@opencode-ai/pty-darwin-arm64", "@opencode-ai/pty-darwin-x64", "@opencode-ai/pty-linux-arm64-gnu", "@opencode-ai/pty-linux-arm64-musl", "@opencode-ai/pty-linux-x64-gnu", "@opencode-ai/pty-linux-x64-musl", "@opencode-ai/pty-win32-arm64", "@opencode-ai/pty-win32-x64", "@opentui/core", "@opentui/core-darwin-arm64", "@opentui/core-darwin-x64", "@opentui/core-linux-arm64", "@opentui/core-linux-arm64-musl", "@opentui/core-linux-x64", "@opentui/core-linux-x64-musl", "@opentui/core-win32-arm64", "@opentui/core-win32-x64", "@opentui/keymap", "@opentui/solid", "@opentunnel/client", "@opentunnel/protocol", "gitlab-ai-provider", "opencode-gitlab-auth", "@ff-labs/fff-node", "@ff-labs/fff-bun", "@ff-labs/fff-bin-darwin-arm64", "@ff-labs/fff-bin-darwin-x64", "@ff-labs/fff-bin-linux-arm64-gnu", "@ff-labs/fff-bin-linux-arm64-musl", "@ff-labs/fff-bin-linux-x64-gnu", "@ff-labs/fff-bin-linux-x64-musl", "@ff-labs/fff-bin-win32-arm64", "@ff-labs/fff-bin-win32-x64", "@pierre/diffs", "@pierre/highlights", "@pierre/theming", "app-builder-lib", "dmg-builder", "electron", "electron-builder", "electron-publish", "blume", "mermaid", "bun-types", "typescript@7.1.0-beta"]
66

77
[test]
88
root = "./do-not-run-tests-from-root"

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"test:lint-rules": "ast-grep test -c script/ast-grep/sgconfig.yml",
2626
"test:effect-simplification-rules": "ast-grep test -c script/ast-grep/effect-simplifications/sgconfig.yml",
2727
"typecheck": "bun turbo typecheck --concurrency=3",
28+
"typecheck:tsc": "bun turbo typecheck:tsc --concurrency=3",
2829
"check": "bun run lint && bun run typecheck",
2930
"typecheck:profile": "bun script/profile-typecheck.ts",
3031
"typecheck:profile:packages": "bun script/profile-typecheck-packages.ts",
@@ -94,7 +95,7 @@
9495
"@playwright/test": "1.60.0",
9596
"semver": "7.7.4",
9697
"typescript": "npm:@typescript/typescript6@6.0.2",
97-
"@typescript/native": "npm:typescript@7.0.2",
98+
"@typescript/native": "npm:typescript@7.1.0-beta",
9899
"zod": "4.1.8",
99100
"remeda": "2.26.0",
100101
"sst": "4.13.1",

‎packages/ai/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"scripts": {
88
"setup:recording-env": "bun run script/setup-recording-env.ts",
99
"test": "bun test --timeout 30000 --only-failures",
10-
"typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.types.json",
10+
"typecheck": "bun check --no-script && bun check --no-script -p tsconfig.types.json",
11+
"typecheck:tsc": "tsc --noEmit && tsc --noEmit -p tsconfig.types.json",
1112
"build": "tsc -p tsconfig.build.json"
1213
},
1314
"files": [

‎packages/app/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"./index.css": "./src/index.css"
1313
},
1414
"scripts": {
15-
"typecheck": "tsc -b",
15+
"typecheck": "bun check --no-script -b",
16+
"typecheck:tsc": "tsc -b",
1617
"typecheck:e2e": "tsc -p e2e/tsconfig.json",
1718
"start": "vite",
1819
"dev": "vite",

0 commit comments

Comments
 (0)