| author |
|---|
Mark Chandler |
Since @chakra-ui/react acts as a combined gateway to (nearly) all Chakra UI
functionality, its version should reflect that by having all minor version
bumps to its internal dependencies applied to itself as well. This allows the
@chakra-ui/react package to reflect all backwards-compatible functionality
changes for the system as a whole.
We've currently configured https://github.com/atlassian/changesets to bump
internal dependency changes using patch which is probably the more correct
thing to do in that situation since the technically correct thing would result
in constant major version bumps, but in the case of @chakra-ui/react, we
want to instead receive any minor version bumps.
In my mind, here's how versioning should look (assume all packages starting at
1.0.0):
- Internal dependency adds backwards-compatible functionality
@chakra-ui/hooksadds a newuseCoolThingexport@chakra-ui/hooks@1.0.0->@chakra-ui/hooks@1.1.0(minor)
@chakra-ui/react@1.0.0->@chakra-ui/react@1.1.0(minor) to reflect the added system-level functionality
- Multiple internal dependencies add backwards-compatible functionality
@chakra-ui/hooksadds a newuseCoolThingexport@chakra-ui/hooks@1.0.0->@chakra-ui/hooks@1.1.0(minor)
@chakra-ui/accordionadds a newAccordionCoolestItemexport@chakra-ui/accordion@1.0.0->@chakra-ui/accordion@1.1.0(minor)
@chakra-ui/react@1.0.0->@chakra-ui/react@1.1.0(minor) to reflect the added system-level functionality
- Internal dependency adds bug fix
@chakra-ui/hooksfixes a bug withuseCoolThing@chakra-ui/hooks@1.0.0->@chakra-ui/hooks@1.0.1(patch)
@chakra-ui/react@1.0.0->@chakra-ui/react@1.0.1(patch) to reflect the system-level bug fix
- Multiple internal dependencies add bug fixes
@chakra-ui/hooksfixes a bug withuseCoolThing@chakra-ui/hooks@1.0.0->@chakra-ui/hooks@1.0.1(patch)
@chakra-ui/accordionfixes a bug withuseAccordionItem@chakra-ui/accordion@1.0.0->@chakra-ui/accordion@1.0.1(patch)
@chakra-ui/react@1.0.0->@chakra-ui/react@1.0.1(patch) to reflect the system-level bug fixes
- Internal dependencies add backwards-compatible functionality and bug fixes
@chakra-ui/hooksfixes a bug withuseCoolThing@chakra-ui/hooks@1.0.0->@chakra-ui/hooks@1.0.1(patch)
@chakra-ui/accordionadds a newAccordionCoolestItemexport@chakra-ui/accordion@1.0.0->@chakra-ui/accordion@1.1.0(minor)
@chakra-ui/react@1.0.0->@chakra-ui/react@1.1.1(minorandpatch) to reflect maximum version bump of all system-level changes (I believe this is the automaticchangesetsbehavior, but I need to test that; see https://github.com/atlassian/changesets/blob/master/docs/decisions.md#how-changesets-are-combined for more info)
- New package is published
@chakra-ui/new-componentis created@chakra-ui/new-component@1.0.0to reflect start of new package
@chakra-ui/react@1.0.0->@chakra-ui/react@1.1.0(minor) to reflect the added system-level functionality
I think we have two possible solutions:
- Include
@chakra-ui/reactin all changeset files matching the version bump of the dependent package. This requires manual effort, but allows us to fully control the process. - Build our own customized release plan. I'm not sure
changesetssupports this yet and need to investigate, but it would allow us to automate this so we don't have to always include@chakra-ui/reactbumps in our changeset files.