CodeVetter · Repo Unpack · Behavior traces
changesets/changesets
The inspected startup, add, version, and publish paths connect concrete command dispatch to their terminal effects. Additional traces cover status, prerelease persistence, and packing. These are source-derived execution sequences, not observed runtime results. Branches around skipped packages, prerelease state, authentication, and partial publication materially change the sequence.
- Startup: bin.js imports the CLI → index.ts calls cli.parse(run:false) → enables interactive guidance for TTY add/publish → displays the version intro → awaits runMatchedCommand; command actions import handlers lazily.
- Add: getPackages → ensureChangesetFolder → readConfig → filter versionable packages → best-effort getVersionableChangedPackages → createChangeset or empty intent → writeChangeset → optional getAddMessage/Git commit → optional launchEditor.
- Version: discover packages/read config → validate ignore names and skipped dependents → readChangesets/readPreState → reject snapshot/pre conflicts or absent intent → assembleReleasePlan → applyReleasePlan → optionally stage touched paths sequentially and commit.
- Planner: getRelevantChangesets rejects unknown packages and mixed skipped/non-skipped intent → getPreInfo → flattenReleases → build dependents graph → repeat determineDependents/matchFixedConstraint/applyLinks until stable → calculate output versions.
- Status: getPackages/readConfig → readPreState/readChangesets → assembleReleasePlan → detect changed packages → enforce presence of changesets → either serialize the release plan or print sorted bump groups and optional IDs/new versions.
- Prerelease persistence: enterPre writes mode/tag → version application moves consumed files into .changeset/pre → active-pre assembly excludes archived IDs → exitPre writes mode:exit → the next application removes pre.json and consumes releasable archived intent.
- Pack: discover/read config → read supplied plan or compute getPublishPlan → create output/packages → queue publishTool.pack calls → hash each returned tarball → attach metadata to original chunks → write publish-plan.json; Yarn rejects publishConfig.directory.
- Publish: create reporter/discover adapter → load or compute plan → process dependency chunks → use TTY sequential probing or bulk publishing → recover eligible 2FA failures interactively → tag successes/tag-only entries → exit 1 for recorded failures.