This repository is Lerna, a tool for managing JavaScript/TypeScript monorepos. It uses Nx as the task runner. See CLAUDE.md for detailed contributor conventions (package manager, commit style, project layout, command-specific tests). The standard dev commands live in CLAUDE.md, CONTRIBUTING.md, and the root package.json scripts — refer to those rather than duplicating them.
The update script runs npm ci on startup, so dependencies are already installed when a session begins.
Lerna has no GUI or long-running server; the "application" is the lerna CLI. Core commands (build, lint, test, integration, e2e) are run through Nx — see CLAUDE.md for the exact commands.
Match the Node version pinned in package.json (volta.node) — that is the single source of truth, also used by CI. The VM's default node (/exec-daemon/node) is a slightly older 22.x patch that does not match it, and the mismatch is not cosmetic: that older patch's util.styleText() emits ANSI color even for non-TTY / NO_COLOR output, which breaks the --stream / --parallel snapshot assertions in lerna run / lerna exec. The result is a handful of failing integration tests even though build, lint, and unit tests pass on either version.
Setup installed the pinned version via nvm and prepended it to PATH in ~/.bashrc, so new shells should already resolve node -v to the pinned version. If a shell ever reports a different version, install/select the pinned one before running integration/e2e tests, e.g. nvm install "$(node -p "require('./package.json').volta.node")" && nvm use "$(node -p "require('./package.json').volta.node")". Do not add the node install to the update script; it is captured in the VM snapshot.
npx lernais not available immediately afternpm ci. Thelernabin points atpackages/lerna/dist/cli.js, which does not exist until the package is built. To run the CLI:- Build first with
npx nx run-many -t build(ornpm run build), then runnpm installonce to (re)create thenode_modules/.bin/lernasymlink. After thatnpx lerna ...works. - Or, without relinking, invoke the built CLI directly:
node packages/lerna/dist/cli.js <command>.
- Build first with
npm run build(tools/scripts/build.sh) must be run from the repo root; it deletes/recreates the rootdist/directory and re-runsnpm installto relink thelernabin.- E2E tests (
nx e2e <project>) publish packages to a local Verdaccio registry and requirepnpm(>= 8.10.2) for the full suite (thee2e-repairproject itself runs on npm). Only run e2e after build, lint, unit, and integration tests pass (perCLAUDE.md). SeeCONTRIBUTING.mdfor the full e2e flow. e2e-repairsnapshot drifts when Nx publishes newrepairmigrations. Thee2e/repair/src/repair.spec.tsinline snapshot lists every Nx migration, so any newly released Nx migration (e.g. a new.gitignoreentry) makes it fail in CI even on unrelated branches. This is expected pre-existing drift, not a regression — refresh it withnpx nx e2e e2e-repair -u(perCONTRIBUTING.md) and commit the updated snapshot.