Skip to content

Support Babel 8 dependency overrides - #1103

Merged
danez merged 336 commits into
reactjs:8.xfrom
Stanzilla:b.staneck/babel-8-support
Oct 31, 2026
Merged

danez merged 336 commits into
reactjs:8.xfrom
Stanzilla:b.staneck/babel-8-support

Conversation

@Stanzilla

@Stanzilla Stanzilla commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Babel 8 dependency overrides fail because react-docgen uses removed parser options and path APIs, and reads TypeScript AST fields that changed in Babel 8.

Use the synchronous config API, preserve Babel 7 parser defaults, replace removed path checks, and support both AST shapes for generic props, inherited interfaces, function types, and mapped types.

Run all library and CLI tests in separate Babel 7 and Babel 8 CI jobs. The Babel 8 jobs replace core, traverse, and types, so CLI subprocesses use Babel 8 too. Keep all jobs and both test suites running when a test fails. Use Babel 8's minimum supported Node.js version on the Node 22 job.

The declared Babel 7 dependency ranges remain unchanged. Packages build against those declared types before the runtime compatibility tests. Contributor instructions include the Babel 8 reproduction commands.

Validation

On macOS with Node.js 24.20.0:

  • Babel 7: all 1,447 library tests and 59 CLI tests pass with coverage.
  • Babel 8 (core 8.0.1, traverse/types 8.0.4): all 1,447 library tests and 59 CLI tests pass with coverage.
  • Existing snapshots pass unchanged. The two type-parameter test fixtures now read the correct type-argument field for each Babel version.
  • pnpm build and pnpm lint pass.

Closes #1102

@netlify

netlify Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for react-docgen ready!

Name Link
🔨 Latest commit d4e6aa4
🔍 Latest deploy log https://app.netlify.com/projects/react-docgen/deploys/6a560da1da13680008f14ad6
😎 Deploy Preview https://deploy-preview-1103--react-docgen.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 02f48c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
react-docgen Patch
@react-docgen/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Stanzilla
Stanzilla marked this pull request as ready for review July 14, 2026 09:15
renovate Bot and others added 26 commits July 19, 2026 05:06
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

* chore(deps): update dependency next to v16.2.11 [security]

* fix lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Tschinder <code@tschinder.de>
@Stanzilla
Stanzilla force-pushed the b.staneck/babel-8-support branch from ac9e94e to 66b8792 Compare October 30, 2026 11:02
@Stanzilla

Copy link
Copy Markdown
Contributor Author

@danez friendly ping

@danez
danez changed the base branch from main to 8.x October 31, 2026 11:54
danez added 6 commits October 31, 2026 13:03
Keep the 8.x dependency versions, Node.js support, release configuration,
and backported fixes while retaining the Babel 7/8 runtime compatibility
changes. Exclude Node.js 20 only from Babel 8 jobs and keep the Babel 8
minimum-version check.

Ignore age-dependent Browserslist warnings in CLI integration fixtures so
stderr checks remain stable with the pinned browser data.

Validated library and CLI builds, full lint, and coverage tests with both
Babel 7 and Babel 8 runtimes on Node.js 24.22.0.
@danez
danez merged commit 27167ae into reactjs:8.x Oct 31, 2026
17 checks passed
@danez

danez commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Sorry it took a while. I wasn't sure if i want to merge this, because for the next major i did refactor a lot of stuff, but it still makes sense to realese this now.
thank you.

@Stanzilla

Copy link
Copy Markdown
Contributor Author

Sorry it took a while. I wasn't sure if i want to merge this, because for the next major i did refactor a lot of stuff, but it still makes sense to realese this now. thank you.

no worries and thanks for the merge!

@Stanzilla
Stanzilla deleted the b.staneck/babel-8-support branch October 31, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Babel 8 in babelParser (loadPartialConfigSync)

2 participants