dillon1000/react

Commit

[compiler][be] Test runner (snap) now uses tsup bundled plugin (#32758)

Currently, `babel-plugin-react-compiler` is bundled with (almost) all
external dependencies. This is because babel traversal and ast logic is
not forward-compatible. Since `babel-plugin-react-compiler` needs to be
compatible with babel pipelines across a wide semvar range, we (1) set
this package's babel dependency to an early version and (2) inline babel
libraries into our bundle.

A few other packages in `react/compiler` depend on the compiler. This PR
moves `snap`, our test fixture compiler and evaluator, to use the
bundled version of `babel-plugin-react-compiler`. This decouples the
babel version used by `snap` with the version used by
`babel-plugin-react-compiler`, which means that `snap` now can test
features from newer babel versions (see
https://github.com/facebook/react/pull/32742).

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32758).
* #32759
* __->__ #32758
Browse files
Changed paths11 files
First-parent comparison
M compiler/packages/babel-plugin-react-compiler/package.json ModifiedM compiler/packages/babel-plugin-react-compiler/src/HIR/index.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/index.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/index.ts ModifiedM compiler/packages/babel-plugin-react-compiler/tsconfig.json ModifiedM compiler/packages/snap/package.json ModifiedM compiler/packages/snap/src/constants.ts ModifiedM compiler/packages/snap/src/runner-watch.ts ModifiedM compiler/packages/snap/src/runner-worker.ts ModifiedM compiler/packages/snap/src/runner.ts ModifiedM compiler/yarn.lock Modified
Patch

Files changed

Rendering syntax-highlighted changes…