Repository navigation
chore(tooling): pin the workspace to stable Bun 1.4.0 #1338
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 2 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
fd2833e
chore(tooling): pin the workspace to stable Bun 1.4.0
cursoragent 1a013db
test(tooling): require bun.lock v1 and cover bun-version failures
cursoragent f2e13c6
test(tooling): reject Vercel bunVersion for Node Functions
cursoragent 26987ba
fix(tooling): reject prerelease Bun pins and symlink no-ops
cursoragent 3067fc0
fix(tooling): fail bun-lock-drift on lockfileVersion 2+
cursoragent 4d4597e
test(tooling): reject bun --bun on Vercel install and ignore commands
cursoragent 799ef9b
fix(tooling): do not remediate lockfileVersion failures with bun install
cursoragent a596150
test(tooling): pin every first-party setup-bun workflow to env.BUN_VE…
cursoragent 66cbf74
test(tooling): scan .yml and .yaml GitHub workflow pins
cursoragent b03b050
test(tooling): remove lockfileVersion v2 fixture directory
cursoragent dafc40c
docs(ci): add copyable turbo prune check before accepting lockfile v2
cursoragent 609fe17
fix(tooling): fail verify:bun-version when GitHub workflow Bun pins d…
cursoragent 2cfa2c0
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cobmojo baab17a
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cursoragent 88166f9
test: give git fixture checks the same 60s budget
cursoragent 4a906f6
merge(develop): catch bun 1.4 branch up to current develop
cursoragent 5327df6
fix(AL-1338): enforce workflow Bun pins and Node runtime policy
codex 78f24fe
merge(develop): reconcile AL-1338 with current integration base
codex 5fca662
fix: try later bun candidates for workflow yaml
cursoragent 458ded0
test(tooling): preserve Node lookup and clean owned Bun fixtures
codex a7e333e
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cobmojo 964e3af
Merge branch 'develop' into cursor/bun-1-4-upgrade-d84a
cobmojo c3199ea
ci(integration): prove demo auth before the smoke suite
cursoragent 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1.4.0 |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| import { existsSync, readFileSync, readdirSync } from "node:fs"; | ||
| import path from "node:path"; | ||
|
|
||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| import { parseBunLock } from "../../../scripts/verify/bun-lock-drift.mjs"; | ||
|
|
||
| const repoRoot = process.cwd(); | ||
|
|
||
| /** Official stable pin verified from GitHub `bun-v1.4.0` and npm `bun@latest`. */ | ||
| const VERIFIED_STABLE_BUN = "1.4.0"; | ||
|
|
||
| const WORKFLOW_DIR = path.join(repoRoot, ".github", "workflows"); | ||
|
|
||
| function readPackageJson(): { | ||
| packageManager?: string; | ||
| devDependencies?: Record<string, string>; | ||
| } { | ||
| return JSON.parse(readFileSync(path.join(repoRoot, "package.json"), "utf8")); | ||
| } | ||
|
|
||
| function bunVersionFromPackageManager( | ||
| packageManager: string | undefined, | ||
| ): string { | ||
| expect(packageManager, "package.json packageManager").toMatch(/^bun@.+$/); | ||
| const version = packageManager!.slice("bun@".length); | ||
| expect(version).not.toMatch(/canary/i); | ||
| return version; | ||
| } | ||
|
|
||
| describe("Bun toolchain pin sync", () => { | ||
| const packageJson = readPackageJson(); | ||
| const packageManagerVersion = bunVersionFromPackageManager( | ||
| packageJson.packageManager, | ||
| ); | ||
|
|
||
| it("pins the verified stable Bun 1.4.x release, never canary", () => { | ||
| expect(packageJson.packageManager).toBe(`bun@${VERIFIED_STABLE_BUN}`); | ||
| expect(packageManagerVersion).toBe(VERIFIED_STABLE_BUN); | ||
| expect(packageManagerVersion.startsWith("1.4.")).toBe(true); | ||
| }); | ||
|
|
||
| it("keeps .bun-version in lockstep with packageManager", () => { | ||
| const bunVersionPath = path.join(repoRoot, ".bun-version"); | ||
| expect(existsSync(bunVersionPath), ".bun-version exists").toBe(true); | ||
| const bunVersion = readFileSync(bunVersionPath, "utf8").trim(); | ||
| expect(bunVersion).toBe(packageManagerVersion); | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| }); | ||
|
|
||
| it("keeps every first-party GitHub Actions BUN_VERSION on the same pin", () => { | ||
| const workflowFiles = readdirSync(WORKFLOW_DIR).filter((name) => | ||
| name.endsWith(".yml"), | ||
| ); | ||
| const bunPins: string[] = []; | ||
|
|
||
| for (const fileName of workflowFiles) { | ||
| const workflow = readFileSync(path.join(WORKFLOW_DIR, fileName), "utf8"); | ||
| const matches = [...workflow.matchAll(/^\s*BUN_VERSION:\s*"([^"]+)"/gm)]; | ||
| for (const match of matches) { | ||
| bunPins.push(`${fileName}:${match[1]}`); | ||
| expect(match[1], fileName).toBe(packageManagerVersion); | ||
| } | ||
|
|
||
| if (workflow.includes("oven-sh/setup-bun")) { | ||
| expect(workflow, fileName).toContain( | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| "bun-version: ${{ env.BUN_VERSION }}", | ||
| ); | ||
| expect( | ||
| matches.length, | ||
| `${fileName} declares BUN_VERSION`, | ||
| ).toBeGreaterThan(0); | ||
| } | ||
| } | ||
|
|
||
| expect(bunPins.length).toBeGreaterThan(0); | ||
| }); | ||
|
|
||
| it("keeps bun.lock at lockfileVersion 1 for the installed Turborepo parser", () => { | ||
| const lock = parseBunLock( | ||
| readFileSync(path.join(repoRoot, "bun.lock"), "utf8"), | ||
| ) as { | ||
| lockfileVersion?: number; | ||
| configVersion?: number; | ||
| }; | ||
|
|
||
| // Turborepo 2.10.x parses bun lockfile versions 0 and 1 only. | ||
| // If Bun rewrites this file to 2 or 3, fail here until `turbo prune` | ||
| // proves the installed turbo can read it — do not guess from a changelog. | ||
| expect([0, 1]).toContain(lock.lockfileVersion); | ||
| expect(lock.lockfileVersion).toBe(1); | ||
| expect(lock.configVersion).toBe(1); | ||
| expect(packageJson.devDependencies?.turbo, "root turbo pin").toMatch( | ||
| /^\d+\.\d+\.\d+$/, | ||
| ); | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| }); | ||
|
cursor[bot] marked this conversation as resolved.
Resolved
|
||
| }); | ||
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
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.