# Extension points — lerna/lerna

> Canonical page: https://codevetter.com/unpack/lerna/extension-points

# Extension points — lerna/lerna

Scanned commit ce3e38f2889b26573f1b38cfb487546903292158 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

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. — [packages/lerna/src/index.ts#L31-47](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/packages/lerna/src/index.ts#L31-L47) [libs/commands/run/src/command.ts#L8-29](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/run/src/command.ts#L8-L29) [libs/commands/run/src/command.ts#L97-105](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/run/src/command.ts#L97-L105)
- Command subclasses implement initialize/execute and can override requiresGit, otherCommandConfigs, or project detection; initialize=false supplies a standard early-return contract. — [libs/core/src/lib/command/index.ts#L223-238](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/command/index.ts#L223-L238) [libs/core/src/lib/command/index.ts#L338-354](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/command/index.ts#L338-L354)
- 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. — [libs/core/src/lib/project/apply-extends.ts#L8-32](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/project/apply-extends.ts#L8-L32) [libs/core/src/lib/command/index.ts#L267-283](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/command/index.ts#L267-L283) [libs/commands/changed/src/index.ts#L24-26](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/changed/src/index.ts#L24-L26)
- 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. — [website/docs/concepts/task-pipeline-configuration.md#L27-66](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/website/docs/concepts/task-pipeline-configuration.md#L27-L66) [website/docs/concepts/task-pipeline-configuration.md#L82-96](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/website/docs/concepts/task-pipeline-configuration.md#L82-L96) [packages/lerna/src/commands/add-caching/index.ts#L141-178](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/packages/lerna/src/commands/add-caching/index.ts#L141-L178)
- Publishing configuration accepts root/package directory and asset definitions with projectRoot, projectName, and workspaceRoot interpolation; assets support strings or from/to objects. — [libs/commands/publish/src/index.ts#L265-309](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/publish/src/index.ts#L265-L309) [libs/commands/publish/src/index.ts#L1176-1203](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/publish/src/index.ts#L1176-L1203)
- getChangelogConfig accepts named or object presets, loads CommonJS/ESM exports, invokes builder or legacy callback functions, and normalizes legacy preset fields for modern consumers. — [libs/core/src/lib/conventional-commits/get-changelog-config.ts#L74-103](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/conventional-commits/get-changelog-config.ts#L74-L103) [libs/core/src/lib/conventional-commits/get-changelog-config.ts#L134-180](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/conventional-commits/get-changelog-config.ts#L134-L180)
- createReleaseClient selects GitHub or GitLab; GitLab adapts createRelease to the repos.createRelease interface, while provider environment variables configure credentials and alternate API endpoints. — [libs/commands/version/src/lib/create-release.ts#L35-44](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/version/src/lib/create-release.ts#L35-L44) [libs/commands/version/src/lib/create-release.ts#L76-86](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/commands/version/src/lib/create-release.ts#L76-L86) [libs/core/src/lib/scm-clients/github/create-github-client.ts#L17-41](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/scm-clients/github/create-github-client.ts#L17-L41) [libs/core/src/lib/scm-clients/gitlab/create-gitlab-client.ts#L4-22](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/libs/core/src/lib/scm-clients/gitlab/create-gitlab-client.ts#L4-L22)
- 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. — [packages/lerna/migrations.json#L2-37](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/packages/lerna/migrations.json#L2-L37) [packages/lerna/src/commands/repair/index.ts#L23-35](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/packages/lerna/src/commands/repair/index.ts#L23-L35) [packages/lerna/src/migrations/add-schema-config/add-schema-config.ts#L3-11](https://github.com/lerna/lerna/blob/ce3e38f2889b26573f1b38cfb487546903292158/packages/lerna/src/migrations/add-schema-config/add-schema-config.ts#L3-L11)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
