Skip to content

Migrate from Yarn to Bun#1937

Open
Flo0807 wants to merge 20 commits intodevelopfrom
feature/bun-migration
Open

Migrate from Yarn to Bun#1937
Flo0807 wants to merge 20 commits intodevelopfrom
feature/bun-migration

Conversation

@Flo0807
Copy link
Copy Markdown
Collaborator

@Flo0807 Flo0807 commented Apr 23, 2026

Replace Yarn 1 with Bun 1.3.13 for package management and script running. Quote glob patterns in npm-run-all2 scripts for bun shell compatibility. Set minimumReleaseAge to 7 days in bunfig.toml.

  • Add bun to .tool-versions
  • Replace yarn.lock with bun.lock (both projects)
  • Add bunfig.toml with 7-day release age gate
  • Dockerfile: install bun via official script instead of yarn
  • compose.yml: use bun install --frozen-lockfile and bunx playwright
  • CI workflows: use oven-sh/setup-bun alongside setup-node
  • Update yarn commands to bun in AGENTS.md and usage_rules.md

Flo0807 added 5 commits April 23, 2026 10:32
Replace Yarn 1 with Bun 1.3.13 for package management and script
running. Quote glob patterns in npm-run-all2 scripts for bun shell
compatibility. Set minimumReleaseAge to 7 days in bunfig.toml.

- Add bun to .tool-versions
- Replace yarn.lock with bun.lock (both projects)
- Add bunfig.toml with 7-day release age gate
- Dockerfile: install bun via official script instead of yarn
- compose.yml: use bun install --frozen-lockfile and bunx playwright
- CI workflows: use oven-sh/setup-bun alongside setup-node
- Update yarn commands to bun in AGENTS.md and usage_rules.md
Also remove node from .tool-versions since Playwright only runs inside
the Docker container, which installs its own node via nodesource.
Only the test-demo job needs node on PATH (Phoenix.Test.Playwright
spawns node_modules/playwright/cli.js via its #!/usr/bin/env node
shebang). The other jobs only run bun scripts, and bun intercepts
node shebangs when executing JS.
@Flo0807 Flo0807 added dependencies Pull requests that update a dependency file ignore-for-release Should not appear in releas notes labels Apr 23, 2026
Flo0807 added 2 commits April 23, 2026 10:42
Persists Chromium downloads across container restarts so
`playwright install` doesn't redownload on every startup.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the repo’s JavaScript package management and script execution from Yarn 1 to Bun (v1.3.13), updating local dev, Docker, and CI workflows to use Bun and introducing Bun configuration to gate very new releases.

Changes:

  • Replaced Yarn commands/lockfiles with Bun equivalents (incl. adding bunfig.toml and bun.lock in root and demo/).
  • Updated Docker + Compose startup steps to install dependencies and run Playwright via Bun, including a Playwright browser cache volume.
  • Updated CI workflows to set up Bun and run JS-related scripts via Bun.

Reviewed changes

Copilot reviewed 10 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
usage_rules.md Updates documented test commands from yarn to bun run.
AGENTS.md Updates documented lint command from yarn to bun run.
.tool-versions Switches tool version tracking from Node to Bun.
bunfig.toml Adds Bun install policy (minimumReleaseAge).
bun.lock Adds Bun lockfile for root JS deps.
demo/bunfig.toml Adds Bun install policy for demo project.
demo/bun.lock Adds Bun lockfile for demo JS deps.
demo/package.json Updates scripts to use Bun and quotes run-p globs for Bun shell compatibility.
compose.yml Uses Bun for installs and Playwright; adds Playwright cache volume.
Dockerfile Installs Bun via official script; uses Bun for dependency installs during image build.
.github/workflows/elixir-main.yml Uses Bun in the Elixir mainline workflow for JS deps/linting.
.github/workflows/ci.yml Uses Bun in CI for JS deps/linting and demo Playwright execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
Comment thread Dockerfile
Comment thread compose.yml
Comment thread .github/workflows/ci.yml Outdated
- Pin oven-sh/setup-bun to commit SHA in all workflows (matches repo
  convention for action pinning)
- Clean apt lists after installing nodejs/unzip in Dockerfile
- Remove duplicate STARTUP_COMMAND_1 in compose.yml
@Flo0807 Flo0807 requested a review from pehbehbeh April 23, 2026 09:00
@Flo0807 Flo0807 self-assigned this Apr 24, 2026
@pehbehbeh
Copy link
Copy Markdown
Member

demo/.gitignore:11 still contains yarn-error.log

Comment thread Dockerfile
Comment thread demo/package.json Outdated
Comment thread demo/bunfig.toml Outdated
Flo0807 added 3 commits April 27, 2026 08:14
Bun's native parallel script runner replaces the run-p binary, so
npm-run-all2 is no longer needed.
@Flo0807 Flo0807 requested a review from pehbehbeh April 27, 2026 06:15
Comment thread demo/package.json Outdated
Comment thread demo/package.json Outdated
@Flo0807 Flo0807 requested a review from pehbehbeh April 30, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ignore-for-release Should not appear in releas notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants