Conversation
Unify the entire toolchain under Bun: package manager, runtime, test runner, script runner, and build system. Turborepo is retained for build orchestration and caching. **Package manager (pnpm → bun)** - Replace pnpm with bun workspaces, delete pnpm-lock.yaml/pnpm-workspace.yaml - Generate bun.lock, update all scripts from pnpm to bun **Runtime (Node.js → Bun)** - Change shebangs from #!/usr/bin/env node to #!/usr/bin/env bun - Update engines field to bun >= 1.2.0 across all packages **Build system (tsdown → tsc)** - Replace tsdown with tsc -p tsconfig.build.json for all 23 packages - Create per-package tsconfig.build.json with appropriate templates - Delete all tsdown config files **Test runner (vitest → bun:test)** - Migrate all 117 test files from vitest to bun:test API - Handle bun:test limitations: mock.module() cross-file leaking via per-package process isolation (turbo run test) and per-file isolation for @perstack/runtime - Create types/bun-test.d.ts for TypeScript support - Set up happy-dom for React component tests **Script runner (tsx → bun)** - Replace tsx with bun for validation scripts **CI/CD** - Update all GitHub Actions workflows to use oven-sh/setup-bun - Keep Node.js setup in release workflow for npm registry publishing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CI test step: use `bun run test` (turbo) instead of `bun test` directly to get per-package process isolation (prevents mock.module leaks) - knip: add entry points for create-expert-skill and runtime test files (previously discovered via tsdown/vitest plugins) - Remove unused smol-toml from root devDependencies (was used in deleted vitest.config.ts) - Add empty changeset Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI knip may not auto-discover entries from package.json bin/exports fields. Add explicit entries to ensure consistent behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Mark collectToolDefinitionsForExpert as @public (part of runtime's public API, documented in README, but not imported internally) - Previously the vitest plugin traced this through test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Root bunfig.toml: only had coverageSkipTestFiles, but CI doesn't use --coverage - packages/react/bunfig.toml: happydom preload is redundant since hook test files already import happydom directly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test files are excluded from tsconfig.json in all packages, so tsc never resolves bun:test imports. The type declarations are unnecessary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3
added a commit
that referenced
this pull request
Feb 23, 2026
The Bun migration (#599) removed actions/setup-node from the E2E workflow. MCP skills using `npx` (e.g., exa-mcp-server) need Node.js 22 — the system default on ubuntu-24.04 is too old. Additionally, the create-expert E2E test imports smol-toml directly, which needs to be a root devDependency for reliable resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2 tasks
FL4TLiN3
added a commit
that referenced
this pull request
Feb 23, 2026
The Bun migration (#599) removed actions/setup-node from the E2E workflow. MCP skills using `npx` (e.g., exa-mcp-server) need Node.js 22 — the system default on ubuntu-24.04 is too old. Additionally, the create-expert E2E test imports smol-toml directly, which needs to be a root devDependency for reliable resolution. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3
added a commit
that referenced
this pull request
Feb 23, 2026
The Bun migration (#599) removed actions/setup-node from the E2E workflow. MCP skills using `npx` (e.g., exa-mcp-server) need Node.js 22 — the system default on ubuntu-24.04 is too old. Additionally, replace direct smol-toml import in create-expert E2E test with parsePerstackConfig from @perstack/perstack-toml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3
added a commit
that referenced
this pull request
Feb 23, 2026
The Bun migration (#599) removed actions/setup-node from the E2E workflow. MCP skills using `npx` (e.g., exa-mcp-server) need Node.js 22 — the system default on ubuntu-24.04 is too old. Additionally, replace direct smol-toml import in create-expert E2E test with parsePerstackConfig from @perstack/perstack-toml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3
added a commit
that referenced
this pull request
Feb 23, 2026
The Bun migration (#599) removed actions/setup-node from the E2E workflow. MCP skills using `npx` (e.g., exa-mcp-server) need Node.js 22 — the system default on ubuntu-24.04 is too old. Additionally, replace direct smol-toml import in create-expert E2E test with parsePerstackConfig from @perstack/perstack-toml. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3
added a commit
that referenced
this pull request
Feb 24, 2026
After the bun migration (PR #599), published packages had literal "workspace:*" in dependencies because changeset publish (npm publish) does not resolve workspace protocol like pnpm did. Additionally, private devDependencies were no longer bundled into dist since tsc replaced tsdown. Changes: - Restore tsdown as the build tool for all packages - Fix workspace:* to fixed versions in published packages' dependencies - Make @perstack/skill-manager private (was incorrectly public) - Move skill-manager to runtime's devDependencies (bundled by tsdown) - Add skill-manager's transitive public deps to runtime's dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6 tasks
FL4TLiN3
added a commit
that referenced
this pull request
Feb 24, 2026
#616) * Fix: restore tsdown bundling and fix workspace:* in published packages After the bun migration (PR #599), published packages had literal "workspace:*" in dependencies because changeset publish (npm publish) does not resolve workspace protocol like pnpm did. Additionally, private devDependencies were no longer bundled into dist since tsc replaced tsdown. Changes: - Restore tsdown as the build tool for all packages - Fix workspace:* to fixed versions in published packages' dependencies - Make @perstack/skill-manager private (was incorrectly public) - Move skill-manager to runtime's devDependencies (bundled by tsdown) - Add skill-manager's transitive public deps to runtime's dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Chore: add changeset for tsdown restoration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix: add knip ignore for runtime transitive deps and bump all public packages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
FL4TLiN3
added a commit
that referenced
this pull request
Mar 3, 2026
The shebang in @perstack/base and @perstack/create-expert-skill was changed from `#!/usr/bin/env node` to `#!/usr/bin/env bun` during the Bun toolchain migration (#599). This breaks execution in environments where only Node.js is available (e.g. job executor containers), causing `/usr/bin/env: 'bun': No such file or directory`. These scripts use no bun-specific APIs and run fine under Node.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
FL4TLiN3
added a commit
that referenced
this pull request
Mar 3, 2026
* fix: add fireworks provider to Dockerfile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: restore node shebang in published bin scripts The shebang in @perstack/base and @perstack/create-expert-skill was changed from `#!/usr/bin/env node` to `#!/usr/bin/env bun` during the Bun toolchain migration (#599). This breaks execution in environments where only Node.js is available (e.g. job executor containers), causing `/usr/bin/env: 'bun': No such file or directory`. These scripts use no bun-specific APIs and run fine under Node.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: add changeset for shebang fix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
FL4TLiN3
added a commit
that referenced
this pull request
Mar 11, 2026
These files were left over from the toolchain migration to Bun (#599). The build pipeline now uses tsdown.config.ts and these are unreferenced. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
FL4TLiN3
added a commit
that referenced
this pull request
Mar 11, 2026
* chore: remove unused tsconfig.build.json files These files were left over from the toolchain migration to Bun (#599). The build pipeline now uses tsdown.config.ts and these are unreferenced. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: add empty changeset Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the entire Perstack monorepo toolchain from pnpm + Node.js + tsdown + Vitest to Bun as the unified runtime, package manager, test runner, and script runner.
pnpm-workspace.yaml,pnpm-lock.yaml, addedbun.lock)tsxdependency)tsconfig.build.json, removed alltsdown.config.ts)vitest.config.ts)#!/usr/bin/env bun)oven-sh/setup-bun@v2Key decisions
turbo run test(bun:testmock.module()is permanent within a process)@perstack/runtime(heavy mock.module usage across files)packages/react/happydom.ts)@perstack/skill-manager(bun:testmock()has no.prototype)Verification
All checks pass locally:
Test plan
bun apps/perstack/dist/bin/cli.js --helpbun apps/base/dist/bin/server.js --help🤖 Generated with Claude Code