Skip to content

[*] Breaking change: Remove extensions deprecated as of v0.52.0 - #9316

Open
etrepum wants to merge 3 commits into
facebook:mainfrom
etrepum:claude/remove-deprecated-extensions-2rej5v
Open

etrepum wants to merge 3 commits into
facebook:mainfrom
etrepum:claude/remove-deprecated-extensions-2rej5v

Conversation

@etrepum

@etrepum etrepum commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Nine extensions were still exported only as deprecated shims for their replacements. Each one's @deprecated tag is present in the v0.52.0 release, and this removes them:

Removed Use instead Deprecated by
CodeImportExtension (@lexical/code-core) CodeExtension v0.49.0 or earlier
CodeHighlighterShikiExtension, CodeHighlighterShikiConfig (@lexical/code-shiki) CodeShikiExtension with {tokenizer} v0.49.0 or earlier
HorizontalRuleImportExtension (@lexical/html) HorizontalRuleExtension plus any extension that brings in CoreImportExtension v0.49.0 or earlier
LinkImportExtension (@lexical/link) LinkExtension v0.49.0 or earlier
ListImportExtension (@lexical/list) ListExtension v0.49.0 or earlier
RichTextImportExtension (@lexical/rich-text) RichTextExtension v0.49.0 or earlier
TableImportExtension (@lexical/table) TableExtension v0.49.0 or earlier
MdastImportExtension, MdastExportExtension, MdastImportExtensionOutput, MdastExportExtensionOutput (@lexical/mdast) MdastExtension, MdastExtensionOutput v0.52.0

The *ImportRules arrays (including HorizontalRuleImportRules) are not extensions and stay. The Flow declarations for code-shiki and mdast drop the same names, the tests that only checked the aliases still worked are removed, the remaining mdast tests (and the mdast-editor dev example's tests) use MdastExtension directly, and the DOM import docs no longer mention the aliases.

Test plan

Before

$ git grep -cE '(^|[^/])\b(CodeImportExtension|CodeHighlighterShikiExtension|HorizontalRuleImportExtension|LinkImportExtension|ListImportExtension|RichTextImportExtension|TableImportExtension|MdastExportExtension|MdastImportExtension)\b' -- 'packages/*/src/index.ts' 'packages/*/src/import/index.ts'
packages/lexical-code-core/src/index.ts:1
packages/lexical-code-shiki/src/index.ts:1
packages/lexical-html/src/import/index.ts:1
packages/lexical-html/src/index.ts:1
packages/lexical-link/src/index.ts:1
packages/lexical-list/src/index.ts:1
packages/lexical-mdast/src/index.ts:2
packages/lexical-rich-text/src/index.ts:1
packages/lexical-table/src/index.ts:1

After

$ git grep -cE '<same pattern>' -- 'packages/*/src/index.ts' 'packages/*/src/import/index.ts'
(no output, exit 1)

$ ./node_modules/.bin/tsc -p .            # exit 0
$ pnpm run flow
Found 0 errors

$ vitest run --project unit packages/lexical-{code-core,code-shiki,html,link,list,rich-text,table,mdast} dev-examples/mdast-editor
 Test Files  100 passed (100)
      Tests  1268 passed (1268)

$ vitest run scripts/__tests__/unit/treeShakingSource.test.ts
 Test Files  1 passed (1)
      Tests  340 passed (340)

The mdast-editor browser test only had the alias renamed; it type-checks (tsc -p dev-examples/mdast-editor/tsconfig.json) but was not run here, since this environment's Chromium build doesn't match the Playwright version.

…exical-list][lexical-mdast][lexical-rich-text][lexical-table][lexical-website] Breaking change: Remove extensions deprecated as of v0.52.0

## Description

Nine extensions were still exported only as deprecated shims for their replacements. Each one's `@deprecated` tag is present in the v0.52.0 release, and this removes them:

| Removed | Use instead | Deprecated by |
| --- | --- | --- |
| `CodeImportExtension` (`@lexical/code-core`) | `CodeExtension` | v0.49.0 or earlier |
| `CodeHighlighterShikiExtension`, `CodeHighlighterShikiConfig` (`@lexical/code-shiki`) | `CodeShikiExtension` with `{tokenizer}` | v0.49.0 or earlier |
| `HorizontalRuleImportExtension` (`@lexical/html`) | `HorizontalRuleExtension` plus any extension that brings in `CoreImportExtension` | v0.49.0 or earlier |
| `LinkImportExtension` (`@lexical/link`) | `LinkExtension` | v0.49.0 or earlier |
| `ListImportExtension` (`@lexical/list`) | `ListExtension` | v0.49.0 or earlier |
| `RichTextImportExtension` (`@lexical/rich-text`) | `RichTextExtension` | v0.49.0 or earlier |
| `TableImportExtension` (`@lexical/table`) | `TableExtension` | v0.49.0 or earlier |
| `MdastImportExtension`, `MdastExportExtension`, `MdastImportExtensionOutput`, `MdastExportExtensionOutput` (`@lexical/mdast`) | `MdastExtension`, `MdastExtensionOutput` | v0.52.0 |

The `*ImportRules` arrays (including `HorizontalRuleImportRules`) are not extensions and stay. The Flow declarations for code-shiki and mdast drop the same names, the tests that only checked the aliases still worked are removed, the remaining mdast tests (and the mdast-editor dev example's tests) use `MdastExtension` directly, and the DOM import docs no longer mention the aliases.

## Test plan

### Before

```
$ git grep -cE '(^|[^/])\b(CodeImportExtension|CodeHighlighterShikiExtension|HorizontalRuleImportExtension|LinkImportExtension|ListImportExtension|RichTextImportExtension|TableImportExtension|MdastExportExtension|MdastImportExtension)\b' -- 'packages/*/src/index.ts' 'packages/*/src/import/index.ts'
packages/lexical-code-core/src/index.ts:1
packages/lexical-code-shiki/src/index.ts:1
packages/lexical-html/src/import/index.ts:1
packages/lexical-html/src/index.ts:1
packages/lexical-link/src/index.ts:1
packages/lexical-list/src/index.ts:1
packages/lexical-mdast/src/index.ts:2
packages/lexical-rich-text/src/index.ts:1
packages/lexical-table/src/index.ts:1
```

### After

```
$ git grep -cE '<same pattern>' -- 'packages/*/src/index.ts' 'packages/*/src/import/index.ts'
(no output, exit 1)

$ ./node_modules/.bin/tsc -p .            # exit 0
$ pnpm run flow
Found 0 errors

$ vitest run --project unit packages/lexical-{code-core,code-shiki,html,link,list,rich-text,table,mdast} dev-examples/mdast-editor
 Test Files  100 passed (100)
      Tests  1268 passed (1268)

$ vitest run scripts/__tests__/unit/treeShakingSource.test.ts
 Test Files  1 passed (1)
      Tests  340 passed (340)
```

The mdast-editor browser test only had the alias renamed; it type-checks (`tsc -p dev-examples/mdast-editor/tsconfig.json`) but was not run here, since this environment's Chromium build doesn't match the Playwright version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 2, 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 3, 2026 4:03am UTC
lexical-playground Ready Ready Preview Oct 3, 2026 4:03am 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 2, 2026
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Oct 2, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 799a2160 Deployed Oct 3, 2026 by vercel[bot]
Preview – lexical-playground — 799a2160 Deployed Oct 3, 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. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants