Skip to content

Commit 7f5bc4f

Browse files
authored
ci: pin eds-core-react-next beta releases to a fixed 3.0.0-beta.N series (#5190)
* ci: pin eds-core-react-next beta releases to a fixed 3.0.0-beta.N series * ci: match eds-tokens key order in next release-please entry
1 parent db190ab commit 7f5bc4f

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

.github/release-please-config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"packages/eds-core-react/src/components/next": {
3131
"release-type": "simple",
3232
"component": "eds-core-react-next",
33+
"versioning": "prerelease",
34+
"prerelease": true,
3335
"prerelease-type": "beta"
3436
},
3537
"packages/eds-data-grid-react": {

.github/release-please-config.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,23 @@ The `eds-core-react` package uses a **dual release strategy** to support both st
8282
"packages/eds-core-react/src/components/next": {
8383
"release-type": "simple",
8484
"component": "eds-core-react-next",
85-
"prerelease-type": "beta"
85+
"prerelease": true,
86+
"prerelease-type": "beta",
87+
"versioning": "prerelease"
8688
}
8789
```
8890

8991
- Only includes files in `src/components/next/`
9092
- Published to `@equinor/eds-core-react@beta`
9193
- Uses `src/components/next/CHANGELOG.md`
92-
- Version format: `2.0.1-beta.0`, `2.0.1-beta.1`, etc.
94+
- Version format: `3.0.0-beta.1`, `3.0.0-beta.2`, etc. — the base is pinned at the upcoming `3.0.0` major; only the beta counter increments
9395

9496
**Key Configuration Options:**
9597

9698
- `exclude-paths`: Prevents `/next` components from affecting stable releases
9799
- `prerelease-type: "beta"`: Adds `-beta.X` suffix to versions
100+
- `versioning: "prerelease"`: Pins the version base. At `3.0.0-beta.N` (minor and patch are both 0), every commit type — `fix`, `feat`, and breaking `!` — bumps only the beta counter, never the base
101+
- `prerelease: true`: Keeps the `-beta.N` suffix on bumps (without it, the `prerelease` versioning strategy strips the suffix). Flipping this to `false` is the graduation lever: the next release becomes a clean `3.0.0`
98102
- `changelog-path`: Uses separate changelog for beta releases
99103

100104
### `@equinor/eds-tokens`: Whole Package in Beta
@@ -288,8 +292,8 @@ fix(next): fix Placeholder styling
288292

289293
Release-please will include beta changes in the release PR:
290294

291-
- Title includes "next": `chore: release eds-core-react-next 2.0.1-beta.1`
292-
- Bumps beta version: `2.0.1-beta.0``2.0.1-beta.1`
295+
- Title includes "next": `chore: release eds-core-react-next 3.0.0-beta.2`
296+
- Bumps beta version: `3.0.0-beta.1``3.0.0-beta.2`
293297
- Updates `src/components/next/CHANGELOG.md`
294298
- When merged, publishes to `@equinor/eds-core-react@beta`
295299

@@ -325,14 +329,11 @@ feat(next): add Input 2.0 component
325329
# Bug fixes
326330
fix(next): correct Input 2.0 styling
327331

328-
# Breaking changes - DO NOT use ! for beta
329-
feat(next): redesign Input 2.0 API (breaking)
330-
# NOT: feat(next)!: redesign Button API
332+
# Breaking changes - use ! so the change lands in the BREAKING CHANGES changelog section
333+
fix(next)!: convert Input 2.0 BEM classes to flat class names
331334
```
332335

333-
**Important:** Avoid using `!` (breaking change marker) for beta releases. Beta components are experimental and breaking changes are expected. Using `!` would trigger a major version bump (e.g., `2.0.1-beta.0``3.0.0-beta.0`), which is unnecessary for components under development.
334-
335-
This warning applies to the `eds-core-react-next` entry, which uses the default versioning strategy. The `eds-tokens` entry is immune: with `versioning: "prerelease"` and its base pinned at `3.0.0`, any commit type only increments the beta counter (see the whole-package-in-beta section above).
336+
**Breaking changes:** Use the `!` marker (with a `BREAKING CHANGE:` footer describing the migration). Both `eds-core-react-next` and `eds-tokens` use `versioning: "prerelease"` with the base pinned at `3.0.0`, so `!` does **not** roll the version — every commit type only increments the beta counter (`3.0.0-beta.1``3.0.0-beta.2`). The `!` gives consumers a "⚠ BREAKING CHANGES" section in the changelog and the GitHub release notes.
336337

337338
## Related Files
338339

documentation/how-to/BETA_RELEASE_GUIDE.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ feat(next): add new TextInput component
3434
# Bug fixes
3535
fix(next): correct Placeholder styling
3636

37-
# Breaking changes
38-
feat(next): change Button API
37+
# Breaking changes — use ! and a BREAKING CHANGE footer
38+
feat(next)!: change Button API
3939
```
4040

41-
> **Note:** Skip the conventional-commit `!` marker for beta components. Release Please treats `!` as a major-bump signal even for prereleases, so we call out breaking details in the description/body instead of using `!`.
41+
> **Note:** Use the conventional-commit `!` marker for breaking changes in beta components. The version base is pinned at `3.0.0` (`versioning: "prerelease"` in `release-please-config.json`), so `!` does not bump the major — it only increments the beta counter — while giving consumers a "⚠ BREAKING CHANGES" section in the changelog and release notes.
4242
4343
### Stable Release (for existing components)
4444

@@ -135,7 +135,9 @@ pnpm storybook
135135

136136
## Version Scheme
137137

138-
Beta versions follow this pattern: `2.0.1-beta.0`, `2.0.1-beta.1`, etc.
138+
Beta versions follow a fixed series pinned at the upcoming major: `3.0.0-beta.1`, `3.0.0-beta.2`, etc.
139+
140+
The base never moves during the beta period — every release (`fix`, `feat`, or breaking `!`) increments only the beta counter. This is enforced by `versioning: "prerelease"` + `prerelease: true` on the `eds-core-react-next` entry in `.github/release-please-config.json` (same scheme as `eds-tokens`). At graduation, EDS 2.0 ships as stable `3.0.0`.
139141

140142
## `@equinor/eds-tokens`: Whole Package in Beta
141143

@@ -262,7 +264,8 @@ EDS 2.0 components will graduate as a **complete set** in a single major release
262264
| Major release | 3.0.0 | EDS 2.0 only | Update imports, test, migrate |
263265
264266
5. **Release**:
265-
- Major version bump: `2.x.x``3.0.0`
267+
- The beta series graduates in place: `3.0.0-beta.N``3.0.0`
268+
- Mechanism: set `"prerelease": false` on the `eds-core-react-next` entry in `.github/release-please-config.json` (the `prerelease` versioning strategy then emits a stable version), or force the version with a `Release-As: 3.0.0` commit footer
266269
- All EDS 2.0 components become the default
267270
- Beta releases deprecated
268271
- Migration guide published
@@ -278,8 +281,8 @@ EDS 2.0 components will graduate as a **complete set** in a single major release
278281
**Within `/next` (beta releases):**
279282
280283
- ✅ Breaking changes are allowed and expected
281-
- ✅ Use regular `feat(next):` commits (no `!` needed)
282-
- ✅ Version bumps prerelease number: `beta.0``beta.1`
284+
- ✅ Mark them with `!` and a `BREAKING CHANGE:` footer (e.g. `fix(next)!: ...`) so they appear under "⚠ BREAKING CHANGES" in the changelog
285+
- ✅ The version base stays pinned: every release bumps only the prerelease number, `3.0.0-beta.1``3.0.0-beta.2`
283286
284287
**After graduation (stable releases):**
285288

0 commit comments

Comments
 (0)