build: replace Yarn with Bun as the package manager #42
No reviewers
Labels
No labels
automerge
bug
dependencies
duplicate
help wanted
invalid
lang
rust
migrations
opencode
question
security
type
documentation
type
enhancement
type
maintenance
type
refactor
vulnerability
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Personal/backstage!42
Loading…
Reference in a new issue
No description provided.
Delete branch "build/bun-package-manager"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Replaces Yarn 4.18 with Bun 1.4.4 for installing dependencies and running repository scripts. Node 22/24 remains the runtime for Backstage, Jest,
tsc, and the production backend, becausebetter-sqlite3cannot load under Bun.Refs #20
What changed
bun.lockmigrated fromyarn.lockwith Bun 1.4.4 (zero version drift),packageManager: bun@1.4.4, andtrustedDependencies: ["better-sqlite3"].yarn.lock,.yarnrc.yml, and.yarn/are removed.patches/@backstage%2Fcli-module-build@0.1.9.patch: the Backstage packager hardcodesyarn run buildfor bundled packages and copiesyarn.lockinto the dist workspace. The patch usesbun run buildand copies no lockfile.bun installfails loudly if the patch stops applying.dev,build:app,build:backend,build-image, and theplaywright.config.tsweb servers use Bun.sync:forgejostill runs beforedev..ci/bun, runsbun install --frozen-lockfile, then typecheck, lint, formatting, unit tests, frontend build, backend build, and Playwright E2E. The apt step installs onlyca-certificates,curl, andunzip: thebetter-sqlite3prebuild matches the Node 24 ABI, so no Python or compiler is needed.bun install --omit=devinstead ofyarn workspaces focus, CMD stillnode packages/backend. The image installs no Python or compiler for the same reason.nixpkgs-unstableinput supplies Bun 1.4.4; corepack is removed..gitignore, and.dockerignoreupdated.Validation
bun install --frozen-lockfilefrom an emptynode_moduleson Bun 1.4.4: 2651 packages, patch applied,better-sqlite3loads under Node 22.bun run tsc,bun run lint:all,bun run prettier:check,bun run test:ci --runInBand,bun run build:app,bun run build:backend: pass.bun run test:e2e: 5 passed (2.0m) against the fixture catalog, with the Playwright web servers started throughbun run start app/bun run start backendandchannel: 'chromium'plus the NixPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATHoverride.f1d6d1f:application-checkspassed every step, including E2E;pr-reviewpassed.yarn.lock: 0 changed packages; 13 differing names are alias/patch bookkeeping only.python3andgccremoved fromPATH:bun install --frozen-lockfileinstalled 2651 packages with the prebuiltbetter-sqlite3(nobuild/Makefile, patch applied), andbun run test:ci --runInBand,bun run build:app, andbun run build:backendpassed.bun install --omit=devon Node 24, extract bundle, startnode packages/backend --config app-config.yaml ...-> "Listening on 127.0.0.1:7107", "Serving static app content from packages/app/dist",GET /200 with the built frontend, and the ABI 137better-sqlite3binary loads.Not verified yet
backstage-cli versions:bumpis Yarn-lockfile-only in Backstage 1.56; documented in the README along withbun updateas the replacement.Merge status
application-checkspasses on5f6b081(pipeline #128), including E2E on Node 22.bun-verify,bun-push,bun-deploy) no longer match this repository: thebun-astrorule now requires an Astro config (Personal/nixos-configuration#68, deployed).martin referenced this pull request from Personal/nixos-configuration2026-11-19 19:20:05 +00:00
Status update: the chosen fix is the direct
ignored_workflowsopt-out proposed in Personal/woodpecker-extension#50, not the label-based rule exclusion.Tracking:
woodpecker.tomlhere.This PR stays blocked until #50 ships and the extension is deployed, because
bun-deployhas persistent effects.match_not_patternsand the label-rule approach are both dropped.CI is green on the pull-request pipeline.
f1d6d1f(fix(e2e): use Playwright Chromium instead of branded Chrome) passes all ofapplication-checks:The Backstage Playwright helper defaulted generated projects to the branded
chromechannel while CI installs Playwright Chromium.playwright.config.tsnow requestschannel: 'chromium'; local Nix runs still override the executable throughPLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH.The push pipeline for the same commit still fails, but only in the global
bun-verifyworkflow (Astro-oriented, injected by the sharedbun-astrorule). This is the known blocker;application-checksis repository-owned and passes. The PR stays blocked until Personal/woodpecker-extension#50 ships and Personal/nixos-configuration#68 deploys it, then #44 addswoodpecker.tomlwithignored_workflows.WIP: build: replace Yarn with Bun as the package managerto build: replace Yarn with Bun as the package managerApproach changed: narrow the shared rule instead of opting out per repository.
astro.config.*) tobun-astro.match_patterns, keepingbun.lockandpackage.json.woodpecker-extensionrelease and nowoodpecker.tomlfile are needed; #44 is closed as superseded.bun-verify, and this PR can merge.The PR body's blocking section now reflects this.
Follow-up tracked in Personal/nixos-configuration#69: all global workflows will be renamed with a
global-prefix (bun-verify→global-bun-verify,pr-review→global-pr-review, etc.).That is a separate config change and does not block this PR. If #69 lands before Personal/nixos-configuration#68, the blocked workflow names here appear as
global-bun-*; the narrow-the-rule fix is unchanged.f1d6d1f7f261ebe6cc62