Repository navigation
Release flow setup: split changesets, products config, cascade refactor - #655
art-alexeyenko wants to merge 9 commits into
Conversation
…, samples per product - Every changeset names one package: split-changesets.ts (+ --check), `yarn changeset:add`, PR check pr_changeset-split.yml. - .changeset/products.config.json (product -> packages) with readProducts; runMain for scripts run by tsx or plain node. - Cascade rework: release plan assembled by changesets (getCascadeReleasePlan, getReleasePlan); stable releases cascade majors only, the scaffolder patch-only. - Samples per product: samples.json keyed by product; scaffold-samples / lint-samples take a product. - @types/debug for nextjs and react; PR workflows renamed with the pr_ prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, samples per product - Every changeset names one package: split-changesets.ts (+ --check), `yarn changeset:add`, PR check pr_changeset-split.yml. - .changeset/products.config.json (product -> packages) with readProducts; runMain for scripts run by tsx or plain node. - Cascade rework: release plan assembled by changesets (getCascadeReleasePlan, getReleasePlan); stable releases cascade majors only, the scaffolder patch-only. - Samples per product: samples.json keyed by product, with an angular sample; scaffold-samples / lint-samples take a product. - PR workflows renamed with the pr_ prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e/content-sdk into feature/jss-9682-1-setup
|
There was a problem hiding this comment.
I think lint-samples lints nothing for two reasons:
- It passes folder names (e.g. sample-nextjs-SSG, sample-angular), but the samples' package names are content-sdk-nextjs and similar.
- With a single sample, the scope becomes a one-item pattern like {sample-angular}, which never matches anything.
There was a problem hiding this comment.
So the fix here is two-fold.
- Ensure predictable naming via scaffold-samples - done with changes to the scripts and templates
- Ensure samples are explorable by lerna. They are gitignored and that prevents lerna from finding them. I added
.nxignorefile for this reason - to override thisnxbehavior.
| createdCount += 1; | ||
| continue; | ||
| } | ||
| const newId = await writeChangeset(single, cwd, { format: config.format }); |
There was a problem hiding this comment.
CHANGELOG commit links will point to the wrong commit. The split creates new files, so I suppose the changelog generator credits each change to the commit that created the file, which is the split or bot commit. The changesets we already have on the base branch would all link to this PR's commit instead of their original feature commits. Can you please double check this behavior?
There was a problem hiding this comment.
True, true. I restored the original changesets and also moved the split enforcement to pre-commit hook.
PR checks are now info only: they do not create a split commit.
| throw new Error(`Invalid .changeset/config.json:\n${errors.join('\n')}`); | ||
| } | ||
|
|
||
| const changesets = (await readChangesets(cwd)) as ChangesetLike[]; |
There was a problem hiding this comment.
The split doesn't respect the changeset pre-release mode, we are not in pre mode now, however the bug might show up as soon as someone uses it.
Probably, we need to skip the IDs that are already consumed
There was a problem hiding this comment.
the pre-commit hook does that - we now skip changesets that are already present on origin. For the pre- ids - if someone commits them, we'll catch them in PR.
ce48636 to
737a3f1
Compare
Description / Motivation
Part 1 of GH release flows rework.
Next steps:
Testing Details
Types of changes