Skip to content

Commit 620f9b7

Browse files
chore(sdk): release v2.1.0 (#38)
* chore(sdk): release v2.1.0 * ci: match bracketed or bare version heading when extracting release notes * docs: document CHANGELOG reformatting in the release process
1 parent 204c8ee commit 620f9b7

10 files changed

Lines changed: 70 additions & 33 deletions

.changeset/connection-validation-and-reactflow-props.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wb-217-actions-hook.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wb-217-flip-layout-stale-handles.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wb-217-theme-shared-store.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wb-220-edge-templates.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/release-sdk.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ jobs:
9898
# so the GitHub Release body matches what consumers see on npm.
9999
run: |
100100
VERSION=$(node -p "require('./packages/sdk/package.json').version")
101-
NOTES=$(awk "/^## ${VERSION}\$/{flag=1;next}/^## /{flag=0}flag" packages/sdk/CHANGELOG.md)
101+
# Matches either a bracketed Keep-a-Changelog heading
102+
# (`## [X.Y.Z] - 2026-06-16`) or a bare Changesets heading (`## X.Y.Z`).
103+
NOTES=$(awk -v v="$VERSION" '$0 ~ ("^## \\[?" v "\\]?([ -]|$)"){flag=1;next}/^## /{flag=0}flag' packages/sdk/CHANGELOG.md)
102104
{
103105
echo "notes<<EOF"
104106
echo "$NOTES"

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ The SDK is the only npm-published workspace; everything else under `apps/` and `
149149

150150
**Release moment** (maintainer, not Claude):
151151

152-
1. Open PR `release/vX.Y.Z``release`. In the branch, run `pnpm changeset version` — bumps `packages/sdk/package.json`, regenerates `packages/sdk/CHANGELOG.md`, deletes consumed `.changeset/*.md`.
152+
1. Open PR `release/vX.Y.Z``release`. In the branch, run `pnpm changeset version` — bumps `packages/sdk/package.json`, regenerates `packages/sdk/CHANGELOG.md` (then reformat it into Keep a Changelog style before committing, see [`packages/sdk/RELEASE.md`](packages/sdk/RELEASE.md) § "Reformat the generated CHANGELOG section"), deletes consumed `.changeset/*.md`.
153153
2. Review the diff, merge the PR into `release`.
154154
3. Tag the merge commit on `release`: `git tag vX.Y.Z && git push origin vX.Y.Z`.
155155
4. GitHub Action triggered by the tag runs lint + typecheck + test + `pnpm publish --provenance` (authenticated via npm Trusted Publisher / OIDC, no `NPM_TOKEN` stored anywhere) + creates a GitHub Release.

packages/sdk/CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# Changelog
22

3-
All notable changes to `@workflowbuilder/sdk` are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
3+
## [2.1.0] - 2026-06-16
44

5-
## [Unreleased]
5+
### Added
6+
7+
- `isValidConnection` and `reactFlowProps` props on `<WorkflowBuilder.Root>`. `isValidConnection` validates connections as the user draws them; `reactFlowProps` forwards extra props to the ReactFlow canvas.
8+
- `useWorkflowBuilderActions()` hook for custom layouts that omit `<WorkflowBuilder.TopBar />`, exposing the imperative save / import / export / settings / read-only / theme / layout-direction actions. Also exports the `WorkflowBuilderActions`, `LayoutChangeOptions`, and `Theme` types. See [Custom toolbar without the app bar](https://www.workflowbuilder.io/docs/guides/configuring-the-editor/#custom-toolbar-without-the-app-bar).
9+
- `edgeTemplates` prop on `<WorkflowBuilder.Root>` for custom edge renderers. Pass a `{ [edgeType]: Component }` map of components taking ReactFlow's `EdgeProps`; edges whose `type` matches a key render with your component, and unregistered types fall back to the built-in `labelEdge`. Also exports the `WorkflowBuilderEdgeTemplates` type.
10+
11+
### Fixed
12+
13+
- Re-measure node internals when `layoutDirection` changes, so edges re-route to the new handle positions instead of the stale ones React Flow had cached.
14+
- Theme now lives in a shared store applied to the DOM on `<WorkflowBuilder.Root>` mount, so a persisted theme paints on first load even without the app bar and multiple consumers stay in sync. Reads of `document` / `localStorage` are guarded, so importing the SDK server-side no longer throws.
615

716
## [2.0.1] - 2026-05-29
817

@@ -29,5 +38,6 @@ First public npm release. The major bump continues the Workflow Builder version
2938

3039
- Distribution model: editor is now consumed via `npm install @workflowbuilder/sdk` instead of cloning the monorepo. Consumers no longer need monorepo tooling, tsconfig paths, or workspace symlinks.
3140

41+
[2.1.0]: https://www.npmjs.com/package/@workflowbuilder/sdk/v/2.1.0
3242
[2.0.1]: https://www.npmjs.com/package/@workflowbuilder/sdk/v/2.0.1
3343
[2.0.0]: https://www.npmjs.com/package/@workflowbuilder/sdk/v/2.0.0

packages/sdk/RELEASE.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This part Claude (or any contributor) handles per change — not the maintainer.
5959

6060
Skip the changeset only for changes that do not affect the published `dist/` (e.g. internal tests, lint config, comments).
6161

62-
**Keep the body short — it ships verbatim as a release note.** One sentence for a fix, one or two for a feature. State what changed and the consumer-facing effect, name the public symbols touched, and stop. No rationale, no implementation walk-through, no internal file names. Reasoning belongs in the PR description or code comments, not the release notes. Breaking changes are the only exception: add a `Breaking changes:` list with migration steps (see `remove-nodeid-from-handles.md`).
62+
**Keep the body short.** It becomes this change's CHANGELOG bullet at release time, reformatted into Keep a Changelog style (the maintainer strips the commit hash and the `feat:` / `fix:` prefix and files it under Added / Changed / Fixed). One sentence for a fix, one or two for a feature. State what changed and the consumer-facing effect, name the public symbols touched, and stop. No rationale, no implementation walk-through, no internal file names. Reasoning belongs in the PR description or code comments, not the release notes. Breaking changes are the only exception: add a `Breaking changes:` list with migration steps (see `remove-nodeid-from-handles.md`).
6363

6464
4. Commit code + changeset together. Conventional Commits format is enforced by `.husky/commit-msg`:
6565

@@ -94,12 +94,62 @@ This:
9494

9595
- Reads every `.changeset/*.md`, computes the highest bump per package.
9696
- Bumps `packages/sdk/package.json` version (so `2.0.0 → 2.1.0` if any minor changeset, `2.0.0 → 2.0.1` if only patches, `2.0.0 → 3.0.0` if any major).
97-
- Regenerates `packages/sdk/CHANGELOG.md` with one section per consumed changeset.
97+
- Regenerates `packages/sdk/CHANGELOG.md` with one section per consumed changeset, in raw Changesets format. Reformat it into Keep a Changelog style before committing (see "Reformat the generated CHANGELOG section" below).
9898
- Deletes the consumed `.changeset/*.md` files.
9999
- Touches `pnpm-lock.yaml` if needed.
100100

101101
Pick the `vX.Y.Z` for the branch name from the new version in `packages/sdk/package.json`.
102102

103+
#### Reformat the generated CHANGELOG section
104+
105+
`pnpm changeset version` writes the new release in raw Changesets format: a bare `## X.Y.Z` heading, `### Minor Changes` / `### Patch Changes` groupings, and each bullet prefixed with a commit hash and its Conventional-Commit type (`5dddbff: feat: ...`). The committed CHANGELOG uses [Keep a Changelog](https://keepachangelog.com/) instead, matching every prior release. Rewrite the generated block before committing:
106+
107+
- **Heading.** Use `## [X.Y.Z] - YYYY-MM-DD` with the release date, not the bare `## X.Y.Z`.
108+
- **Sections.** Replace `### Minor Changes` / `### Patch Changes` with `### Added`, `### Changed`, `### Fixed`, `### Removed`. Categorize by intent, not by semver bump. A new API goes under Added, a behavior change or rename under Changed, a bug fix under Fixed, a deletion under Removed.
109+
- **Bullets.** Drop the leading commit hash and the `feat:` / `fix:` prefix. Write plain prose. Lead an Added bullet with the public symbol it introduces. Start a Fixed or Changed bullet with a capitalized verb.
110+
- **Link reference.** Add `[X.Y.Z]: https://www.npmjs.com/package/@workflowbuilder/sdk/v/X.Y.Z` to the reference list at the bottom of the file, newest first.
111+
112+
Keep the `# Changelog` H1 as the only thing above the newest version heading. Do not add a preamble paragraph or an `## [Unreleased]` placeholder there. Changesets always inserts the next release immediately after the H1, so anything between the H1 and the first `## ` heading gets pushed into that release's section and leaks into its GitHub Release notes.
113+
114+
Example. The generated block:
115+
116+
```md
117+
## 2.1.0
118+
119+
### Minor Changes
120+
121+
- fa207df: feat: add `edgeTemplates` prop on `<WorkflowBuilder.Root>` for custom edge renderers.
122+
123+
### Patch Changes
124+
125+
- 3b9f8fd: fix: re-measure node internals when `layoutDirection` changes.
126+
```
127+
128+
becomes:
129+
130+
```md
131+
## [2.1.0] - 2026-06-16
132+
133+
### Added
134+
135+
- `edgeTemplates` prop on `<WorkflowBuilder.Root>` for custom edge renderers.
136+
137+
### Fixed
138+
139+
- Re-measure node internals when `layoutDirection` changes.
140+
```
141+
142+
After reformatting, confirm the release-notes extraction is clean. The extractor in `.github/workflows/release-sdk.yml` matches both the bracketed heading and a bare `## X.Y.Z`, so run it locally to see exactly what the GitHub Release body will contain:
143+
144+
```bash
145+
VERSION=$(node -p "require('./packages/sdk/package.json').version")
146+
awk -v v="$VERSION" '$0 ~ ("^## \\[?" v "\\]?([ -]|$)"){flag=1;next}/^## /{flag=0}flag' packages/sdk/CHANGELOG.md
147+
```
148+
149+
It should print the `### Added` / `### Fixed` bullets for this version and nothing else.
150+
151+
Then commit the version bump, reformatted CHANGELOG, and changeset deletions together:
152+
103153
```bash
104154
git add -A
105155
git commit -m "chore(sdk): release vX.Y.Z"
@@ -113,7 +163,7 @@ Open a PR `release/vX.Y.Z → release`.
113163
In the PR diff you should see:
114164

115165
- `packages/sdk/package.json`: version bump
116-
- `packages/sdk/CHANGELOG.md`: new section with all entries
166+
- `packages/sdk/CHANGELOG.md`: new Keep-a-Changelog section (dated `## [X.Y.Z]` heading, `### Added` / `### Changed` / `### Fixed` groupings, link reference at the bottom), reformatted from the raw Changesets output
117167
- `.changeset/*.md`: deletions
118168
- `pnpm-lock.yaml`: small workspace dep update (only if internal `workspace:*` packages bumped — currently they don't because everything is in `ignore`)
119169

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@workflowbuilder/sdk",
3-
"version": "2.0.1",
3+
"version": "2.1.0",
44
"description": "React SDK for Workflow Builder — embed a visual, flow-based workflow editor in your app.",
55
"keywords": [
66
"workflow",

0 commit comments

Comments
 (0)