Why Bun Fits Modern JavaScript Tooling
Bun is gaining traction because it reduces JavaScript tooling friction: faster installs, built-in TypeScript support, a test runner, audits, and fewer moving parts.
JavaScript tooling has always had a coordination problem.
One tool runs scripts. Another installs packages. Another runs tests. Another bundles code. Another handles TypeScript. Another audits dependencies. Each tool can be good on its own, but the full setup often feels heavier than the app it supports.
That is the reason Bun is interesting.
Bun is not just a package manager. It is a runtime, package manager, test runner, bundler, and script runner shipped as one executable. That changes the developer experience because fewer pieces need to agree with each other before the project feels productive.
For a small portfolio project, that matters. I want the project to be easy to install, easy to test, easy to build, and easy to explain. Bun helps with that.
npm Is Universal, But Not Fast
npm is still the default many developers reach for because it ships with Node.js. That default matters. It works almost everywhere, most package documentation includes npm commands, and almost every JavaScript developer has used it.
The downside is speed and ergonomics.
npm has improved over the years, but it still tends to feel slower during installs and script-heavy workflows. On a project where dependencies are installed in CI, local cleanups, and fresh agent environments, that time adds up. Slow installs also make cleanup less appealing. If reinstalling dependencies feels expensive, people avoid doing it until they have to.
Bun's package manager is built around fast installs, a global cache, workspaces, overrides, and audits. The official docs describe bun install as a fast replacement for npm, yarn, and pnpm, with installs up to 30 times faster than npm.
Even if real-world numbers vary by project, the practical effect is clear: fresh installs feel cheap enough to do often.
That changes behavior.
pnpm Is Excellent, But Bun Is Broader
pnpm deserves a lot of credit. Its content-addressable store, strict dependency model, and workspace support make it a strong choice, especially for large monorepos. If I were managing a large multi-package workspace with many teams, pnpm would still be near the top of the list.
But pnpm is mainly a package manager.
Bun is trying to reduce the number of tools needed around the package manager. In this repo, Bun installs packages, runs scripts, runs tests, executes TypeScript scripts, audits dependencies, and powers local automation. That means the workflow can stay small:
bun install
bun run healthcheck
bun run build
bun auditThere is value in that simplicity. A new contributor does not need to learn a separate test runner command, a separate package runner, and a separate script execution story. Bun becomes the common entry point.
That does not make pnpm bad. It means Bun is a better fit when the goal is an integrated toolkit instead of a package-manager-only swap.
TypeScript Without Extra Ceremony
One of Bun's best quality-of-life features is direct TypeScript and JSX execution.
That matters for repo scripts. This project has scripts like scripts/clean.ts, scripts/new-problem.ts, and scripts/check-staged.ts. With Bun, those can stay as TypeScript files and run directly:
bun scripts/check-staged.tsNo separate ts-node setup. No build step for local scripts. No extra runtime dependency just to automate the repo.
That keeps scripts closer to application code. They can use types, modern syntax, and normal imports without turning simple automation into a tooling project.
The Test Runner Is Part of the Story
Bun also ships with a built-in test runner.
The docs describe it as Jest-compatible and TypeScript-first, with support for lifecycle hooks, mocks, snapshots, DOM testing, watch mode, and CI output. For this project, the value is not that Bun replaces every advanced test setup. The value is that it handles the current test needs without adding another dependency.
That keeps the feedback loop short:
bun testThe less ceremony around tests, the more likely they are to run. That is the same reason fast formatters and linters matter. Quality gates only work when they are cheap enough to use constantly.
Security and Overrides Are Built In
The dependency work we did recently made another Bun feature feel important: bun audit.
It checks the locked dependency graph for known advisories and exits non-zero when vulnerabilities are found. That makes it easy to include in a release checklist without adding another tool.
Bun also supports top-level overrides, which is useful when a direct dependency still pulls a vulnerable transitive package. That should be temporary, not a habit. But when a security advisory exists and upstream has not caught up yet, an override can keep the project moving while still documenting the pin.
That is exactly the kind of practical escape hatch I want in a project toolchain.
Why Bun Is Gaining Popularity
Bun is gaining attention because it makes common JavaScript tasks feel less fragmented.
The pitch is not only "faster installs." Speed is part of it, but the bigger story is cohesion. Bun gives developers one command surface for runtime execution, package management, tests, scripts, and builds. It supports modern TypeScript workflows without extra layers. It keeps improving Node.js compatibility. It also keeps adding batteries-included features that reduce dependency sprawl.
That combination is attractive because most teams are tired of wiring tools together.
For this portfolio project, Bun is a good match because the repo values simple, visible workflows:
bun installfor dependencies.bun run healthcheckfor quality gates.bun testfor behavior.bun auditfor dependency security.bun run buildfor production confidence.
That is easy to remember and easy to teach.
Where I Would Be Careful
Bun is not the automatic answer for every project.
If a team has a mature pnpm monorepo with custom workspace flows, there may be no reason to switch. If a production system depends on obscure Node.js edge cases, compatibility should be tested first. If a package ecosystem assumes npm-specific behavior, migration should be gradual.
Tools are not identities. They are tradeoffs.
The reason I like Bun here is that the tradeoff is favorable. The project gets faster installs, simpler scripts, built-in tests, dependency audits, and TypeScript-friendly automation without a large tooling stack.
That is enough.
Wrap Up
Bun is better than npm for this kind of project because it is faster and more complete. It is more compelling than pnpm here because it solves more than package installation. It gives the repo one small command surface for the daily work of building, testing, checking, and maintaining a TypeScript app.
That is why Bun feels like a good fit for modern JavaScript tooling.
The best tools reduce the amount of coordination the developer has to do. Bun does that by pulling several common jobs into one fast runtime. For this repo, that means less setup, fewer dependencies, and a workflow that is easier to keep green.