Skip to content

Support Babel 8 dependency overrides - #1103

Open
Stanzilla wants to merge 6 commits into
reactjs:mainfrom
Stanzilla:b.staneck/babel-8-support
Open

Support Babel 8 dependency overrides#1103
Stanzilla wants to merge 6 commits into
reactjs:mainfrom
Stanzilla:b.staneck/babel-8-support

Conversation

@Stanzilla

@Stanzilla Stanzilla commented Jul 14, 2026

Copy link
Copy Markdown

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: 2fcf6eb

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
@danez

danez commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Thanks, I looked into it a little and there seems to be still a bunch of stuff missing. The first thing we need to do is run all tests with babel8 in parallel to babel 7. To see what is breaking.

@Stanzilla
Stanzilla force-pushed the b.staneck/babel-8-support branch from d4e6aa4 to ba11eec Compare September 8, 2026 11:14
@netlify

netlify Bot commented Sep 8, 2026

Copy link
Copy Markdown

Deploy Preview for react-docgen ready!

Name Link
🔨 Latest commit 2fcf6eb
🔍 Latest deploy log https://app.netlify.com/projects/react-docgen/deploys/6a9ff19ad70a1a0008551e40
😎 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.

@Stanzilla

Copy link
Copy Markdown
Author

Thanks, I looked into it a little and there seems to be still a bunch of stuff missing. The first thing we need to do is run all tests with babel8 in parallel to babel 7. To see what is breaking.

Sorry for the delay, I just picked this up and am willing to implement it end-to-end, please let me know if you have any preferences or if "fixing what broke" is good enough!

@Stanzilla Stanzilla changed the title Support Babel 8 overrides in babelParser Support Babel 8 dependency overrides Sep 8, 2026
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