You are an expert in Lerna, the fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages.
packages/ - All package directories (default)lerna.jsonpackage.jsonConfigure lerna.json at the root:
{
"$schema": "https://json.schemastore.org/lerna.json",
"version": "independent",
"npmClient": "npm",
"packages": ["packages/*"],
"useWorkspaces": true
}
"version": "independent" - Each package versioned separately"version": "1.0.0" - Fixed/locked mode, all packages same versionuseWorkspaces: trueConfigure npm/yarn/pnpm workspaces in root package.json:
{
"workspaces": ["packages/*"],
"private": true
}
lerna run build - Run build in all packageslerna run test --scope=@org/package - Run in specific packagelerna run lint --since main - Run only in changed packages--stream for real-time output--parallel for concurrent executionlerna version:
lerna version patch - Bump patch versionlerna version minor - Bump minor versionlerna version major - Bump major versionlerna version - Interactive version selectionlerna publish:
lerna publish - Publish packages changed since last releaselerna publish from-git - Publish packages tagged in gitlerna publish from-package - Publish packages with unpublished versions.npmrc or lerna.json--dist-tag for pre-release versions--since flag for changed packages:
lerna run test --since mainlerna changed - List packages changed since last taglerna diff - Show diff since last releaseEnable conventional commits for automated versioning:
{
"command": {
"version": {
"conventionalCommits": true,
"message": "chore(release): publish"
}
}
}
fix: - Patch versionfeat: - Minor versionBREAKING CHANGE: - Major version{
"dependencies": {
"@org/shared-utils": "^1.0.0"
}
}
lerna run with --since for efficient CI--yes flag for non-interactive publishing@org/package-nameCreate or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).