Bun is a fast all-in-one JavaScript toolkit that includes a high-performance package manager. Its global content-addressable cache and hard-linking strategy make installs dramatically faster than npm or Yarn. Test your knowledge of Bun's package management vocabulary.
0 / 5 completed
1 / 5
What file format does Bun use for its lockfile by default in recent versions?
bun.lock is the text-based (TOML-like) lockfile introduced in Bun 1.1 to replace the earlier binary bun.lockb. The text format is human-readable, diff-friendly in pull requests, and is now the default. The binary bun.lockb is still supported but deprecated as the default.
2 / 5
How do you run a script defined in package.json using the Bun package manager?
bun run executes package.json scripts, similar to npm run. For convenience, Bun also allows running scripts without the run keyword — e.g., bun start — if the script name does not conflict with a built-in Bun command.
3 / 5
What does the overrides field in package.json do when used with Bun?
overrides (also supported as resolutions for Yarn compatibility) lets you pin a transitive dependency to a specific version. For example, "overrides": { "lodash": "^4.17.21" } forces every package that depends on lodash to use that version, useful for patching vulnerabilities in nested dependencies.
4 / 5
How does Bun achieve faster installs than npm or Yarn?
Bun's install speed comes from a global binary cache keyed by package tarball hash. Once a package version is cached, subsequent installs hard-link files from the cache into node_modules rather than downloading or copying them. This, combined with its Zig-based I/O and minimal syscall overhead, makes installs orders of magnitude faster than the Node.js ecosystem tools.
5 / 5
How are workspaces configured in a Bun monorepo?
Bun workspaces use the standard workspaces field in the root package.json, e.g., "workspaces": ["packages/*"]. Running bun install at the root installs all workspace dependencies and symlinks local packages into each other's node_modules, with a single shared lockfile.