CodeVetter · Repo Unpack · System map
semantic-release/semantic-release
The system is a one-shot release coordinator with CLI and programmatic entrypoints. Core modules own configuration, branch policy, Git state, and lifecycle sequencing; external plugins own package and hosting integrations. The published package contains executable JavaScript and TypeScript declarations, while Git tags and notes provide durable release state.
- package.json exposes bin/semantic-release.js as the semantic-release executable, index.js as the main module, and index.d.ts as its declarations; the package uses ESM.
- The executable rejects unsupported Node versions and checks Git against minimum 2.7.1; package engines require ^22.14.0 or >=24.10.0.
- cli.js parses release options with yargs, dynamically imports index.js, and maps successful execution to exit code 0 and errors to 1.
- index.js owns the run context and release sequence, with dedicated modules for configuration, verification, versions, commits, authentication, and branches.
- getConfig searches for release configuration with cosmiconfig, reads package metadata upward, falls back to remote.origin.url, and constructs plugin pipelines.
- Default integrations are commit-analyzer, release-notes-generator, npm, and github; they are dependencies loaded through the plugin system rather than implemented in the core.
- Git release storage uses tags plus JSON notes under semantic-release-prefixed refs; current writes use a separate note ref for each tagged release, and reads include older note naming.
- Development uses npm scripts for formatting, lockfile validation, engine compatibility, publish validation, and AVA suites; the release workflow runs npx semantic-release@25.0.1 on configured branch pushes.