-
Notifications
You must be signed in to change notification settings - Fork 48.2k
Comparing changes
Open a pull request
base repository: facebook/react
base: 313332d1
head repository: facebook/react
compare: 63779030
- 19 commits
- 77 files changed
- 8 contributors
Commits on Mar 26, 2025
-
[ci] Skip yarn install on cache hit (#32757)
We currently already do this in runtime_build_and_test, we can reuse the same technique in other workflows to speed them up.
Configuration menu - View commit details
-
Copy full SHA for 5f232d7 - Browse repository at this point
Copy the full SHA 5f232d7View commit details -
[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 #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
Configuration menu - View commit details
-
Copy full SHA for 33999c4 - Browse repository at this point
Copy the full SHA 33999c4View commit details -
[compiler][be] Playground now uses tsup bundled plugin (#32759)
Followup to #32758. This moves playground to use the tsup bundled plugin instead of webpack-built `babel-plugin-react-compiler`. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32759). * __->__ #32759 * #32758
Configuration menu - View commit details
-
Copy full SHA for 2541146 - Browse repository at this point
Copy the full SHA 2541146View commit details -
Don't flush synchronous work if we're in the middle of a ViewTransiti…
…on async sequence (#32760) Starting a View Transition is an async sequence. Since React can get a sync update in the middle of sequence we sometimes interrupt that sequence. Currently, we don't actually cancel the View Transition so it can just run as a partial. This ensures that we fully skip it when that happens, as well as warn. However, it's very easy to trigger this with just a setState in useLayoutEffect right now. Therefore if we're inside the preparing sequence of a startViewTransition, this delays work that would've normally flushed in a microtask. ~Maybe we want to do the same for Default work already scheduled through a scheduler Task.~ Edit: This was already done. `flushSync` currently will still lead to an interrupted View Transition (with a warning). There's a tradeoff here whether we want to try our best to preserve the guarantees of `flushSync` or favor the animation. It's already possible to suspend at the root with `flushSync` which means it's not always 100% guaranteed to commit anyway. We could treat it as suspended. But let's see how much this is a problem in practice.
Configuration menu - View commit details
-
Copy full SHA for a5297ec - Browse repository at this point
Copy the full SHA a5297ecView commit details -
Rename <ViewTransition className="..."> to <ViewTransition default=".…
….."> (#32734) It was always confusing that this is not a CSS class but a view-transition-class. The `className` sticks out a bit among its siblings `enter`, `exit`, `update` and `share`. The idea is that the most specific definition override is the class name that gets applied and this prop is really just the fallback, catch-all or "any" that is applied if you didn't specify a more specific one. It has also since evolved not just to take a string but also a map of Transition Type to strings. The "class" is really the type of the value. We could add a suffix to all of them like `defaultClass`, `enterClass`, `exitClass`, `updateClass` and `shareClass`. However, this doesn't necessarily make sense with the mapping of Transition Type to string. It also makes it a bit too DOM centric. In React Native this might still be called a "class" but it might be represented by an object definition. We might even allow some kind of inline style form for the DOM too. Really this is about picking which "animation" that runs which can be a string or instance. "Animation" is too broad because there's also a concept of a CSS Animation and these are really sets of CSS animations (group, image-pair, old, new). It could maybe be `defaultTransition`, `enterTransition`, etc but that seems unnecessarily repetitive and still doesn't say anything about it being a class. We also already have the name "default" in the map of Transition Types. In fact you can now specify a default for default: ``` <ViewTransition default={{"navigation-back": "slide-out", "default": "fade-in"}}> ``` One thing I don't like about the name `"default"` is that it might be common to just apply a named class that does it matching to enter/exit/update in the CSS selectors (such as the `:only-child` rule) instead of doing that mapping to each one using React. In that can you end up specifying only `default={...}` a lot and then what is it the "default" for? It's more like "all". I think it's likely that you end up with either "default" or the specific forms instead of both at once.
Configuration menu - View commit details
-
Copy full SHA for e0c99c4 - Browse repository at this point
Copy the full SHA e0c99c4View commit details -
Add "auto" class to mean the built-in should run (#32761)
Stacked on #32734 In React a ViewTransition class of `"none"` doesn't just mean that it has no class but also that it has no ViewTransition name. The default (`null | undefined`) means that it has no specific class but should run with the default built-in animation. This adds this as an explicit string called `"auto"` as well. That way you can do `<ViewTransition default="foo" enter="auto">` to override the "foo" just for the "enter" trigger to be the default built-in animation. Where as if you just specified `null` it would be like not specifying enter at all which would trigger "foo".
Configuration menu - View commit details
-
Copy full SHA for fceb0f8 - Browse repository at this point
Copy the full SHA fceb0f8View commit details -
Add getComputedStyle helper to ViewTransition refs (#32751)
This is also sometimes useful to read the style of the pseudo-element itself without an animation.
Configuration menu - View commit details
-
Copy full SHA for f134b39 - Browse repository at this point
Copy the full SHA f134b39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e88e97 - Browse repository at this point
Copy the full SHA 3e88e97View commit details -
Mark shouldStartViewTransition as true when there's an enter animation (
#32764) Typically we mark the name of things that might animate in the snapshot phase. At the same time we track that should call startViewTransition too. However, we don't do this for "enter" since they're only marked later. Leading to having just an "enter" not to animate unless there's at least another update too. This tracks if there's a ViewTransitionComponent in the tree that enters. Luckily we know that from the static flag so we don't have to traverse it.
Configuration menu - View commit details
-
Copy full SHA for 4280563 - Browse repository at this point
Copy the full SHA 4280563View commit details
Commits on Mar 27, 2025
-
[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.
Configuration menu - View commit details
-
Copy full SHA for 8039f1b - Browse repository at this point
Copy the full SHA 8039f1bView commit details
Commits on Mar 28, 2025
-
feat(babel-plugin-react-compiler): support satisfies operator (#32742)
Solve #29818 --------- Co-authored-by: Rodrigo Faria <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ef4bc8b - Browse repository at this point
Copy the full SHA ef4bc8bView commit details -
[release] Also split the onlyPackages param (#32777)
I missed this the last time. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32777). * #32778 * __->__ #32777
Configuration menu - View commit details
-
Copy full SHA for 1de32a5 - Browse repository at this point
Copy the full SHA 1de32a5View commit details -
[release] Don't lookup build-info.json when updating version numbers (#…
…32778) From what we can see, `build-info.json` is a vestigal file that we were previously including in builds but are no longer since 2022 (see #23257, which removes `build-info.json` which would have broken scripts/release/build-release-locally-commands/add-build-info-json.js). Since this file is no longer built, instead of looking it up we default to the `version` that was passed in as an argument to scripts/release/prepare-release-from-npm.js. Since `version` is what is pulled from npm, there should only be 1 consistent version for all the packages that are pulled. Therefore, only 1 version (eg canary) needs to be replaced to the new stable version. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32778). * __->__ #32778 * #32777
Configuration menu - View commit details
-
Copy full SHA for 1825990 - Browse repository at this point
Copy the full SHA 1825990View commit details -
[compiler][snap] Fix test filter + watch mode (#32780)
Accidentally broke this when migrating our test runner to use the bundled build #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`.
Configuration menu - View commit details
-
Copy full SHA for deb7859 - Browse repository at this point
Copy the full SHA deb7859View commit details -
Bump next prerelease version numbers (#32782)
Updates the version numbers in the prerelease channels.
Configuration menu - View commit details
-
Copy full SHA for 50c5cdb - Browse repository at this point
Copy the full SHA 50c5cdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for d726d69 - Browse repository at this point
Copy the full SHA d726d69View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18a1133 - Browse repository at this point
Copy the full SHA 18a1133View commit details -
Configuration menu - View commit details
-
Copy full SHA for 095ce8a - Browse repository at this point
Copy the full SHA 095ce8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6377903 - Browse repository at this point
Copy the full SHA 6377903View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 313332d1...63779030