Skip to content

Release flow setup: split changesets, products config, cascade refactor - #655

Open
art-alexeyenko wants to merge 9 commits into
feature/product-based-releasesfrom
feature/jss-9682-1-setup
Open

art-alexeyenko wants to merge 9 commits into
feature/product-based-releasesfrom
feature/jss-9682-1-setup

Conversation

@art-alexeyenko

@art-alexeyenko art-alexeyenko commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description / Motivation

Part 1 of GH release flows rework.

  • Enforces split changesets - required for per-package and per-product limited releases
  • Refactors cascade-changesets to support future steps
  • Adds product config to list product packages
  • Adjusts scaffold-samples to support per-product sample scaffold

Next steps:

  • Enable limited product release
  • Enable legacy flow
  • Add release guards

Testing Details

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore

art-alexeyenko and others added 3 commits October 14, 2026 17:27
…, 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>
@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d8681b9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread .github/workflows/pr_build.yml
Comment thread .github/workflows/pr_changeset-split.yml Outdated
Comment thread scripts/samples.json
Comment thread scripts/lint-samples.js

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the fix here is two-fold.

  1. Ensure predictable naming via scaffold-samples - done with changes to the scripts and templates
  2. Ensure samples are explorable by lerna. They are gitignored and that prevents lerna from finding them. I added .nxignore file for this reason - to override this nx behavior.

Comment thread scripts/changesets/cascade-version.ts Outdated
Comment thread scripts/changesets/split-changesets.ts Outdated
createdCount += 1;
continue;
}
const newId = await writeChangeset(single, cwd, { format: config.format });

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread scripts/changesets/utils.ts Outdated
Comment thread scripts/changesets/split-changesets.ts Outdated
throw new Error(`Invalid .changeset/config.json:\n${errors.join('\n')}`);
}

const changesets = (await readChangesets(cwd)) as ChangesetLike[];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/pr_changeset-split.yml Outdated
@art-alexeyenko
art-alexeyenko force-pushed the feature/jss-9682-1-setup branch from ce48636 to 737a3f1 Compare October 15, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants