ecc-bun-runtime

Guides adoption, debugging, and migration of Bun runtime scripts, tests, and package management.

Updated Apr 18, 2025
One-click install
npx skills add https://github.com/adriancodes/dotfiles --skill ecc-bun-runtime-adriancodes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ecc-bun-runtime
Source: https://github.com/adriancodes/dotfiles/tree/main/dot_agents/skills/ecc-bun-runtime
Command: npx skills add https://github.com/adriancodes/dotfiles --skill ecc-bun-runtime-adriancodes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers adopting or debugging the Bun runtime often lack clear guidance on its runtime APIs, package manager, bundler, test runner, and how to migrate from Node without breaking existing toolchains. ## Core Features & Use Cases - Runtime and API Guidance: Explains Bun's Node-compatible runtime, native APIs like Bun.file and Bun.serve, and compatibility gaps to check. - Package Management and Tooling: Covers bun install, lockfile handling (bun.lock vs bun.lockb), bun run scripts, and bun test with its Jest-like API. - Node Migration and Deployment: Provides steps for requested Node-to-Bun migrations and Bun configuration on platforms like Vercel. - Use Case: When asked to migrate a Node project to Bun, follow the reference to replace npm install with bun install, swap node script.js for bun run script.js, and verify tests with bun test. ## Quick Start Ask the assistant to review your project and migrate its Node scripts and tests to the Bun runtime using this reference.

Frequently Asked Questions about ecc-bun-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate a project from Node to Bun?▼

Replace node script.js with bun run script.js or bun script.js, and run bun install instead of npm install. Most packages work directly, Node built-ins are supported, and you can use bun x for npx-style one-off runs after checking compatibility.

How do I run tests with Bun?▼

Use bun test, which provides a Jest-like API with imports from bun:test. Reuse existing project test cases rather than creating trivial tests, and use watch mode only in a supervised process.

When should I prefer Node over Bun?▼

Prefer Node when you need maximum ecosystem compatibility, rely on legacy tooling that assumes Node, or depend on a package with known Bun issues. Bun has API and native-addon compatibility gaps since it is built on JavaScriptCore.

Does Bun work with Vercel deployments?▼

Yes, a separately authorized deployment setup can select the supported Bun runtime in Vercel project configuration. Use bun run build or bun build for builds and bun install --frozen-lockfile for reproducible deploys.

What is the difference between bun.lock and bun.lockb?▼

bun.lock is the text-based lockfile used by default in current Bun versions, while bun.lockb is the binary format used by older versions. Preserve whichever lockfile the project uses and include intended changes in the requested patch.