Releasing
1. What a release is
Section titled “1. What a release is”A release is three things at once:
- A git tag
vX.Y.Zonmain. - A deploy of this site from that commit. Cloudflare Pages builds every push to
main, so the tag and the site agree. - The downloads on this site (
xg-tokens.css,xg-tokens.json,xg-ui.css,xg-ui.js, the kit and the brand pack), rebuilt from that commit.
The version number is version in package.json and is printed in the brand pack’s README.
2. Which version a change needs
Section titled “2. Which version a change needs”Semantic versioning, applied to the class names, token names and data attributes:
| Change | Version |
|---|---|
| A fix that changes nothing anyone depends on; a new rule or page | Patch 1.0.x |
| A new token, component, modifier or attribute; a changed value (a color, a radius) | Minor 1.x.0 |
| A renamed or removed token, class or attribute; a changed meaning | Major x.0.0 |
A changed value is a minor, not a patch: products look different after it, so it is announced.
3. When a version ships
Section titled “3. When a version ships”- Patches any time, once
npm testpasses. - Minors when ready, at most monthly, with a changelog entry.
- Majors announced one minor ahead, with the deprecations in place.
4. Status and version are two different things
Section titled “4. Status and version are two different things”Each component has a status. The version says when something changed; the status says what the component promises.
| Status | Promise |
|---|---|
| Draft | Being designed. Do not build on it. |
| Beta | Usable today. A class name may still change in a minor release, with a note. |
| Ready | Stable. Changes only in a major release, with a migration note. |
| Deprecated | Has a replacement and a removal date: the major that removes it. |
A component moves from Beta to Ready when it meets the bar, not at a release:
- It is used in a shipped product screen.
- All its states are in the workshop, in both brands and both modes.
- Its contrast pairs are in the measured set.
- It works with keyboard only and with a screen reader.
- Its markup has not changed for one minor release.
5. Deprecation and migration
Section titled “5. Deprecation and migration”A rename or removal is never silent:
- The old name keeps working for at least one minor release, marked Deprecated on its page with the replacement.
- The changelog lists the old and new names side by side.
- The major release removes it, with a migration note at the top of its changelog entry.
6. The record
Section titled “6. The record”The changelog has one entry per release: tokens, kit, brand, site. Write the entry in the pull request, under “Unreleased”, so the release only renames the heading.
7. How to cut a release
Section titled “7. How to cut a release”# on main, with a clean treenpm test # build, contrast, stated numbersnpm version minor # or patch / major: updates package.json and tagsgit push origin main --tags # Cloudflare Pages deploys mainThen rename “Unreleased” in the changelog to the version and date if npm version did not.
8. Caching after a release
Section titled “8. Caching after a release”Pages are served with Cache-Control: no-cache, so a returning visitor always gets the new HTML. Scripts and styles have content hashes in their names and are cached for a year; the new HTML points at the new names. A visitor never sees a page that references a file that no longer exists. Details are in the repository’s README.