Compare commits

..

2 Commits

Author SHA1 Message Date
Mofei Zhang
533db98c6f [compiler][snap] Fix test filter + watch mode
Accidentally broke this when migrating our test runner to use the bundled build https://github.com/facebook/react/pull/32758

The fix is pretty simple. File watcher should listen for changes in `packages/babel-plugin-react-compiler` instead of `cwd`, which is now `packages/snap`.
2025-03-28 15:58:06 -04:00
mofeiZ
8039f1b2a0 [compiler] Fix inferEffectDependencies lint false positives (#32769)
Currently, inferred effect dependencies are considered a
"compiler-required" feature. This means that untransformed callsites
should escalate to a build error.

`ValidateNoUntransformedReferences` iterates 'special effect' callsites
and checks that the compiler was able to successfully transform them.
Prior to this PR, this relied on checking the number of arguments passed
to this special effect.

This obviously doesn't work with `noEmit: true`, which is used for our
eslint plugin (this avoids mutating the babel program as other linters
run with the same ast). This PR adds a set of `babel.SourceLocation`s to
do best effort matching in this mode.
2025-03-27 12:18:50 -04:00

View File

@@ -146,7 +146,7 @@ function subscribeFilterFile(
state: RunnerState,
onChange: (state: RunnerState) => void,
) {
watcher.subscribe(process.cwd(), async (err, events) => {
watcher.subscribe(PROJECT_ROOT, async (err, events) => {
if (err) {
console.error(err);
process.exit(1);