Repository navigation
feat(bun): adopt Bun 1.4 archive, test parallelism, and terminal APIs #576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
32cefa1
refactor(archive): extract tarballs with Bun.Archive instead of spawn…
rhuanbarreto 885ced4
perf(test): run the suite in parallel, and pin coverage to one process
rhuanbarreto b4f7b6d
feat(output): measure table columns and render ADRs with Bun 1.4 text…
rhuanbarreto 04fad64
perf(session-context): stop inflating whole codex rollouts to read th…
rhuanbarreto 760a355
style(markdown-terminal): write the sentinels as escapes, not literal…
rhuanbarreto 245ad7d
chore(types): upgrade @types/bun to 1.4.0 and correct the codex comment
rhuanbarreto 3923ad7
fix(typecheck): invalidate the build cache when the dependency tree m…
rhuanbarreto 1b2dcfe
docs(memory): record that proto resolves bun's version from the cwd
rhuanbarreto bf21e81
test(archive): point the symlink fixture at a target Bun.Archive will…
rhuanbarreto 89a11cb
fix(ci): stop the Windows job appending --coverage to the parallel sc…
rhuanbarreto 1285540
fix: address review findings on the Bun 1.4 sweep
rhuanbarreto 883bcec
fix(plugin-install): stop a downloaded bundle supplying cursor hooks.…
rhuanbarreto ebbb5d4
fix(plugin-install): replace only the hooks this installer generated
rhuanbarreto 2527072
test: prove the head-read bound instead of asserting around it
rhuanbarreto ebcd58f
test(codex): drop the hand-written meta type and use Bun.write for th…
rhuanbarreto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,58 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // Copyright 2026 Archgate | ||
| /** | ||
| * Regenerates the gitignored `.archgate/rules.d.ts` ambient types shim | ||
| * before linting, so a fresh checkout's `ctx.*` accesses in | ||
| * `.archgate/adrs/*.rules.ts` type-check instead of resolving to `any` | ||
| * (the shim otherwise only gets written by `archgate check`, which | ||
| * `bun run validate` runs after `lint`). | ||
| * Prepares the inputs `tsc --build` reads, so a typecheck reflects the tree it | ||
| * runs against. Two stale-input hazards, both silent: `.archgate/rules.d.ts` | ||
| * is gitignored and written only by `archgate check` (which `validate` runs | ||
| * after `lint`), and `.tsbuildinfo` is keyed on sources and tsconfig, never on | ||
| * installed `@types/*`. | ||
| */ | ||
|
|
||
| import { join } from "node:path"; | ||
|
|
||
| import { z } from "zod"; | ||
|
|
||
| import { ensureRulesShim } from "../src/helpers/rules-shim"; | ||
|
|
||
| const projectRoot = join(import.meta.dir, ".."); | ||
|
|
||
| /** Only the field this script reads; the rest of tsconfig passes through. */ | ||
| const TsconfigSchema = z.object({ | ||
| compilerOptions: z.object({ outDir: z.string().optional() }).optional(), | ||
| }); | ||
|
|
||
| /** | ||
| * Drop the incremental build cache when the dependency tree moved under it. | ||
| * `bun.lock` is the signal: it changes on every install, the only way | ||
| * `@types/*` can change. The cost is one full rebuild per install; the cache | ||
| * can otherwise withhold a real error as readily as report a fixed one. | ||
| */ | ||
| async function invalidateStaleBuildInfo(): Promise<void> { | ||
| const lock = Bun.file(join(projectRoot, "bun.lock")); | ||
| if (!(await lock.exists())) return; | ||
|
|
||
| // Read outDir rather than hardcoding it, so moving it in tsconfig cannot | ||
| // silently reinstate the stale cache. tsconfig.json permits comments. | ||
| const tsconfig = Bun.file(join(projectRoot, "tsconfig.json")); | ||
| if (!(await tsconfig.exists())) return; | ||
|
|
||
| let outDir: string; | ||
| try { | ||
| const parsed = TsconfigSchema.safeParse( | ||
| Bun.JSONC.parse(await tsconfig.text()) | ||
| ); | ||
| outDir = parsed.success | ||
| ? (parsed.data.compilerOptions?.outDir ?? ".") | ||
| : "."; | ||
| } catch { | ||
| return; | ||
| } | ||
|
|
||
| const buildInfo = Bun.file(join(projectRoot, outDir, "tsconfig.tsbuildinfo")); | ||
| if (!(await buildInfo.exists())) return; | ||
|
|
||
| if (lock.lastModified > buildInfo.lastModified) await buildInfo.delete(); | ||
| } | ||
|
|
||
| await invalidateStaleBuildInfo(); | ||
| await ensureRulesShim(projectRoot); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.