Skip to content

chore(scripts): support maintenance-branch releases with --base - #3292

Merged
interactivellama merged 1 commit into
masterfrom
chore/release-maintenance-branch
Nov 10, 2026
Merged

interactivellama merged 1 commit into
masterfrom
chore/release-maintenance-branch

Conversation

@interactivellama

@interactivellama interactivellama commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Additional description

Problem: npm run release-pr could only cut a release from origin/master, and next refused stable versions. A 0.10.x patch release (needed for the W-24839159 Combobox fix, #3290) couldn't use it.

Change: scripts/release.ts takes --base <branch> (default master):

  • cuts chore/release-<version> from origin/<base>, reads the current version there, lists changes since the last tag on that branch, and opens the PR against <base>;
  • on a non-master base, next patch-bumps a stable version (0.10.65 -> 0.10.66); on master it still requires a prerelease;
  • keeps the base branch's package.json indentation (0.10.x uses tabs; master uses 2 spaces);
  • prints gh release create v<version> --target <base> as the follow-up.

Without --base, behavior is unchanged. AGENTS.md documents the maintenance flow. #3291 (0.10.66) was opened with this branch's script.

Tests: scripts/__tests__/release.test.mjs gets a maintenance-branch case (patch bump, tab indent kept, PR base, changes listed from that branch only, follow-up command), an explicit-version/flag-order dry run, and a missing --base value. 18 tests pass. Typecheck clean.


CONTRIBUTOR checklist (do not remove)

Please complete for every pull request.

Green gate — all of these must pass locally (CI runs the same):

  • npm run lint passes with 0 errors (npm run lint:fix to auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.
  • npm run typecheck is clean (tsc --noEmit).
  • npm test -- --run passes — this runs both Vitest projects (jsdom unit + real-browser browser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots with npm test -- --run -u and review the diff.
  • npm run build succeeds (type-check + Vite library build + .d.ts + entry shims).

Behavior & docs:

  • First-time contributors: sign the CLA (a bot will comment with instructions).
  • Added/updated Vitest + React Testing Library tests for the change (template: components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a *.browser.test.jsx file (the browser project); everything else is jsdom.
  • Reviewed the component's Storybook stories: npm run storybook → http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server).
  • Story/example code uses the component's real prop API (e.g. slots like content / visualPickerFigure, render props like renderItem, icon props, events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check against components/<name>/__examples__.
  • Storybook Accessibility (a11y) panel shows no new violations for the affected stories.
  • If you added or changed a type, remember runtime PropTypes were removed in the TS migration — types are the contract. Ship accurate .d.ts (they're generated by the build); JS consumers rely on them via editor type-acquisition.

REVIEWER checklist (do not remove)

  • CI is green (GitHub Actions CI workflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.
  • Change has adequate test coverage; bug fixes include a regression test.
  • Reviewed the affected Storybook stories and their a11y panels.
  • Rendered markup still conforms to SLDS — check the story HTML snapshot diff (components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).
  • Public API / package surface: if exports changed, the deep-import contract still holds (@salesforce/design-system-react/components/<name> and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change → feat!:/BREAKING CHANGE: and a major version bump.

release-pr only cut from origin/master, and `next` only bumped
prereleases, so a 0.10.x patch release had to be bumped by hand.

`--base <branch>` cuts the release branch from origin/<branch>, opens
the PR against it, and names it in the `gh release` follow-up. On a
non-master base, `next` patch-bumps a stable version. package.json
keeps the base branch's indentation (0.10.x uses tabs).
@interactivellama
interactivellama merged commit 0978644 into master Nov 10, 2026
10 checks passed
@interactivellama
interactivellama deleted the chore/release-maintenance-branch branch November 10, 2026 18:22
@interactivellama

Copy link
Copy Markdown
Contributor Author

Merging as this is a release script chore only.

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.

1 participant