Skip to content

[lexical-code-shiki] Chore: Upgrade shiki to ^4.0.2#8330

Merged
etrepum merged 3 commits intofacebook:mainfrom
etrepum:claude/update-shikijs-version-qYiNE
Apr 11, 2026
Merged

[lexical-code-shiki] Chore: Upgrade shiki to ^4.0.2#8330
etrepum merged 3 commits intofacebook:mainfrom
etrepum:claude/update-shikijs-version-qYiNE

Conversation

@etrepum
Copy link
Copy Markdown
Collaborator

@etrepum etrepum commented Apr 11, 2026

Description

Bumps shiki and all @shikijs/* packages from ^3.7.0 to ^4.0.2 (latest). The only breaking changes in v4.0.0 are dropping Node v18 support (we already require Node >=20.19.0) and renaming internal APIs (ShikiInternal -> ShikiPrimitive, createdBundledHighlighter -> createBundledHighlighter). None of the APIs used by @lexical/code-shiki are affected: createHighlighterCoreSync, codeToTokens (highlighter method), loadLanguage, loadTheme, isSpecialLang, isSpecialTheme, getTokenStyleObject, stringifyTokenStyle, bundledLanguagesInfo, bundledThemesInfo, and ThemedToken/TokensResult types all remain stable.

Test plan

No expected changes, all tests should pass as-is

claude added 2 commits April 11, 2026 03:51
Bumps shiki and all @shikijs/* packages from ^3.7.0 to ^4.0.2 (latest).
The only breaking changes in v4.0.0 are dropping Node v18 support (we already
require Node >=20.19.0) and renaming internal APIs (ShikiInternal ->
ShikiPrimitive, createdBundledHighlighter -> createBundledHighlighter). None
of the APIs used by @lexical/code-shiki are affected: createHighlighterCoreSync,
codeToTokens (highlighter method), loadLanguage, loadTheme, isSpecialLang,
isSpecialTheme, getTokenStyleObject, stringifyTokenStyle, bundledLanguagesInfo,
bundledThemesInfo, and ThemedToken/TokensResult types all remain stable.

Also bumps the root pnpm override for @shikijs/types from 3.20.0 to 4.0.2
so the whole workspace resolves consistently.

https://claude.ai/code/session_01AjBVBzGNkvmJgGuAc9kePB
The @shikijs/types override was added when the workspace used @shikijs/*@3.x,
where loose semver ranges on @shikijs/types produced duplicate resolutions and
the override was needed to deduplicate them.

With @shikijs/*@4.0.2, every shiki package pins @shikijs/types to an exact
version, so the @lexical/code-shiki dependency tree already deduplicates on
its own. The only remaining consumers of @shikijs/types in this workspace are
the 3.x packages pulled transitively by typedoc via @gerrit0/mini-shiki,
which are isolated to docs generation and never cross the lexical-code-shiki
boundary. Forcing those 3.x packages to use 4.x types is also semantically
incorrect since they were published against 3.x type shapes.

Verified that tsc, flow, prettier, lint, unit tests, and `pnpm run build-docs`
(which exercises the mini-shiki typedoc path) all still succeed without the
override.

https://claude.ai/code/session_01AjBVBzGNkvmJgGuAc9kePB
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Apr 11, 2026
@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 Apr 11, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 11, 2026

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

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Apr 11, 2026 4:06am
lexical-playground Ready Ready Preview, Comment Apr 11, 2026 4:06am

Request Review

@etrepum etrepum added this pull request to the merge queue Apr 11, 2026
Merged via the queue into facebook:main with commit 8affc49 Apr 11, 2026
37 checks passed
@etrepum etrepum deleted the claude/update-shikijs-version-qYiNE branch April 19, 2026 02:33
@etrepum etrepum mentioned this pull request Apr 27, 2026
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.

3 participants