Skip to content

refactor: migrate monorepo to bun v1.3.x#480

Merged
alanrsoares merged 20 commits intomainfrom
refactor/bun-migration
Nov 18, 2025
Merged

refactor: migrate monorepo to bun v1.3.x#480
alanrsoares merged 20 commits intomainfrom
refactor/bun-migration

Conversation

@alanrsoares
Copy link
Contributor

@alanrsoares alanrsoares commented Nov 18, 2025

Summary

Migrates the entire monorepo from pnpm + Node to Bun v1.3.x.

This includes:

  • Updating all GitHub Actions workflows to use oven-sh/setup-bun and replace pnpm commands with bun equivalents.
  • Switching test, build, and migration scripts to bun run.
  • Updating local dev tooling (Tiltfile, Husky, lint-staged) to use Bun.

Screenshot 2025-11-18 at 3 22 38 PM

@netlify
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for dither-staging ready!

Name Link
🔨 Latest commit 1d5b836
🔍 Latest deploy log https://app.netlify.com/projects/dither-staging/deploys/691cc73b17bceb000877ff04
😎 Deploy Preview https://deploy-preview-480--dither-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@alanrsoares alanrsoares marked this pull request as ready for review November 18, 2025 03:34
@salmad3
Copy link
Contributor

salmad3 commented Nov 18, 2025

Didn't we want to use bun and pnpm?

@salmad3 salmad3 moved this from Ready to Build to Beta / Preview in Dither Community Board Nov 18, 2025
@alanrsoares
Copy link
Contributor Author

Didn't we want to use bun and pnpm?

We could, but it wouldn't have any benefit since we already have the bun toolchain.

@mazzy89
Copy link

mazzy89 commented Nov 18, 2025

The most noticeable things that has changed for my eyes was the dist dir replaced by src. What is the matter there?

@jeronimoalbi
Copy link
Member

Tried to run bun test in packages/api-main/ and tests failed:

SyntaxError: Export named 'assert' not found in module 'bun:test'.

@alanrsoares
Copy link
Contributor Author

Tried to run bun test in packages/api-main/ and tests failed:

SyntaxError: Export named 'assert' not found in module 'bun:test'.

bun test uses the bun native test runner, our test suit is built with vitest, so you need to use bun run test to actually hit the correct npm script in package.json

alanrsoares and others added 3 commits November 19, 2025 08:21
Co-authored-by: Jerónimo Albi <894299+jeronimoalbi@users.noreply.github.com>
Co-authored-by: Jerónimo Albi <894299+jeronimoalbi@users.noreply.github.com>
Co-authored-by: Jerónimo Albi <894299+jeronimoalbi@users.noreply.github.com>
@alanrsoares
Copy link
Contributor Author

The most noticeable things that has changed for my eyes was the dist dir replaced by src. What is the matter there?

Using bun as the runtime, code collocation in the monorepo doesn't require any build step, so the modules can be server from the ts source directly.

@mazzy89
Copy link

mazzy89 commented Nov 18, 2025

The most noticeable things that has changed for my eyes was the dist dir replaced by src. What is the matter there?

Using bun as the runtime, code collocation in the monorepo doesn't require any build step, so the modules can be server from the ts source directly.

Does this work natively with Netlify? At the moment it expects dist as the directory. It is defined in the settings.

@alanrsoares
Copy link
Contributor Author

The most noticeable things that has changed for my eyes was the dist dir replaced by src. What is the matter there?

Using bun as the runtime, code collocation in the monorepo doesn't require any build step, so the modules can be server from the ts source directly.

Does this work natively with Netlify? At the moment it expects dist as the directory. It is defined in the settings.

We still build the frontend since it runs on the client, it can't be raw typescript. Everything else that runs on the server can be typescript native.

@github-project-automation github-project-automation bot moved this from Beta / Preview to Launch Prep in Dither Community Board Nov 18, 2025
@alanrsoares alanrsoares merged commit ba4076d into main Nov 18, 2025
18 checks passed
@github-project-automation github-project-automation bot moved this from Launch Prep to Done in Dither Community Board Nov 18, 2025
@alanrsoares alanrsoares deleted the refactor/bun-migration branch November 18, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants