Skip to content

[lexical][lexical-website] Chore: Changesets-based CHANGELOG with migration notes, plus changesets for everything since v0.52.0 - #9357

Merged
zurfyx merged 6 commits into
mainfrom
zurfyx/upgrade-guide
Oct 28, 2026
Merged

zurfyx merged 6 commits into
mainfrom
zurfyx/upgrade-guide

Conversation

@zurfyx

@zurfyx zurfyx commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Description

Lexical has no changelog that works across versions. CHANGELOG.md is built from git log subjects by a script that strips most punctuation ([lexical][lexical-html] Breaking Change: becomes lexicallexical-html Breaking Change, $insertList becomes insertList) and skips the newest commit. Whether a change is breaking depends on the PR title, and migration instructions only exist in hand-written release notes. People upgrading across several 0.x minors, and tools such as Renovate, Dependabot or coding agents, have nothing consistent to read.

This PR makes CHANGELOG.md the place to read everything that matters between any two versions, with migration instructions on every breaking change. It adds changesets (the layout of the changesets project, following the conventions in facebook/astryx) with no new dependency. The backfill of v0.23 to v0.52 is in the stacked PR #9359.

Commit 1: tooling and docs

  • Entry format: [category] summary. Categories: breaking, deprecation, feature, fix, perf, docs, chore. While 0.x, breaking means minor and everything else patch.
    • breaking requires Migration: and Detect: (optional Codemod:, Verify:).
    • deprecation requires Replacement: and Removal: (v0.NN, no earlier than v0.NN, or not scheduled).
    • A non-breaking entry with Verify: (a fix that changes observable output) renders under Behavior changes, right after Breaking changes. There is no new category; reviewers add Verify:.
    • Optional @handle and PR: #123 lines.
    • pnpm run changeset:new writes the file; pnpm run check-changesets (in ci-check) validates it.
  • Coverage check: the Changesets workflow runs the checker from the base revision.
    • It reports a published package's shipped code changed without a changeset, and a deleted package that has no [breaking] changeset.
    • The annotation and job summary include a link that opens the changeset prefilled on the PR's branch, built from the event payload.
    • It stays in warning mode (CHANGESET_COVERAGE: warn): contributors cannot skip it themselves, so failing would block drive-by PRs on a maintainer-only step. Per the maintainers guide, it flips to error once the skip-changeset label exists, and should not be branch-protected until about a month of clean runs.
    • The skip-changeset label skips it. A maintainer needs to create that label.
  • Release: update-changelog renders a ## vX.Y.Z (date) section with curated categories, Contributors, and ### All changes (every commit since the previous release, subjects unchanged, PRs linked), then deletes the consumed changesets.
    • It refuses a patch while a breaking change is pending.
    • It refuses to run again before the previous release PR is merged.
    • PRs and logins come from a PR: line, the squash subject (renames followed), the first-parent merge, or the GitHub API.
  • Shipping: lexical ships CHANGELOG.md. Prerelease packages also list pending changes as ## Unreleased, in the package copy only.
  • Reading tools:
    • pnpm run changelog:range -- --from X [--to Y] [--breaking] [--json] [--changelog F] prints a range between two versions. --breaking keeps breaking changes, behavior changes and deprecations; JSON marks behavior: true.
    • pnpm run release-notes prints a section as an optional starting point for the GitHub release.

Commit 2: changesets for everything merged since v0.52.0

No library runtime code or public API changes.

Open questions

  1. Is ~260 KB unpacked for CHANGELOG.md in lexical acceptable?
  2. Are the four Verify: fixes the right set for v0.53.0?

Changeset

.changeset/ship-changelog-in-lexical.md ([chore], lexical), plus the changesets for #9254 to #9353 described above.

Test plan

Before

