Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

bun-workspaces

БесплатноБез исполняемых скриптовНе проверен

Current Bun workspace guidance for isolated and hoisted linkers, catalogs, filters, scripts, dependency classes, lockfiles, lifecycle trust, caches…

shepherdjerredот shepherdjerred★ 85 звёзд на GitHub

Об этом скилле

Bun Workspaces

Use one root workspace and lockfile, resolve internal packages through workspace:* links and package exports, and choose script scheduling from dependency order and task lifetime. Do not hide packaging errors with TypeScript source aliases.

Current baseline

Verified against Bun 1.3.14 on 2026-08-03:

bun --version

New workspace projects with lockfile configVersion = 1 default to the isolated linker. Existing and migrated projects preserve historical linker choices. Bun 1.3.14 adds an experimental isolated-linker global virtual store that is off by default.

Read references/releases.md for the 49-page research ledger. Read references/linkers-dependencies-and-lockfiles.md for linker, store, catalogs, dependency classes, lifecycle trust, and migration. Read references/scripts-builds-and-publishing.md for filters, scheduling, package exports, TypeScript, CI, containers, audit, pack, and publish.

Workspace declaration

The root owns the workspace patterns and shared lockfile:

{
  "private": true,
  "workspaces": {
    "packages": ["packages/*"],
    "catalog": {
      "typescript": "^7.0.0"
    },
    "catalogs": {
      "testing": {
        "@types/bun": "latest"
      }
    }
  }
}

catalog: resolves the singular default catalog. A named catalog entry uses catalog:name. Do not put a named default group under catalogs and reference it as bare catalog:.

Internal package dependency:

{
  "dependencies": {
    "@example/shared": "workspace:*"
  }
}

Bun rewrites workspace and catalog protocols appropriately during publication.

Linker selection

Project Default/behavior
New workspace with current lockfile config Isolated linker
New single-package project Hoisted linker
Existing/pre-1.3.2 project Preserves historical hoisted behavior unless changed
npm/yarn migration Preserves hoisted model
pnpm migration Uses isolated model

Set the linker explicitly when deterministic strictness is required:

[install]
linker = "isolated"

Isolated installs prevent phantom dependencies and create peer-set-specific package identities. Test tools and bundlers against the real layout; do not depend on accidental hoisting.

Cache versus global store

The global cache at ~/.bun/install/cache stores fetched package content and metadata. The experimental global virtual store is different: it is isolated-linker-only, disabled by default, and symlinks projects through the cache's links area.

[install]
globalStore = true

Keep this setting machine-local unless the repository has revalidated parallel CI behavior. General upstream race-safety claims do not supersede the repository's known shared-store CI constraint.

Dependencies

Bun installs peer and optional dependencies by default. peerDependenciesMeta.optional means a peer may be absent; it does not force installation.

bun add --cwd packages/shared lodash
bun add --cwd packages/plugin --peer react
bun add --cwd packages/tool --optional native-addon

bun add does not have --filter; use --cwd or run from the package directory. Use omit flags only when the install contract intentionally excludes peer/optional packages.

Lockfile and CI

bun.lock is the authoritative text lockfile. Use:

bun ci

bun ci is the concise frozen install. bun install --lockfile-only skips node_modules installation but writes the lockfile and can populate global cache metadata or Git/tarball dependencies.

Yarn v1 lockfile printing creates an interoperability artifact on every install; do not make it a generic default.

For bun.lockb migration, generate and inspect bun.lock, run a clean frozen install and focused verification, then remove the preserved binary source lockfile. Automatic migration occurs only when bun.lock is absent.

Lifecycle trust

Dependency lifecycle scripts are allow-listed. trustedDependencies replaces Bun's built-in trusted list rather than extending it; an empty list trusts none. Non-registry sources require explicit trust.

--ignore-scripts disables project and trusted dependency lifecycle scripts. In bunfig, use ignoreScripts; there is no documented lifecycle = ["postinstall"] policy setting.

Review untrusted scripts before enabling them:

bun pm untrusted
bun pm trust <package>

Script scheduling

Filtered finite scripts honor workspace dependency order; independent packages can overlap. Keep local builds focused:

bunx turbo run build --filter=<workspace>

At this monorepo's root, use bunx turbo run build for repo-wide and focused builds so dependencies run in task-graph order. Never use bun run --filter '*' build here: bypassing the bounded Turbo task graph can launch thousands of processes and exhaust the ma

Полный SKILL.md на GitHub

Установить bun-workspaces в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/linkers-dependencies-and-lockfiles.mdreferences/releases.mdreferences/scripts-builds-and-publishing.md

FAQ

Что делает скилл bun-workspaces?

Current Bun workspace guidance for isolated and hoisted linkers, catalogs, filters, scripts, dependency classes, lockfiles, lifecycle trust, caches, publishing, TypeScript package exports, and containers. Use when configuring or reviewing a Bun monorepo.

Как установить скилл bun-workspaces?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bun-workspaces запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bun-workspaces с