CodeVetter · Repo Unpack · System map
changesets/changesets
The runtime consists of a Node CLI and separately published release-processing packages. Workspace discovery and configuration feed an in-memory planner, while application and publishing own filesystem and external side effects. The documentation site has a separate VitePress build and Netlify target. Repository scripts and GitHub workflows define distinct verification, preview, and release paths.
- The changeset executable enables Node's compile cache when available, imports @changesets/cli, then parses argv and awaits cli.runMatchedCommand(); ExitError controls the process exit code.
- cac registrations in cli.ts dynamically load implementations for init, add, version, publish, publish-plan, pack, status, git-tag, and pre; add is the default command.
- getReleasePlan composes workspace discovery, config validation, changeset reading, prerelease-state reading, and assembleReleasePlan without applying the resulting plan.
- assembleReleasePlan owns calculated release state; applyReleasePlan owns manifest/changelog writes and changeset cleanup, returning touched paths for the CLI's optional commit step.
- Publishing crosses into package-manager subprocesses through PublishTool.info, pack, and publish; getPublishTool selects npm, version-aware pnpm, or Yarn Berry and rejects Yarn Classic.
- pnpm workspaces include packages, scripts, and site; tsdown builds package entrypoints as ESM with declarations and publint, and apply-release-plan publishes only its dist directory.
- Root scripts expose bootstrap, build, Vitest, separate E2E testing, TypeScript checking, ESLint, oxfmt, and check-all; the package manager is pinned to pnpm 11.13.1.
- Netlify builds packages and the VitePress site on Node 24; GitHub release automation separates mode selection, version PR creation, packing, and publishing, while labeled PRs can trigger pkg-pr-new previews.