$ grep -n 'lexicallexical-html\|Find  Replace' CHANGELOG.md
20:- lexicallexical-html Breaking Change honor createDOM overrides in default DOM export (#9231) Bob Ippolito
47:- lexical-playground Bug Fix Fix Find  Replace offsets across decorators and slots (#9186) Monier Ayman

After

$ pnpm run test-unit
 Test Files  383 passed (383)
$ pnpm run tsc && pnpm run tsc-test && pnpm run tsc-scripts && pnpm run prettier   # pass
$ node scripts/changesets/check.mjs --base origin/main
Changeset check passed: 27 pending changeset(s) valid; coverage: lexical changed, each named by a changeset.

Coverage link, as the workflow runs it (commit 1 alone, which lacks its changeset):

$ tail -3 summary.md
[Add the changeset in the browser](https://github.com/zurfyx/lexical/new/zurfyx/upgrade-guide?filename=.changeset%2Fship-changelog-md-in-lexical.md&value=---%0A'lexical'%3A%20patch%0A---%0A%0A%5Bchore%5D%20Ship%20CHANGELOG.md%20in%20lexical%0A) (opens a prefilled file on this pull request's branch; edit the summary before committing).

The latest release step in a throwaway clone with the real tags:

$ LATEST_RELEASE=v0.52.0 npm_package_version=0.53.0 node scripts/changesets/release.mjs --date 2026-10-30
Added v0.53.0 to CHANGELOG.md from 27 changeset(s).
$ grep -n '^### ' CHANGELOG.md | head -8
3:### Breaking changes
28:### Behavior changes
54:### Features
62:### Fixes
108:### Performance
112:### Other
116:### Contributors
120:### All changes

$ git tag v0.53.0; npm_package_version=0.54.0 node scripts/changesets/release.mjs
CHANGELOG.md has no v0.53.0 section, so the v0.53.0 release pull request is not merged yet. Merge it (it consumes the changesets for v0.53.0) before cutting v0.54.0; running again now would put the same changesets in both releases.

$ node scripts/npm/prepare-release.mjs   # lexical at 0.52.1-nightly.20261016.0
[lexical] CHANGELOG.md lists pending changes as Unreleased
$ sed -n 1p packages/lexical/CHANGELOG.md
## Unreleased

Bad input:

$ pnpm run changelog:range -- --from latest
--from must be a version such as 0.40.0, got "latest".
usage: pnpm run changelog:range -- --from <version> [--to <version>] [--breaking] [--json] [--changelog <file>]
(exit 2)

Full output is in the commit messages. The workflows themselves only run on GitHub. The Changesets job runs on this PR in warning mode.

@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lexical Ready Ready Preview Oct 28, 2026 3:14pm UTC
lexical-playground Ready Ready Preview Oct 28, 2026 3:14pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 15, 2026
@zurfyx zurfyx changed the title [lexical-website] Documentation Update: Add a structured upgrade guide for v0.23 through v0.52 [lexical][lexical-website] Chore: Changesets-based CHANGELOG with migration notes for every breaking change Oct 15, 2026
@zurfyx
zurfyx force-pushed the zurfyx/upgrade-guide branch from f31a10b to 2176dca Compare October 15, 2026 18:49
@zurfyx
zurfyx force-pushed the zurfyx/upgrade-guide branch from 2176dca to 00c7eee Compare October 15, 2026 19:31
@zurfyx zurfyx changed the title [lexical][lexical-website] Chore: Changesets-based CHANGELOG with migration notes for every breaking change [lexical][lexical-website] Chore: Changesets-based CHANGELOG with migration notes, plus changesets for everything since v0.52.0 Oct 15, 2026
Comment thread scripts/changesets/changelog.mjs Fixed
@zurfyx
zurfyx force-pushed the zurfyx/upgrade-guide branch from 00c7eee to 52ba6ec Compare October 15, 2026 20:44
zurfyx added a commit that referenced this pull request Oct 15, 2026
…havior changes and deprecations into CHANGELOG.md for v0.23 to v0.52, add an Upgrading page

## Description

Depends on the changesets tooling in #9357.

Past versions in CHANGELOG.md only list commits, so someone upgrading from
an older version cannot find what broke, or how to migrate, without reading
every GitHub release. Future versions get curated sections from changesets;
this gives v0.23.0 to v0.52.0 the same sections.

- Every version from v0.23.0 to v0.52.0 now starts with `### Breaking
  changes` (35 entries), `### Behavior changes` (43) and `### Deprecations`
  (29), each with packages and a PR link. The existing lines are kept,
  unchanged, under `### All changes` (the diff only adds lines).
- Rule, stated in the preamble: a breaking change needs a code change (an
  API removed or renamed, a type that no longer checks, a call that now
  throws) and has `Detect:` and `Migration:`. A behavior change keeps
  building but behaves or renders differently and has `Verify:`. The entries
  come from a verified inventory of those releases, which marked each change
  as manual, mechanical, or runtime-only ("no type or build error points at
  it"). Runtime-only entries are behavior changes, except #7341 (now throws)
  and #8603 (a signature change), which stay breaking.
- v0.50.0: the items its release notes list as "Behavior Changes to Watch"
  (#8765, #8908, #8884, #9059, #9061, #8940, #8283) are behavior changes;
  the listener return-type tightening (#8990), the new invariants (#6483)
  and the two items the release called breaking (#8938, #8995) stay
  breaking. Checked against the v0.50.0 release notes.
- Added the v0.42.0 removal of `@lexical/react/LexicalContextMenuPlugin`
  (#8199; present in the v0.41.0 tag, absent in v0.42.0).
- Deprecations come from a pass over every `@deprecated` tag added between
  consecutive tags v0.22.0 to v0.52.0, each checked against the previous tag
  and attributed with `git log -S`. Each has `Replacement:` and `Removal:`:
  the version that removed it, "no earlier than v0.53.0" for the ones #9316
  removes after v0.52.0, otherwise "not scheduled". Skipped: tags that only
  moved (`trimTextContentFromAnchor`, deprecated before v0.23.0) or restated
  earlier ones (v0.46.0 `HorizontalRulePlugin`, v0.51.0 `getScrollParent`),
  and the v0.47.0 `applyFormatToDom` deprecation that v0.48.0 reversed.
- Entries that mixed a breaking change and a deprecation are split with no
  double counting (#7357, #8360, #8661); #8350 and #8662 only deprecated
  aliases, so they are listed under Deprecations alone.
- `docs/upgrading.md` ("Upgrading" in the sidebar) is a short page: upgrade
  all packages together, read CHANGELOG.md between your version and the
  target (also at `node_modules/lexical/CHANGELOG.md`) or print that range,
  and a copy-paste `AGENTS.md` snippet that points coding agents at the
  installed changelog. Nothing is installed automatically.
- The repository CHANGELOG.md test checks every backfilled entry: `Detect:`
  and `Migration:` on breaking changes, `Verify:` on behavior changes,
  `Replacement:` and a valid `Removal:` on deprecations, a PR link on all.

## Test plan

### Before

```
$ pnpm run changelog:range -- --from 0.49.0 --breaking
Note: v0.50.0, v0.51.0, v0.52.0 have no curated sections (the changelog only lists their commits), so --breaking cannot show what changed there. Run without --breaking to read them in full.
No breaking changes, behavior changes or deprecations recorded after 0.49.0.
```

### After

```
$ git diff --numstat --diff-algorithm=patience HEAD~1 -- CHANGELOG.md
1412	0	CHANGELOG.md

$ pnpm run changelog:range -- --from 0.49.0 --breaking | grep '^## \|^### '
## v0.50.0 (2026-09-02)
### Breaking changes
### Behavior changes
### Deprecations
## v0.51.0 (2026-09-17)
### Breaking changes
### Deprecations
## v0.52.0 (2026-09-27)
### Breaking changes
### Behavior changes
### Deprecations

$ pnpm run changelog:range -- --from 0.49.0 --to 0.50.0 --breaking --json   # (kind, [(pr, behavior)])
[('breaking', [(8938, False), (8995, False), (8990, False), (6483, False)]), ('behavior', [(8765, True), (8908, True), (8884, True), (9059, True), (9061, True), (8940, True), (8283, True)]), ('deprecation', [(8918, False)])]

$ pnpm run test-unit scripts/__tests__/unit/changelog.test.ts scripts/__tests__/unit/changesets.test.ts
      Tests  63 passed (63)

$ pnpm -C packages/lexical-website run docusaurus build
[SUCCESS] Generated static files in "build".
```
…md from them at release

## Description

CHANGELOG.md is built from `git log` subjects by `scripts/npm/update-changelog.mjs`.
That script strips every character outside `[a-zA-Z0-9()\n \-,.#]`
(`[lexical][lexical-html] Breaking Change:` becomes
`lexicallexical-html Breaking Change`, `$insertList` becomes `insertList`),
drops the newest commit (`HEAD~1`), and has no categories, links or
migration notes. Whether a change is breaking is only as reliable as the PR
title, and migration instructions exist only in hand-written GitHub release
notes. Someone upgrading across several 0.x minors, or a tool such as
Renovate, Dependabot, or a coding agent, has nothing consistent to read.

This adds changesets, in the layout of the changesets project and following
the conventions of facebook/astryx, as the source of each changelog entry.
No new dependency: the scripts use Node built-ins only.

Format and checks:

- `.changeset/config.json` has one `fixed` group with every published package
  (globs) and ignores the private ones, so it stays compatible with standard
  changesets tooling. `.changeset/README.md` documents the format.
- A changeset body starts with `[category] one-line summary`; categories, in
  changelog order: `breaking`, `deprecation`, `feature`, `fix`, `perf`,
  `docs`, `chore` (aliases accepted). While 0.x, `breaking` uses `minor`,
  everything else `patch`; `major` is rejected. `breaking` needs
  `Migration:` and `Detect:` (optional `Codemod:`, `Verify:`); `deprecation`
  needs `Replacement:` and `Removal:` (a version, `no earlier than v0.NN`,
  or `not scheduled`). Optional `@handle` and `PR: #123` lines go under the
  summary.
- A non-breaking entry with a `Verify:` paragraph (a fix that changes
  observable output or behavior) is listed under `### Behavior changes`,
  right after the breaking changes, with no new category.
- `pnpm run check-changesets` (in `ci-check`, a hard failure) also rejects
  empty frontmatter (pointing at the `skip-changeset` label), frontmatter
  comments, duplicate packages, Markdown headings in the body, TODO
  placeholders, and a config that no longer covers every package.
- `pnpm run changeset:new -- --category fix --packages lexical --summary "..."`
  writes a valid file, with TODO lines for the required breaking or
  deprecation paragraphs.
- A `Changesets` workflow checks coverage on pull requests: a change to a
  published package's `src/` (tests, benches, mocks excluded), Flow types, or
  consumer-facing `package.json` fields (dependencies, exports, files, type,
  imports, typesVersions, browser, publishConfig, ...) needs a changeset
  naming that package; deleting a published package needs a `[breaking]` one.
  It runs the checker from the base revision, exempts release PRs only from
  this repository, honors a `skip-changeset` label, and starts in warning
  mode (`CHANGESET_COVERAGE: warn`: job summary plus an annotation with the
  file to add and a link that opens it prefilled on the pull request's
  branch, built from the event payload). It stays `warn` until the
  `skip-changeset` label exists.

Release:

- `update-changelog` (run by `postversion` on `latest`) now runs
  `scripts/changesets/release.mjs`. It renders the pending changesets as
  `## vX.Y.Z (date)` (the heading Renovate and Dependabot slice on) with
  Breaking changes, Behavior changes, Deprecations, Features, Fixes, Performance,
  Documentation, Other and Contributors, then `### All changes`: every commit
  since the previous release with its subject unchanged and its PR linked,
  the newest included and release bump commits excluded. It then deletes the
  consumed changesets.
- PRs come from a `PR:` line, the squash-merge subject of the commit that
  added the changeset (following renames, not copies), the first-parent
  `Merge pull request #N`, or, with `GITHUB_TOKEN` (now passed in
  `call-release.yml`), the GitHub API, which also gives contributor logins.
  Bots are not credited.
- It refuses to run while the previous stable release (newest tag or
  `LATEST_RELEASE`) has no section in CHANGELOG.md, i.e. its release PR is
  not merged, so a second run cannot consume the same changesets.
  `increment-version` and `update-changelog` refuse a `latest` patch while a
  `[breaking]` changeset is pending.
- `lexical` ships CHANGELOG.md (copied by `prepare-release`, gitignored). For
  a prerelease the copy also lists pending changesets as `## Unreleased`; the
  repository file is unchanged.
- `pnpm run changelog` previews the next section;
  `pnpm run changelog:range -- --from X [--to Y] [--breaking] [--json] [--changelog F]`
  prints a range, oldest first; `--breaking` keeps breaking changes,
  behavior changes and deprecations, and JSON marks behavior changes with
  `behavior: true` (strict arguments, exit 2 on bad input, a note naming
  versions `--breaking` cannot show);
  `pnpm run release-notes -- --version X` prints a section as a starting
  point for the GitHub release.

CONTRIBUTING.md, the PR template, AGENTS.md and the maintainers guide
describe all of this. The maintainers guide keeps the `[Breaking Change]`
title rule and adds the changeset rule beside it. No library runtime code
or public API changes.

## Test plan

### Before

The output of the old script, as committed in CHANGELOG.md on main:

```
$ grep -n 'lexicallexical-html\|Find  Replace\|fix insertList' CHANGELOG.md
20:- lexicallexical-html Breaking Change honor createDOM overrides in default DOM export (#9231) Bob Ippolito
47:- lexical-playground Bug Fix Fix Find  Replace offsets across decorators and slots (#9186) Monier Ayman
49:- lexical-website Documentation Update fix insertList argument in the commands guide (#9188) Sherry
```

### After

```
$ pnpm run test-unit scripts/__tests__/unit/changesets.test.ts scripts/__tests__/unit/changelog.test.ts
      Tests  64 passed (64)

$ pnpm install --frozen-lockfile && git diff --stat origin/main -- pnpm-lock.yaml
(no lockfile change)
```

Format errors:

```
$ node scripts/changesets/check.mjs --dir demo-cs
Changeset check found 4 problem(s):

- demo-cs/bad.md: comments are not supported in the frontmatter ("# note"); list only "'package': bump" lines and put notes in the body.
- demo-cs/bad.md: "lexical" is listed more than once in the frontmatter.
- demo-cs/bad.md: Markdown headings ("## Details") are not allowed in a changeset; they would break the CHANGELOG.md structure. Use a paragraph or **bold** text instead.
- demo-cs/empty.md: the frontmatter lists no packages. Empty changesets are not used here: if the change has no effect on people who use Lexical, delete this file and ask a maintainer for the `skip-changeset` label instead.
```

Coverage on this commit alone (it changes `lexical`'s `files`, and its
changeset is in the next commit):

```
$ node scripts/changesets/check.mjs --base origin/main --head HEAD --coverage warn
warning: This pull request changes published code without a changeset for:
  lexical: packages/lexical/package.json (files)

Add a changeset, e.g. with

  pnpm run changeset:new -- --category fix --packages lexical --summary "..."
...
Changeset check passed: 0 pending changeset(s) valid; coverage: 1 warning(s), reported only.
```

The same check as the Changesets workflow runs it, with the event values it
copies into the environment:

```
$ GITHUB_ACTIONS=true GITHUB_STEP_SUMMARY=summary.md HEAD_REPO=zurfyx/lexical HEAD_REF=zurfyx/upgrade-guide \
    PR_TITLE="[lexical] Chore: Ship CHANGELOG.md in lexical" node scripts/changesets/check.mjs --base origin/main --coverage warn
$ tail -3 summary.md
[Add the changeset in the browser](https://github.com/zurfyx/lexical/new/zurfyx/upgrade-guide?filename=.changeset%2Fship-changelog-md-in-lexical.md&value=---%0A'lexical'%3A%20patch%0A---%0A%0A%5Bchore%5D%20Ship%20CHANGELOG.md%20in%20lexical%0A) (opens a prefilled file on this pull request's branch; edit the summary before committing).

See "Changesets" in CONTRIBUTING.md.
```

Range input checks:

```
$ pnpm run changelog:range -- --from latest
--from must be a version such as 0.40.0, got "latest".
usage: pnpm run changelog:range -- --from <version> [--to <version>] [--breaking] [--json] [--changelog <file>]
(exit 2)
$ pnpm run changelog:range -- --from 0.50.0 --bogus
Unknown option '--bogus'
(exit 2)
```

Release dry runs with the changesets from the next commit are in that
commit's message. `pnpm run tsc-scripts`, `pnpm run tsc-test`, ESLint and
Prettier pass. The workflows themselves only run on GitHub.
## Description

The changes merged since v0.52.0 predate changesets, so without entries the
v0.53.0 section would leave them out, including the breaking removal of the
deprecated import extensions (#9316).

This adds a changeset for every user-facing pull request in
v0.52.0..main, written from each pull request, with a `PR: #N` line (they
land in this pull request rather than the original ones) and the original
author's handle:

- breaking: #9316, with the full replacement table as `Migration:`
- feature: #9312
- fix: #9335, #9332, #9331, #9328, #9325, #9317, #9321, #9320, #9319,
  #9283, #9303, #9295, #9291, #9260, #9300, #9301, #9272, #9267, #9302,
  #9261, #9262, #9263, #9258
- perf: #9264

Skipped as not user-facing: dependency bumps (all devDependencies), website
and docs updates, test and CI changes, the private devtools extension and
eslint-plugin-internal, and #9353 (a behavior-preserving Flow `Object` to
`any` change).

Four fixes change observable output or behavior, so their changesets have
a `Verify:` paragraph and are listed under Behavior changes: #9303 (new
tabs get no `window.opener`), #9272 (imported code content is normalized),
#9261 (`$patchStyleText` styles the selection it is given), #9319 (editor
keys and namespaces are a counter without a DOM).

It also adds a `[chore]` changeset for this pull request itself, which adds
CHANGELOG.md to the `lexical` package's `files`.

## Test plan

### Before

```
$ node scripts/changesets/check.mjs --base origin/main --head HEAD --coverage warn   # at the previous commit
warning: This pull request changes published code without a changeset for:
  lexical: packages/lexical/package.json (files)
...
Changeset check passed: 0 pending changeset(s) valid; coverage: 1 warning(s), reported only.
```

### After

```
$ node scripts/changesets/check.mjs --base origin/main
Changeset check passed: 27 pending changeset(s) valid; coverage: lexical changed, each named by a changeset.
```

The `latest` release step in a throwaway clone of this branch, with the
real tags:

```
$ LATEST_RELEASE=v0.52.0 npm_package_version=0.53.0 node scripts/changesets/release.mjs --date 2026-10-30
Added v0.53.0 to CHANGELOG.md from 27 changeset(s).
$ ls .changeset
changelog.cjs
config.json
README.md
$ sed -n 1,9p CHANGELOG.md
## v0.53.0 (2026-10-30)

### Breaking changes

- **@lexical/code-core, @lexical/code-shiki, @lexical/html, @lexical/link, @lexical/list, @lexical/mdast, @lexical/rich-text, @lexical/table**: Remove the extensions deprecated in v0.52.0 and earlier ([#9316](#9316))

  The deprecated import and alias extensions are removed. The `*ImportRules`
  arrays, including `HorizontalRuleImportRules`, stay.

$ grep -n '^### ' CHANGELOG.md | head -8
3:### Breaking changes
28:### Behavior changes
54:### Features
62:### Fixes
108:### Performance
112:### Other
116:### Contributors
120:### All changes
$ sed -n '/^### Behavior changes/,+7p' CHANGELOG.md
### Behavior changes

- **@lexical/link**: Open new-tab links from `ClickableLinkPlugin` / `registerClickableLink` without `window.opener` ([#9303](#9303))

  This prevents the opened page from navigating the editor's tab (reverse tabnabbing). Same-tab opens are unchanged.

  Verify: pages opened from editor links that relied on `window.opener`.

$ node scripts/changesets/range.mjs --from 0.52.0 --breaking --json   # (kind, [(pr, behavior)])
[('breaking', [(9316, False)]), ('behavior', [(9303, True), (9272, True), (9261, True), (9319, True)])]
$ sed -n '/^### Contributors/,+2p' CHANGELOG.md
### Contributors

@Tabisharaza, @etrepum, @mbret, @maximilliangrand, @Vedthakar, @rinarakaki, @potatowagon, @followdarko, Gerard Rovira
$ sed -n '/^### All changes/,/^## v0.52.0/p' CHANGELOG.md | sed -n '5,6p;$p' | head -2
- [lexical-yjs][Chore] Change last `Object` to `any` in lexical ([#9353](#9353)) Sam Zhou
- [lexical-eslint-plugin-internal] Chore: lint window messaging channel scoping ([#9339](#9339)) Sherry
```

(`### All changes` has 50 lines: the 48 commits after v0.52.0, without the
`v0.52.0 (#9252)` bump commit, plus this branch's two commits.)

Running again before that release PR is merged:

```
$ git tag v0.53.0   # tagged, but CHANGELOG.md on main has no v0.53.0 section
$ npm_package_version=0.54.0 node scripts/changesets/release.mjs
CHANGELOG.md has no v0.53.0 section, so the v0.53.0 release pull request is not merged yet. Merge it (it consumes the changesets for v0.53.0) before cutting v0.54.0; running again now would put the same changesets in both releases.
(exit 1)
$ npm_package_version=0.53.1 node scripts/changesets/release.mjs
Refusing to release 0.53.1 as a patch: 1 pending [breaking] changeset(s) need a minor release:
  - .changeset/remove-deprecated-import-extensions.md: Remove the extensions deprecated in v0.52.0 and earlier
Run the release with the "minor" increment instead.
(exit 1)
```

A prerelease publish (lexical at 0.52.1-nightly.20261016.0, nothing built,
so the export check that follows fails as expected):

```
$ node scripts/npm/prepare-release.mjs
[lexical] CHANGELOG.md lists pending changes as Unreleased
[lexical] package.json references files that are not present in packages/lexical:
  ./dist/Lexical.dev.js
$ sed -n 1,5p packages/lexical/CHANGELOG.md
## Unreleased

Merged after the latest stable release and included in 0.52.1-nightly.20261016.0. These entries move into a version section when the next stable release is cut.

### Breaking changes
$ git status --short CHANGELOG.md
(clean: only the gitignored package copy changed)
```
@zurfyx
zurfyx force-pushed the zurfyx/upgrade-guide branch from 52ba6ec to ac5bcf7 Compare October 15, 2026 20:47
zurfyx added a commit that referenced this pull request Oct 15, 2026
…havior changes and deprecations into CHANGELOG.md for v0.23 to v0.52, add an Upgrading page

## Description

Depends on the changesets tooling in #9357.

Past versions in CHANGELOG.md only list commits, so someone upgrading from
an older version cannot find what broke, or how to migrate, without reading
every GitHub release. Future versions get curated sections from changesets;
this gives v0.23.0 to v0.52.0 the same sections.

- Every version from v0.23.0 to v0.52.0 now starts with `### Breaking
  changes` (35 entries), `### Behavior changes` (43) and `### Deprecations`
  (29), each with packages and a PR link. The existing lines are kept,
  unchanged, under `### All changes` (the diff only adds lines).
- Rule, stated in the preamble: a breaking change needs a code change (an
  API removed or renamed, a type that no longer checks, a call that now
  throws) and has `Detect:` and `Migration:`. A behavior change keeps
  building but behaves or renders differently and has `Verify:`. The entries
  come from a verified inventory of those releases, which marked each change
  as manual, mechanical, or runtime-only ("no type or build error points at
  it"). Runtime-only entries are behavior changes, except #7341 (now throws)
  and #8603 (a signature change), which stay breaking.
- v0.50.0: the items its release notes list as "Behavior Changes to Watch"
  (#8765, #8908, #8884, #9059, #9061, #8940, #8283) are behavior changes;
  the listener return-type tightening (#8990), the new invariants (#6483)
  and the two items the release called breaking (#8938, #8995) stay
  breaking. Checked against the v0.50.0 release notes.
- Added the v0.42.0 removal of `@lexical/react/LexicalContextMenuPlugin`
  (#8199; present in the v0.41.0 tag, absent in v0.42.0).
- Deprecations come from a pass over every `@deprecated` tag added between
  consecutive tags v0.22.0 to v0.52.0, each checked against the previous tag
  and attributed with `git log -S`. Each has `Replacement:` and `Removal:`:
  the version that removed it, "no earlier than v0.53.0" for the ones #9316
  removes after v0.52.0, otherwise "not scheduled". Skipped: tags that only
  moved (`trimTextContentFromAnchor`, deprecated before v0.23.0) or restated
  earlier ones (v0.46.0 `HorizontalRulePlugin`, v0.51.0 `getScrollParent`),
  and the v0.47.0 `applyFormatToDom` deprecation that v0.48.0 reversed.
- Entries that mixed a breaking change and a deprecation are split with no
  double counting (#7357, #8360, #8661); #8350 and #8662 only deprecated
  aliases, so they are listed under Deprecations alone.
- `docs/upgrading.md` ("Upgrading" in the sidebar) is a short page: upgrade
  all packages together, read CHANGELOG.md between your version and the
  target (also at `node_modules/lexical/CHANGELOG.md`) or print that range,
  and a copy-paste `AGENTS.md` snippet that points coding agents at the
  installed changelog. Nothing is installed automatically.
- The repository CHANGELOG.md test checks every backfilled entry: `Detect:`
  and `Migration:` on breaking changes, `Verify:` on behavior changes,
  `Replacement:` and a valid `Removal:` on deprecations, a PR link on all.

## Test plan

### Before

```
$ pnpm run changelog:range -- --from 0.49.0 --breaking
Note: v0.50.0, v0.51.0, v0.52.0 have no curated sections (the changelog only lists their commits), so --breaking cannot show what changed there. Run without --breaking to read them in full.
No breaking changes, behavior changes or deprecations recorded after 0.49.0.
```

### After

```
$ git diff --numstat --diff-algorithm=patience HEAD~1 -- CHANGELOG.md
1412	0	CHANGELOG.md

$ pnpm run changelog:range -- --from 0.49.0 --breaking | grep '^## \|^### '
## v0.50.0 (2026-09-02)
### Breaking changes
### Behavior changes
### Deprecations
## v0.51.0 (2026-09-17)
### Breaking changes
### Deprecations
## v0.52.0 (2026-09-27)
### Breaking changes
### Behavior changes
### Deprecations

$ pnpm run changelog:range -- --from 0.49.0 --to 0.50.0 --breaking --json   # (kind, [(pr, behavior)])
[('breaking', [(8938, False), (8995, False), (8990, False), (6483, False)]), ('behavior', [(8765, True), (8908, True), (8884, True), (9059, True), (9061, True), (8940, True), (8283, True)]), ('deprecation', [(8918, False)])]

$ pnpm run test-unit scripts/__tests__/unit/changelog.test.ts scripts/__tests__/unit/changesets.test.ts
      Tests  63 passed (63)

$ pnpm -C packages/lexical-website run docusaurus build
[SUCCESS] Generated static files in "build".
```
@zurfyx
zurfyx marked this pull request as ready for review October 27, 2026 20:21
…ed since #9353

## Description

The changesets in this PR covered main up to #9353. Since then, 27 PRs
that change a published package's shipped code have merged without one,
so the v0.53.0 release would list them only under "All changes". This adds
a changeset for each, with a `PR:` line and the author's handle:

- `[breaking]`: #9478 (`@lexical/mdast` table alignment moves out of the
  `mdastTableAlign` NodeState) and #9329 (`reconcileObservedMutation`,
  `@internal`), both with `Migration:` and `Detect:`.
- `[feature]`: #9452, #9421, #9380 (experimental), #9360, #9365.
- `[perf]`: #9349.
- `[fix]`: the remaining 19. #9396, #9392, #9270 and #9360 carry `Verify:`
  because they change observable output.

Website, playground, devtools, CI and internal lint changes need none.

## Test plan

### Before

```
$ git log --format=%s fd661f0..origin/main   # merged since this PR's base
(27 PRs touching published packages' src/flow, none with a changeset)
```

### After

```
$ pnpm run check-changesets
Changeset check passed: 54 pending changeset(s) valid.

$ pnpm run changelog
## v0.53.0 (2026-10-27)
### Breaking changes
- **lexical, @lexical/clipboard, @lexical/selection, @lexical/table**: Let mouse drags select across inline decorators; ... (#9329)
- **@lexical/mdast**: `MdastTableExtension` reads and writes GFM tables, ... (#9478)
- **@lexical/code-core, ...**: Remove the extensions deprecated in v0.52.0 and earlier (#9316)
### Behavior changes
...
```
## Description

#9479 merged after the changesets in this PR were written. This adds its
`[breaking]` entry, with `Migration:` and `Detect:`, so v0.53.0 lists it
under Breaking changes.

## Test plan

### After

```
$ pnpm run check-changesets
Changeset check passed: 55 pending changeset(s) valid.
```
…hangeset at the @lexical/html/BlockIdHTMLExtension entry point

## Description

#9474 moved `BlockIdHTMLExtension` out of the `@lexical/html` barrel into
its own entry point. Both changes are unreleased, so v0.53.0 users only ever
see the new import path: this updates the #9421 changeset to name it rather
than adding a breaking entry.

## Test plan

### After

```
$ pnpm run check-changesets
Changeset check passed: 55 pending changeset(s) valid.
```
## Description

#9481 merged after the changesets in this PR were written. This adds its
`[fix]` entry, with `Verify:` since Markdown export output changes.

## Test plan

### After

```
$ pnpm run check-changesets
Changeset check passed: 56 pending changeset(s) valid.
```
@zurfyx
zurfyx added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit dca29f2 Oct 28, 2026
49 of 50 checks passed
@zurfyx zurfyx mentioned this pull request Oct 28, 2026
zurfyx added a commit that referenced this pull request Oct 28, 2026
…havior changes and deprecations into CHANGELOG.md for v0.23 to v0.52, add an Upgrading page

Depends on the changesets tooling in #9357.

Past versions in CHANGELOG.md only list commits, so someone upgrading from
an older version cannot find what broke, or how to migrate, without reading
every GitHub release. Future versions get curated sections from changesets;
this gives v0.23.0 to v0.52.0 the same sections.

- Every version from v0.23.0 to v0.52.0 now starts with `### Breaking
  changes` (35 entries), `### Behavior changes` (43) and `### Deprecations`
  (29), each with packages and a PR link. The existing lines are kept,
  unchanged, under `### All changes` (the diff only adds lines).
- Rule, stated in the preamble: a breaking change needs a code change (an
  API removed or renamed, a type that no longer checks, a call that now
  throws) and has `Detect:` and `Migration:`. A behavior change keeps
  building but behaves or renders differently and has `Verify:`. The entries
  come from a verified inventory of those releases, which marked each change
  as manual, mechanical, or runtime-only ("no type or build error points at
  it"). Runtime-only entries are behavior changes, except #7341 (now throws)
  and #8603 (a signature change), which stay breaking.
- v0.50.0: the items its release notes list as "Behavior Changes to Watch"
  (#8765, #8908, #8884, #9059, #9061, #8940, #8283) are behavior changes;
  the listener return-type tightening (#8990), the new invariants (#6483)
  and the two items the release called breaking (#8938, #8995) stay
  breaking. Checked against the v0.50.0 release notes.
- Added the v0.42.0 removal of `@lexical/react/LexicalContextMenuPlugin`
  (#8199; present in the v0.41.0 tag, absent in v0.42.0).
- Deprecations come from a pass over every `@deprecated` tag added between
  consecutive tags v0.22.0 to v0.52.0, each checked against the previous tag
  and attributed with `git log -S`. Each has `Replacement:` and `Removal:`:
  the version that removed it, "no earlier than v0.53.0" for the ones #9316
  removes after v0.52.0, otherwise "not scheduled". Skipped: tags that only
  moved (`trimTextContentFromAnchor`, deprecated before v0.23.0) or restated
  earlier ones (v0.46.0 `HorizontalRulePlugin`, v0.51.0 `getScrollParent`),
  and the v0.47.0 `applyFormatToDom` deprecation that v0.48.0 reversed.
- Entries that mixed a breaking change and a deprecation are split with no
  double counting (#7357, #8360, #8661); #8350 and #8662 only deprecated
  aliases, so they are listed under Deprecations alone.
- `docs/upgrading.md` ("Upgrading" in the sidebar) is a short page: upgrade
  all packages together, read CHANGELOG.md between your version and the
  target (also at `node_modules/lexical/CHANGELOG.md`) or print that range,
  and a copy-paste `AGENTS.md` snippet that points coding agents at the
  installed changelog. Nothing is installed automatically.
- The repository CHANGELOG.md test checks every backfilled entry: `Detect:`
  and `Migration:` on breaking changes, `Verify:` on behavior changes,
  `Replacement:` and a valid `Removal:` on deprecations, a PR link on all.

```
$ pnpm run changelog:range -- --from 0.49.0 --breaking
Note: v0.50.0, v0.51.0, v0.52.0 have no curated sections (the changelog only lists their commits), so --breaking cannot show what changed there. Run without --breaking to read them in full.
No breaking changes, behavior changes or deprecations recorded after 0.49.0.
```

```
$ git diff --numstat --diff-algorithm=patience HEAD~1 -- CHANGELOG.md
1412	0	CHANGELOG.md

$ pnpm run changelog:range -- --from 0.49.0 --breaking | grep '^## \|^### '

$ pnpm run changelog:range -- --from 0.49.0 --to 0.50.0 --breaking --json   # (kind, [(pr, behavior)])
[('breaking', [(8938, False), (8995, False), (8990, False), (6483, False)]), ('behavior', [(8765, True), (8908, True), (8884, True), (9059, True), (9061, True), (8940, True), (8283, True)]), ('deprecation', [(8918, False)])]

$ pnpm run test-unit scripts/__tests__/unit/changelog.test.ts scripts/__tests__/unit/changesets.test.ts
      Tests  63 passed (63)

$ pnpm -C packages/lexical-website run docusaurus build
[SUCCESS] Generated static files in "build".
```

This branch was successfully deployed

2 active deployments
Preview – lexical — cd9e3aff Deployed Oct 28, 2026 by vercel[bot]
Preview – lexical-playground — cd9e3aff Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants