CodeVetter · Repo Unpack · Extension points
lerna/lerna
Extension mechanisms are explicit command registration, shared command hooks, configuration, Nx task definitions, and migration metadata. Publishing accepts configurable artifact directories and assets, while conventional-commit processing loads presets. Hosted release providers share an adapter-shaped API. Public package entrypoints and build lists must stay aligned with implementation changes.
- A CLI command plugs into main's .command chain using a yargs CommandModule with builder and handler; run demonstrates handler-to-factory construction.
- Command subclasses implement initialize/execute and can override requiresGit, otherCommandConfigs, or project detection; initialize=false supplies a standard early-return contract.
- Lerna config extends supports locally resolvable modules with circular-reference detection; effective command options can inherit another command's namespace, as changed does for version and publish.
- Nx targetDefaults and package.json nx configuration define task dependencies; add-caching writes cache/dependsOn/output settings, replacing array-form entries with object form for per-script answers.
- Publishing configuration accepts root/package directory and asset definitions with projectRoot, projectName, and workspaceRoot interpolation; assets support strings or from/to objects.
- getChangelogConfig accepts named or object presets, loads CommonJS/ESM exports, invokes builder or legacy callback functions, and normalizes legacy preset fields for modern consumers.
- createReleaseClient selects GitHub or GitLab; GitLab adapts createRelease to the repos.createRelease interface, while provider environment variables configure credentials and alternate API endpoints.
- Migration generators are registered with versions/descriptions/implementation paths in migrations.json; repair forwards that registry to Nx, and generators mutate an Nx Tree and format it.