Migrate CI to Bun and bump Node.js to v24 LTS#16
Merged
Conversation
Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Propose a path on moving us from nodejs to bun
Migrate CI from Node.js/npm to Bun
Mar 13, 2026
Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot
AI
changed the title
Migrate CI from Node.js/npm to Bun
Migrate CI to Bun and bump Node.js to v24 LTS
Mar 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the project’s CI pipeline and contributor guidance toward Bun-based installs/runs, while standardizing the minimum Node.js version expected by the repo and updating related tooling artifacts.
Changes:
- Switched GitHub Actions CI to
oven-sh/setup-bun+bun install --frozen-lockfileandbun runfor lint/typecheck/tests. - Updated Node.js baseline to 24 (package
engines, Docker debug image), and added Bun-specifictrustedDependencies. - Added a Bun lockfile and a migration report documenting the rationale/benchmarks.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Runs CI steps using Bun (setup, install, lint, typecheck, test). |
package.json |
Enforces Node >= 24 and configures Bun trustedDependencies. |
docs/development.md |
Updates prerequisites/install instructions to recommend Bun and document Node 24. |
docker/electron-debug/Dockerfile |
Updates Electron debug container base image to Node 24. |
bun.lock |
Adds Bun lockfile for reproducible installs under Bun. |
BUN_MIGRATION_REPORT.md |
Adds research/benchmark report and migration guidance for Bun adoption. |
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "24" |
Comment on lines
+99
to
+102
| #### 4. `dev:harness` and `sync:github-project` scripts | ||
|
|
||
| These use `node scripts/...` in the `package.json` `scripts` block. They work with `bun run` today (Bun delegates to the `node` wrapper). Optionally they can be updated to `bun scripts/...` for consistency. | ||
|
|
| # Alternatively (npm) | ||
| npm install | ||
| ``` | ||
|
|
Comment on lines
+77
to
+82
| By default Bun sandboxes lifecycle scripts for security. Two transitive dependencies required postinstall steps: | ||
|
|
||
| - `onnxruntime-node@1.21.0` — downloads platform ONNX Runtime binaries | ||
| - `protobufjs@7.5.4` — compiles native bindings | ||
|
|
||
| **Resolution:** Added `trustedDependencies` to `package.json` (committed). Bun reads this field and auto-runs the allowed lifecycle scripts without any interactive prompt. This is the idiomatic Bun solution and is ignored by npm. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Node.js 20 is approaching EOL. CI install overhead via
npm ciis wasteful. This PR migrates the toolchain to Bun and standardizes on Node.js 24 LTS (Krypton) everywhere.CI: Node/npm → Bun
Replaces
actions/setup-node@v4+npm ciwithoven-sh/setup-bun@v2+bun install --frozen-lockfile, pinned to Bun 1.3.10.Measured install speedup: warm-cache
npm ci~7.8 s →bun install~13 ms (~600×). Cold install: 7.4 s → 4.7 s.Node.js v24 bump
docker/electron-debug/Dockerfile:node:22-bookworm-slim→node:24-bookworm-slimpackage.json: adds"engines": { "node": ">=24" }docs/development.md: prerequisite updated to Node.js 24 LTS (Krypton)Supporting config
bun.lockcommitted (text format, Bun ≥1.2)package.json: addstrustedDependenciesforonnxruntime-nodeandprotobufjs— required to allow their postinstall scripts under Bun's security sandboxResearch
Full compatibility analysis, benchmark data, and migration notes in
BUN_MIGRATION_REPORT.md. All 115 unit tests pass unchanged under Bun.Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.