ランタイムとしてのBun、パッケージマネージャー、バンドラー、テストランナー。Bun対Nodeを選択する場合、移行メモ、Vercelサポート。
d8409a4Bunは高速なオールインワンJavaScriptランタイムとツールキット:ランタイム、パッケージマネージャー、バンドラー、テストランナー。
使用時期:Bunを採用、Nodeから移行、Bunスクリプト/テストを書いたりデバッグしたり、Vercelまたは他のプラットフォームでBunを構成する場合。
bun installはnpm/yarnよりも大幅に高速です。ロックファイルはbun.lock(テキスト)(デフォルト)。古いバージョンはbun.lockb(バイナリ)を使用しました。bun test。Nodeからの移行:node script.jsをbun run script.jsまたはbun script.jsに置き換えます。npm installの代わりにbun installを実行します。ほとんどのパッケージは機能します。npm スクリプトにはbun runを使用します。bun xをnpxスタイルの1回限りの実行に使用します。Nodeの組み込みはサポートされています。パフォーマンスの向上のため、Bunチャネルが存在する場合は優先。
Vercel:プロジェクト設定でBunに設定をランタイムに設定します。ビルド:bun run buildまたはbun build ./src/index.ts --outdir=dist。インストール:再現可能なデプロイの場合はbun install --frozen-lockfile。
# 依存関係をインストール(bun.lockまたはbun.lockbを作成/更新)
bun install
# スクリプトまたはファイルを実行
bun run dev
bun run src/index.ts
bun src/index.ts
bun run --env-file=.env dev
FOO=bar bun run script.ts
bun test
bun test --watch
// test/example.test.ts
import { expect, test } from "bun:test";
test("add", () => {
expect(1 + 2).toBe(3);
});
bun installはnode_modulesを作成しますが、シンボリックリンクの多用により構造が異なります。Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/bun-runtime · pinned to the source commit
git clone https://github.com/affaan-m/ECC.git
cd ECC
git checkout d8409a4b0813771235555e32e3d8046a73988bfa
mkdir -p ".claude/skills/bun-runtime"
cp -r "docs/ja-JP/skills/bun-runtime" ".claude/skills/bun-runtime"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit d8409a4b0813. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint e9cbb0224c4a3d23
Instructs shell/process/package operations that run commands on the host.
Evidence: npm install· fingerprint 3a2dc0ae21eb56d7