Classifying a Card change under SemVer
Applying SemVer rules to a mixed change.
removing a prop is breaking so the whole release is major, document and migrate, and release the highest applicable level.
WHAT THIS TESTS This checks whether you understand that a release is classified by its most impactful change and whether a visual-only tweak counts as breaking, then whether you follow the right release process.
A GOOD ANSWER COVERS The release contains two changes. Removing a prop is an incompatible public API change, which under SemVer mandates a major version bump; this dominates. The internal padding change is subtler: if it only affects internal spacing without altering the documented API, it might be a patch or minor on its own, but a significant visual change can still surprise consumers and is sometimes treated as breaking in design systems. Regardless, because a prop is removed, the whole release is major. Steps: ideally, in a preceding minor release, deprecate the prop with a runtime warning and document the replacement; in the major release, remove it, bump the major version, write a CHANGELOG entry, and produce a migration guide showing how to replace the removed prop and noting the padding change so layouts can be checked. Then publish to the registry and announce.
COMMON WRONG ANSWERS Classifying the release by the padding tweak and shipping a patch hides the breaking prop removal from consumers who auto-update. Treating prop removal as minor because it feels small violates SemVer. Ignoring the visual padding change in the migration notes leaves consumers with unexplained layout shifts. Skipping the deprecation runway when one was feasible.
LIKELY FOLLOW-UPS When is a purely visual change breaking? How do you decide if padding warrants its own note? Could you avoid the break by keeping the prop as a no-op? How do Changesets capture mixed-severity changes? How long should the deprecation window be?
ONE CONCRETE EXAMPLE Card drops its dense prop and increases padding. In 4.3 you keep dense working but warn it is deprecated. In 5.0 you remove dense, document the new padding, and provide a migration note: replace dense with the size prop and verify layouts since default padding grew. Consumers on caret 4 stay safe until they intentionally upgrade to 5.
Read the original → semver.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.