Nicolas VenturaAboutPublicationsGamesPhotosTools

Switching from npm to Bun

When I first heard of Bun, I thought, "it's just another one of the hundreds of JavaScript frameworks out there." And it is, sort of. So why is there so much hype? At least, relatively. If you're not a computer nerd, you probably think I'm talking about rolls of bread. It does have a fun name.

The Twins

Up until recently, I had 2 public repositories for various projects: Tools (accessible via tools.nicfv.com) and Games (via games.nicfv.com). Despite the fact that "tools" and "games" are very different pieces of software, the repositories were more or less identical to each other. Both of them depended on npm, NodeJS, TypeScript, eslint, and WebPack. I've learned that this is a very typical NodeJS setup. In addition, both of them had practically identical GitHub workflows for building, packaging, and publishing updates to GitHub Pages.

Managing 2 identical repositories isn't that big of a hassle, but I'm someone that hates duplicating work when not necessary. I'll automate the crap out of something, spending hours doing it just to save a few seconds here and there. I know, illogical. Anyway, an idea I had for some time is to combine them into a single repository. That way, when updates get rolled out for Typescript, or other dependencies, I can apply them once which will propagate to all of my subprojects.

New Repo

The first step was coming up with a name. In the recent months, I've decided to stop all my creative thinking and offload it to AI. That way, I can hold the things that really matter in my brain, like Pokemon evolutions. Smart, right? I had a chat with Google Gemini and it suggested a few names, my top contenders were:

As a certified fan of short domain names, I decided on the 3-letter app name. It's specific enough to know what is contained in the website, but general enough to know that it's not just games or tools.

The Merge

The next step was to actually bring the code (and commit history) in from both of my previous repositories. I used the same method from my GitHub Repository Cleanup story to achieve this. Once all my code was in one place, I then went through my steps from converting all my packages into one npm monorepo to turn all of my packages into workspaces and depend on one singular dependency file. Once that was complete, I could get a taste of the Bun.

Taking the Bun out of the Oven

I was extremely hesitant to try this out. I had a long conversation with Google Gemini about making the switch from the classic npm, NodeJS, etc. stack over to Bun. It turns out, Anthropic acquired Bun recently and depends on it for their own software, so Bun is backed by a major funding source and isn't going anywhere anytime soon.

In the end, making the switch was relatively simple. I had to learn a new tool with new commands, sure, but AI did all the learning for me. Isn't that what AI is for nowadays?

Challenges

In honesty, there was some difficulty getting Bun up and running with legacy npm workspaces, and that's mainly due to how the Bun commands are formed. Bun adds a --filter flag when running commands in its workspaces, and I remember Bun could not find any of my workspaces using --filter='*' but unfortunately I cannot remember how I fixed it. Currently, my command looks like this:

bun --filter='*' start prod

Where start prod is the workspace command.

And this is what my workspaces look like:

"workspaces": [
  "www/**/*"
]

The trickiest part of the whole process was actually merging the GitHub workflows, so it wasn't related to Bun at all. The way I wanted my repository set up is that any push to main would have to be submitted as a pull request and approved. But, the pull request should only be approved when the build was successful. And, I only want to publish to GitHub pages when the pull request was approved and merged. Since I wanted to run the build essentially on every push, including merged pull requests, I could have created two separate, but nearly identical actions, both which would install dependencies and build my projects. But you know me by now! I want to reuse my code, no matter how insignificant. So, I created a single workflow which handles the building and will only publish if merged to main. For this I had to add this line to my deploy job:

if: github.event_name == 'push' && github.ref == 'refs/heads/main'

Courtesy of your friendly neighborhood AI.

Why

The main reason I made the switch is not because of the speedups they claim to have. Every software out there claims to have the best performance. I don't really care about that. I want ease of use, with extended customization options. And stability! The main reason was the fact that this single software, Bun, claims to replace the entire NodeJS stack, including many popular frameworks, like React.

So, I went from this:

To this:

Believe me. I was so frustrated to learn that Bun doesn't natively support linting. There's currently an open issue in the Bun issues page requesting the feature, but who knows if it will ever be implemented. With Anthropic's vast pool of AI resources, you'd think this would be an easy task for them to handle.

I guess GitHub Actions is sort of a dependency as well. But that wouldn't go away regardless of what tool I use, unless I decide to self-host my website, but I think I would still need Actions anyway.

Conclusion

I turned from being a skeptic to having fun in the Bun. I wouldn't have been able to make the switch so easily if I wasn't using a typical NodeJS "stack" to begin with. There's also a handful of features that I'm disappointed are not part of Bun currently, but they might be on Anthropic's roadmap. The community base seems to be growing as well, which is a good sign for software these days.

In the end, I was able to consolidate my 2 repositories into a single "Apps" repository. All of my tools are now live at app.nicfv.com/tools/<name>/ and all of my games are available at app.nicfv.com/games/<name>/. They are also linked in the navigation in my website for easy access. Now you know that their code lives in the same home!

Published on 28 January 2026. Go back to all posts.