[*][lexical-devtools][lexical-playground] Chore: Update flow, hermes, and babel packages to latest#8795
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
26e523b to
6a07d65
Compare
…hermes, and babel deps and tooling for Babel 8
First of three commits (config/tooling; the next applies the type-import codemod, the third enables strict type-only elision). Each commit builds and passes CI on its own.
- Bump `flow-bin` `^0.316.0` -> `^0.321.0` and update `.flowconfig`: bump `[version]`, drop the removed `experimental.allow_variance_keywords`, and add `deprecated-type=error` to keep contributions on modern Flow syntax.
- Bump the `@babel/*` suite to `^8.x` (root, `lexical-devtools`, `lexical-playground`) and the eslint ecosystem to latest (`eslint` `^10.6.0`, `eslint-plugin-import-x` `^4.17.1`, `typescript-eslint` `^8.62.1`).
- `scripts/build.mjs` Babel 8 migration: drop the removed `allowDeclareFields` and never-supported `tsconfig` options from `@babel/preset-typescript`, and pin `@babel/preset-react` `development: false` so dev builds don't import `react/jsx-dev-runtime` (which crashed the website SSG with "jsxDEV is not a function"). Keep `onlyRemoveTypeImports: false` for now so the build works before the source is marked; the third commit removes it.
- `scripts/error-codes/transform-error-messages.mjs` + test: reference the injected AST node type via `import('@babel/core').types.CallExpression` and normalise Babel 8's injected helper imports in the test expectations.
- `.github/workflows/internal-registry.yml`: gate the dependency-check job on `github.repository == 'facebook/lexical'` so forks skip it instead of failing with a registry 401.
- Add `scripts/codemod/type-imports.mjs` (`pnpm run codemod-type-imports`): the reproducible, idempotent transform that marks type-only imports and inlines mixed type+value imports. It never touches bare side-effect imports, so it is safe to drop and re-run the next commit on a fresh rebase.
- Add the side-effect-import note to `lexical-code-prism/FacadePrism.ts`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sVuVyxU9nDpn2uBP5eeot
…e-imports codemod
Second of three commits. Mechanical output of `pnpm run codemod-type-imports`
(added in the previous commit): mark type-only imports so Babel 8 elides them —
pure type-only imports become `import type {X}`, and modules imported for both
values and types inline the type specifiers as `import {v, type T}`.
This commit is pure codemod output. If it conflicts on a future rebase, drop it,
rebase the config commit, and re-run `pnpm run codemod-type-imports` to
regenerate it (the transform is idempotent).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sVuVyxU9nDpn2uBP5eeot
…cit type-only imports for Babel 8 elision Third of three commits. Now that every type-only import is marked (previous commit), drop the `onlyRemoveTypeImports: false` override from `scripts/build.mjs` so `@babel/preset-typescript` only elides explicitly type-only imports, and turn on `@typescript-eslint/consistent-type-imports` (separate-type-imports) so the convention is enforced going forward. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sVuVyxU9nDpn2uBP5eeot
6a07d65 to
1f2ed3b
Compare
zurfyx
approved these changes
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates all Flow, Hermes, and Babel tooling to their latest versions and migrates the codebase for the Babel 8 API changes.
Dependencies
flow-bin^0.316.0→^0.321.0(and.flowconfig[version]); removedexperimental.allow_variance_keywords, which is default-on and now rejected as of Flow 0.317.@babel/*→^8.x(root,lexical-devtools,lexical-playground).eslint^10.6.0,eslint-plugin-import-x^4.17.1,typescript-eslint^8.62.1).flow-typedand thehermes-*packages were already current.Babel 8 migration (
scripts/build.mjs)allowDeclareFieldsand the never-supportedtsconfigoptions from@babel/preset-typescript.import type/ inlinetype(enforced repo-wide with@typescript-eslint/consistent-type-imports) instead of relying on anonlyRemoveTypeImportsoverride. This is the bulk of the diff.@babel/preset-reactdevelopment: falseso dev builds no longer importreact/jsx-dev-runtime, which was crashing the Docusaurus website build with "jsxDEV is not a function".import 'prismjs'the import rewrite had merged away (it initialises the globalPrism).Config / CI
.flowconfig: addeddeprecated-type=error(codebase already clean) to keep future contributions on modern Flow syntax.transform-error-messagesscript and its unit test for Babel 8's injected-helper output.internal-registryworkflow: the dependency-check job now runs only onfacebook/lexical, so forks skip it instead of failing with a registry 401.Test plan
Before
Flow 0.321 refuses to start on the old
.flowconfig, and the Babel 8 build fails —allowDeclareFields/tsconfigare rejected, unmarked type-only imports break bundling, and the website SSG throwsTypeError: jsxDEV is not a function.After
The
core-tests / integritysequence passes locally and in CI:pnpm run ci-check(tsc, tsc-scripts, tsc-extension, tsc-website, flow, prettier, lint)pnpm run build,pnpm run build-www,pnpm --filter @lexical/website build,pnpm --filter lexical-playground build-vercelpnpm run test-unit(4388 passed, 1 skipped)