bun-workspaces has been deprecated and is now developed as pacwich, which supports Bun, npm, and pnpm workspaces, with a mostly backwards compatible CLI and API. Users can expect little to no disruption beyond the package name change and config file name changes.
A full migration guide covering all differences between the packages is available at https://pacwich.dev/intro/bun-workspaces-migration
Installation docs are available at https://pacwich.dev/intro/getting-started
You can also instruct an LLM agent to read https://pacwich.dev/intro/bun-workspaces-migration/index.md to assist with migration.
Read the launch blog post about the motivations and development strategy.
bun-workspaces will not receive further releases save for critical security patches, if necessary. This website will stay up at least through 2026. Once decommissioned, documentation will be consolidated to the package README.
Configuration is set by JSON. Config files can be written in TypeScript, JavaScript, JSON, or JSONC.
See Root Configuration and Workspace Configuration for more information on the purpose of each field.
The root configuration is for project-wide settings.
// path/to/your/project/bw.root.ts
import { defineRootConfig } from "bun-workspaces/config";
export default defineRootConfig({
defaults: {
parallelMax: 4,
shell: "system",
includeRootWorkspace: false,
affectedBaseRef: "my-branch"
},
workspacePatternConfigs: [
{
patterns: [
"path:libraries/frontend/**/*"
],
config: {
tags: [
"frontend",
"library"
]
}
}
]
});
Workspace configurations are defined in the directory of a workspace.
// path/to/your/project/workspace/bw.workspace.ts
import { defineWorkspaceConfig } from "bun-workspaces/config";
export default defineWorkspaceConfig({
alias: "myApp",
tags: [
"my-tag"
],
scripts: {
start: {
order: 10
},
test: {
order: 20
}
},
rules: {
workspaceDependencies: {
allowPatterns: [
"my-workspace-a",
"tag:my-tag",
"path:my-path/**/*",
"not:tag:my-excluded-tag"
]
}
}
});
Configuration files can be read from the following location. The first to be resolved in this order will be used:
bw.<name>.tsbw.<name>.jsbw.<name>.jsoncbw.<name>.jsonpackage.json["<key>"]Values related to configuration are resolved in the following order of precedence: