Skip to content

📦 Feat/use bun as package manager#1786

Closed
adriangohjw wants to merge 37 commits intomainfrom
feat/use-bun
Closed

📦 Feat/use bun as package manager#1786
adriangohjw wants to merge 37 commits intomainfrom
feat/use-bun

Conversation

@adriangohjw
Copy link
Copy Markdown
Contributor

@adriangohjw adriangohjw commented Dec 19, 2025

Problem

As part of learning month, im experimenting the use of bun as a package manager to improve DX (faster install time) as well as faster CI (on average 1.5mins saved per action). This will also translate to better codebuild time (if cold build)

Reference:

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
    • Details ...
  • No - this PR is backwards compatible

Features:

  • Migrate from npm to bun as a package manager
    • note: and because this is a fresh install, we fixed the issue of unable to upgrade packages. dependeabot SHOULD also work now

Benchmarking from root package (locally on my macbook)

package install time taken (fresh install) time taken (cached install)
npm 1min 30 seconds 11 seconds
bun 9 seconds 1 second

*Setup stage on every CI action

package install time taken
npm 1min 40 seconds
bun 14 seconds

*Codebuild (cold build without cache)

package install time taken
npm 110 seconds
bun 60 seconds

Note

This also opens up the possibility for us to use catalogs and minimumReleaseAge (better protection against supply chain attack)

before

91 vulnerabilities (5 low, 25 moderate, 45 high, 16 critical)

After (WIP)

note: more in #1796

33 vulnerabilities (1 critical, 17 high, 10 moderate, 5 low)

Note

Medium Risk
Broad tooling and build pipeline migration (CI + Docker + lockfile) plus large dependency bumps could introduce install/build regressions or runtime incompatibilities despite limited app-logic changes.

Overview
Switches the repo’s package manager from npm to bun end-to-end: CI workflows, the shared GitHub Action setup, Chromatic builds, and docs now use bun/bunx, with caching and Dependabot updated to track bun.lock.

Updates local/dev environments to match (devcontainer installs Bun; Studio Docker build moves to node:22-slim and installs Bun/Turbo; removes apps/studio/render.yaml). Studio scripts are adjusted for bunx, next.config.mjs adds serverExternalPackages, and apps/studio/package.json refreshes a large set of dependencies plus regenerates vendored assets (mockServiceWorker.js, preview-tw.css).

Written by Cursor Bugbot for commit bba6385. This will update automatically on new commits. Configure here.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Dec 19, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitest/​coverage-istanbul@​2.1.2 ⏵ 2.1.99910067 -198 -1100
Updatedmsw-storybook-addon@​2.0.4 ⏵ 2.0.610010069 +185 -1100
Updated@​tiptap/​extension-text@​2.9.1 ⏵ 2.27.11001006998 -1100
Updated@​tiptap/​extension-document@​2.9.1 ⏵ 2.27.11001006998 -1100
Updated@​chakra-ui/​theme-tools@​2.2.7 ⏵ 2.2.9100 +110069 +183100
Updated@​react-stately/​checkbox@​3.7.2 ⏵ 3.7.3100 +110070 +197 +180
Updated@​react-stately/​toggle@​3.9.2 ⏵ 3.9.31001007097 +180
Updatedtailwindcss-react-aria-components@​1.1.4 ⏵ 1.2.0100 +110071 +396 +1100
Updated@​tanstack/​react-query-devtools@​5.85.3 ⏵ 5.91.2100 +110071 +397 +1100
Updated@​tiptap/​extension-table-row@​2.9.1 ⏵ 2.27.11001007198 -1100
Updated@​react-aria/​button@​3.14.2 ⏵ 3.14.31001007197 +180
Updated@​tiptap/​extension-dropcursor@​2.9.1 ⏵ 2.27.11001007198 -1100
Updated@​chakra-ui/​utils@​2.2.3 ⏵ 2.2.51001007183100
Updated@​react-aria/​checkbox@​3.16.2 ⏵ 3.16.3991007297 +180
Updated@​tiptap/​extension-gapcursor@​2.9.1 ⏵ 2.27.11001007298 -1100
Updated@​react-aria/​textfield@​3.18.2 ⏵ 3.18.3100 +11007297 +1100
Updated@​tiptap/​extension-list-item@​2.9.1 ⏵ 2.27.11001007298 -1100
Updated@​tiptap/​extension-paragraph@​2.9.1 ⏵ 2.27.11001007298 -1100
Updated@​tiptap/​extension-table-header@​2.9.1 ⏵ 2.27.11001007298 -1100
Updated@​tiptap/​extension-table-cell@​2.9.1 ⏵ 2.27.11001007298 -1100
Updated@​tiptap/​extension-history@​2.9.1 ⏵ 2.27.11001007398 -1100
Updated@​tiptap/​extension-underline@​2.9.1 ⏵ 2.27.11001007398 -1100
Updated@​tanstack/​react-table@​8.21.2 ⏵ 8.21.310010073 +185100
Updated@​tiptap/​extension-subscript@​2.9.1 ⏵ 2.27.11001007398 -1100
Updated@​tiptap/​extension-superscript@​2.9.1 ⏵ 2.27.11001007398 -1100
Updated@​next/​eslint-plugin-next@​14.2.13 ⏵ 14.2.351001007399100
Updated@​babel/​preset-typescript@​7.27.1 ⏵ 7.28.51001007388100
Updated@​tiptap/​extension-hard-break@​2.9.1 ⏵ 2.27.1100 +110073 +398100
Updated@​tiptap/​html@​2.9.1 ⏵ 2.27.1100 +110073 +3100 +1100
Updated@​types/​pg@​8.11.6 ⏵ 8.16.0100 +110073 +190100
Updated@​tiptap/​extension-bullet-list@​2.9.1 ⏵ 2.27.11001007398 -1100
Updated@​types/​request@​2.48.12 ⏵ 2.48.131001007381100
See 99 more rows in the dashboard

View full report

… bunx in /usr/local/bin for accessibility in child shells
…bc installation and adjusting bun ci command
@adriangohjw
Copy link
Copy Markdown
Contributor Author

note: bunx (or Bun in general) has some compatibility issues with Alpine Linux because Alpine uses musl libc instead of glibc, and Bun is built against glibc. So running Bun in a plain alpine image usually fails.

@adriangohjw adriangohjw marked this pull request as draft February 19, 2026 06:55
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

* chore: update dependencies across multiple packages for improved stability and performance

* chore: remove unused npx dependency and update agentkeepalive and ansi-regex versions in bun.lock and package.json

* update bun.lock

* chore: update dependencies for @chakra-ui and sherif in bun.lock and package.json

* chore: update dependencies for @aws-sdk, @CASL, pg, and rollup across multiple package.json files

* update turbo

* patch lodash-es

* upgrade next to 15.5.10

* upgrade aws SDK to fix fast-xml-parser high vulnerabilities

* bump lodash
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.

1 participant