# Data flow — changesets/changesets

> Canonical page: https://codevetter.com/unpack/changesets/data-flow

# Data flow — changesets/changesets

Scanned commit c73949ba7b3160a4aa5729223335c190de1528f8 (2026-09-22). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Release intent enters through CLI selections or editable changeset files. Schema validation and workspace discovery normalize configuration before the planner builds package-indexed state. Version application persists calculated results, while publishing independently compares current manifests against registry state. Artifact and reporting files are additional output boundaries with different formats and trust assumptions.
- normalizeOptions expands comma-separated bump/ignore values, removes aliases, keeps the last repeated scalar, and converts numeric-looking options to strings; CHANGESETS_OUTPUT supplies missing output paths. — [packages/cli/src/cli.ts#L19-70](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/cli.ts#L19-L70)
- readConfig loads config.json from the discovered workspace root; validateConfig applies Valibot parsing, normalizeWrittenConfig, and package-aware validation rules before returning config or errors. — [packages/config/src/parse.ts#L25-56](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/config/src/parse.ts#L25-L56) [packages/config/src/parse.ts#L59-75](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/config/src/parse.ts#L59-L75) [packages/config/src/config.ts#L165-182](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/config/src/config.ts#L165-L182)
- writeChangeset converts releases and summary into quoted YAML frontmatter plus Markdown, assigns a human-readable ID, writes .changeset/<id>.md, and invokes the configured/detected formatter. — [packages/write/src/index.ts#L32-63](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/write/src/index.ts#L32-L63)
- readChangesets combines root and pre-directory Markdown, optionally filters by Git ref, excludes hidden/helper files, and returns parseChangesetFile results with path-derived IDs; parsing validates release names and types. — [packages/read/src/index.ts#L25-81](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/read/src/index.ts#L25-L81) [packages/parse/src/index.ts#L19-47](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/parse/src/index.ts#L19-L47) [packages/parse/src/index.ts#L74-108](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/parse/src/index.ts#L74-L108)
- flattenReleases builds a package-to-release Map, retains every contributing changeset ID, and selects the highest bump; assembleReleasePlan repeatedly mutates that state through dependents, fixed constraints, and links. — [packages/assemble-release-plan/src/flatten-releases.ts#L16-58](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/assemble-release-plan/src/flatten-releases.ts#L16-L58) [packages/assemble-release-plan/src/index.ts#L150-183](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/assemble-release-plan/src/index.ts#L150-L183)
- applyReleasePlan attaches Git commit metadata for changelog generators, edits package and root dependency fields, formats changelogs, then archives active-prerelease changesets or removes consumed ordinary changesets while preserving skipped ones. — [packages/apply-release-plan/src/index.ts#L140-182](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/apply-release-plan/src/index.ts#L140-L182) [packages/apply-release-plan/src/index.ts#L203-228](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/apply-release-plan/src/index.ts#L203-L228) [packages/apply-release-plan/src/index.ts#L287-310](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/apply-release-plan/src/index.ts#L287-L310)
- getUnpublishedPackages queues registry info calls, compares local versions against published versions, assigns access/tag, and sortReleases produces dependency-ordered chunks excluding dev dependencies; shared limits are 40 registry requests and 10 publishes. — [packages/cli/src/commands/publish-plan/getPublishPlan.ts#L106-118](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish-plan/getPublishPlan.ts#L106-L118) [packages/cli/src/commands/publish-plan/getPublishPlan.ts#L167-188](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish-plan/getPublishPlan.ts#L167-L188) [packages/cli/src/commands/publish-plan/getPublishPlan.ts#L223-270](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish-plan/getPublishPlan.ts#L223-L270) [packages/cli/src/lib/common.ts#L8-16](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/lib/common.ts#L8-L16)
- pack records relative tarball paths and SHA-256 integrity in a versioned JSON plan; publication resolves those paths, while Git-tag reporting appends NDJSON events and flushes the stream on async disposal. — [packages/cli/src/commands/pack/index.ts#L39-42](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/pack/index.ts#L39-L42) [packages/cli/src/commands/pack/index.ts#L110-119](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/pack/index.ts#L110-L119) [packages/cli/src/commands/publish/index.ts#L79-90](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/commands/publish/index.ts#L79-L90) [packages/cli/src/utils/output.ts#L17-34](https://github.com/changesets/changesets/blob/c73949ba7b3160a4aa5729223335c190de1528f8/packages/cli/src/utils/output.ts#L17-L34)

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)
