August 5, 2026

Introducing bun, a new package manager and JavaScript runtime environment

New job? New toolset to explore! In this post I'll be investigating a new JavaScript package manager and runtime environment called bun.sh

You may have noticed on Playwright.Dev's Getting Started / Installation section there are three different ways to install a ui or api test automation framework the latest version of Playwright:
  • npm init playwright@latest
  • yarn create playwright
  • pnpm create playwright
For this blog post I'll be investigating a fourth way, the new toolset they just started using at work, bun.sh.
  • bun create playwright
When putting together a Playwright automation framework based around JavaScript and TypeScript, Playwright uses the Node.js JavaScript runtime environment, to run its test runner, execute automation scripts, and manage its browser instances.(See Nodejs.org / About )

There is a division of labor: Node.js runs Playwright's internal functions. NPM, Yarn, PNMP, and now Bun handle the packages. 

Each package manager has its own specialization. NPM is bundled already with Node.js. Yarn is a Facebook toolset that started downloading packages in parallel. PNPM has a smaller footprint. And bun is built for quick startup and installation speed, good especially if you have a CI/ CD pipeline that has a LOT of packages to install each time the tests run.

What is a package? Developing a project, you don't have to figure out how to code everything yourself. You can include in your projects outside libraries, or "packages" of code from from the public JavaScript registry npmjs.com

The problem is that these packages then need to be downloaded, installed, managed, and updated whenever there are changes. JavaScript projects can use a package manager, such as bun, to help this process.