Skip to content

feat(config): add snapshot.baseVersion option - #2377

Open
officialasishkumar wants to merge 2 commits into
changesets:mainfrom
officialasishkumar:feat/snapshot-base-version
Open

officialasishkumar wants to merge 2 commits into
changesets:mainfrom
officialasishkumar:feat/snapshot-base-version

Conversation

@officialasishkumar

Copy link
Copy Markdown

Closes #1346

Adds an optional snapshot.baseVersion config option that replaces the hardcoded 0.0.0 base of snapshot versions (e.g. 0.0.1-experimental-...), for ecosystems that can't consume 0.0.0.

  • Must be a plain MAJOR.MINOR.PATCH string (validated in the config schema); defaults to 0.0.0, so existing behaviour is unchanged.
  • Ignored when snapshot.useCalculatedVersion is true.
  • Updated the valibot schema, generated schema.json, types, docs and added a changeset.

Tests: assembleReleasePlan unit tests (including precedence), changeset version --snapshot test, and config validation tests. Ran the affected suites, tsc, eslint and oxfmt --check locally.

Snapshot releases are always versioned on top of 0.0.0 (for example
0.0.0-experimental-20240101000000). Some ecosystems cannot consume a
0.0.0 version (CocoaPods and Capacitor plugins were reported in changesets#1346),
and the only existing escape hatch, snapshot.useCalculatedVersion,
changes the base to the calculated release version, which is not what
those users want.

Add an optional snapshot.baseVersion config value (a plain
MAJOR.MINOR.PATCH string, validated by the config schema) that replaces
the hardcoded 0.0.0 in getSnapshotVersion. It defaults to 0.0.0, so
existing behaviour is unchanged, and it is ignored when
useCalculatedVersion is enabled. The option is added to the config
valibot schema, the generated JSON schema, the Config/WrittenConfig
types and the config docs.

Tests cover the assembleReleasePlan behaviour (including precedence of
useCalculatedVersion), end-to-end `changeset version --snapshot`, and
config validation of bad values.
@netlify

netlify Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

👷 Deploy request for changesets pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 3bed77c

@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3bed77c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@changesets/assemble-release-plan Minor
@changesets/config Minor
@changesets/types Minor
@changesets/cli Patch
@changesets/get-release-plan Patch
@changesets/apply-release-plan Patch
@changesets/changelog-git Patch
@changesets/changelog-github Patch
@changesets/get-dependents-graph Patch
@changesets/git Patch
@changesets/parse Patch
@changesets/pre Patch
@changesets/read Patch
@changesets/release-utils Patch
@changesets/should-skip-package Patch
@changesets/write Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.51%. Comparing base (9a035ec) to head (3bed77c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2377      +/-   ##
==========================================
+ Coverage   87.47%   87.51%   +0.03%     
==========================================
  Files          78       78              
  Lines        2971     2972       +1     
  Branches      851      854       +3     
==========================================
+ Hits         2599     2601       +2     
+ Misses        337      336       -1     
  Partials       35       35              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support changing default snapshot version from 0.0.0

1 participant