Skip to content

Use Bun for packages and scripts - #235

Merged
AustinAbbott merged 2 commits into
masterfrom
claude/project-thread-kxytqy
Nov 23, 2026
Merged

AustinAbbott merged 2 commits into
masterfrom
claude/project-thread-kxytqy

Conversation

@AustinAbbott

@AustinAbbott AustinAbbott commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Requested by Austin · project thread

Summary

Bun replaces npm as the package manager and script runner. Astro and Playwright still run on Node, which .nvmrc pins as before.

  • package-lock.json → bun.lock. Bun migrated the npm lockfile, so every resolved version stays the same (for example astro 7.4.13, @playwright/test 1.65.1, sharp 0.35.5).
  • New .bun-version (1.4.4) for CI and local use. Renovate updates it like any other dependency, with no hold.
  • visual.yml keeps setup-node for the runtime, adds oven-sh/setup-bun, and uses bun install --frozen-lockfile, bunx and bun run.
  • playwright.config.ts, README.md and AGENTS.md use the Bun commands.

Bun version on Cloudflare Pages

Pages ignores .bun-version and reads only a BUN_VERSION dashboard variable. This PR does not set that variable, so Pages uses its build image's default Bun (1.4.4 today, the same as .bun-version). Cloudflare updates that default itself and gives 3 months' notice before a Bun update that may break builds. Nothing needs a manual bump.

The tradeoff: CI and Pages can briefly run different Bun versions after a Renovate bump. For a static build with a stable lockfile format, that's low risk.

Verification

  • bun install --frozen-lockfile passes, and bun pm untrusted reports no skipped install scripts.
  • bun run build produces a dist/ that is byte-for-byte identical to npm ci && npm run build on master.
  • Visual snapshot tests, CodeQL and the Cloudflare Pages preview deploy pass in CI.

Cloudflare Pages dashboard (Austin)

  1. Optional: set Build command to bun run build (Settings → Build). The current npm run build also works, because it only runs the script.
  2. Don't add BUN_VERSION.
  3. Before merging, check that the preview deploy log shows bun install in the install step.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DryVDir46sG3viwon3eY7Q

Replace npm with Bun as the package manager and script runner.
Astro and Playwright still run on Node, pinned by .nvmrc.

- Migrate package-lock.json to bun.lock (same resolved versions)
- Add .bun-version and use oven-sh/setup-bun in the visual workflow
- Use bunx/bun run in playwright.config.ts, README and AGENTS.md
- Hold Renovate bun-version updates, since Cloudflare Pages reads
  BUN_VERSION from the dashboard, not .bun-version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DryVDir46sG3viwon3eY7Q
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Deploying dev-blog with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9b397ab
Status: ✅  Deploy successful!
Preview URL: https://c752c205.dev-blog-10f.pages.dev
Branch Preview URL: https://claude-project-thread-kxytqy.dev-blog-10f.pages.dev

View logs

Pages ignores .bun-version, so pinning BUN_VERSION in the dashboard
would need a manual bump for every Bun release. Use the build image's
default Bun instead, and let Renovate update .bun-version for CI
without holding it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DryVDir46sG3viwon3eY7Q
@AustinAbbott
AustinAbbott merged commit c8e155f into master Nov 23, 2026
5 checks passed
@AustinAbbott
AustinAbbott deleted the claude/project-thread-kxytqy branch November 23, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants