-
Notifications
You must be signed in to change notification settings - Fork 50.2k
Comparing changes
Open a pull request
base repository: facebook/react
base: 518d06d2
head repository: facebook/react
compare: 62208bee
- 17 commits
- 98 files changed
- 8 contributors
Commits on Dec 20, 2024
-
Turn off enableYieldingBeforePassive in internal test renderers (#31863)
#31785 turned on `enableYieldingBeforePassive` for the internal test renderer builds. We have some failing tests on the RN side blocking the sync so lets turn these off for now.
Configuration menu - View commit details
-
Copy full SHA for de82912 - Browse repository at this point
Copy the full SHA de82912View commit details -
[compiler] Allow type cast expressions with refs (#31871)
We report a false positive for the combination of a ref-accessing function placed inside an array which is they type-cast. Here we teach ref validation about type casts. I also tried other variants like `return ref as const` but those already worked. Closes #31864
Configuration menu - View commit details
-
Copy full SHA for 6a3d6a4 - Browse repository at this point
Copy the full SHA 6a3d6a4View commit details -
[assert helpers] not dom or reconciler (#31862)
converts everything left outside react-dom and react-reconciler
Configuration menu - View commit details
-
Copy full SHA for 26297f5 - Browse repository at this point
Copy the full SHA 26297f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 99471c0 - Browse repository at this point
Copy the full SHA 99471c0View commit details -
[compiler] transform fire calls (#31796)
This is the diff with the meaningful changes. The approach is: 1. Collect fire callees and remove fire() calls, create a new binding for the useFire result 2. Update LoadLocals for captured callees to point to the useFire result 3. Update function context to reference useFire results 4. Insert useFire calls after getting to the component scope This approach aims to minimize the amount of new bindings we introduce for the function expressions to minimize bookkeeping for dependency arrays. We keep all of the LoadLocals leading up to function calls as they are and insert new instructions to load the originally captured function, call useFire, and store the result in a new promoted temporary. The lvalues that referenced the original callee are changed to point to the new useFire result. This is the minimal diff to implement the expected behavior (up to importing the useFire call, next diff) and further stacked diffs implement error handling. The rules for fire are: 1. If you use fire for a callee in the effect once you must use it for every time you call it in that effect 2. You can only use fire in a useEffect lambda/functions defined inside the useEffect lambda There is still more work to do here, like updating the effect dependency array and handling object methods -- --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31796). * #31811 * #31798 * #31797 * __->__ #31796
Configuration menu - View commit details
-
Copy full SHA for 03297e0 - Browse repository at this point
Copy the full SHA 03297e0View commit details -
[compiler] add fire imports (#31797)
Summary: Adds import {useFire} from 'react' when fire syntax is used. This is experimentation and may not become a stable feature in the compiler. -- --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31797). * #31811 * #31798 * __->__ #31797Configuration menu - View commit details
-
Copy full SHA for ab27231 - Browse repository at this point
Copy the full SHA ab27231View commit details -
[compile] Error on fire outside of effects and ensure correct compila…
…tion, correct import (#31798) Traverse the compiled functions to ensure there are no lingering fires and that all fire calls are inside an effect lambda. Also corrects the import to import from the compiler runtime instead --
Configuration menu - View commit details
-
Copy full SHA for 45a720f - Browse repository at this point
Copy the full SHA 45a720fView commit details -
[compiler] Rewrite effect dep arrays that use fire (#31811)
If an effect uses a dep array, also rewrite the dep array to use the fire binding --
Configuration menu - View commit details
-
Copy full SHA for 6907aa2 - Browse repository at this point
Copy the full SHA 6907aa2View commit details
Commits on Dec 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 94867f3 - Browse repository at this point
Copy the full SHA 94867f3View commit details -
[assert helpers] Remove toWarnDev from fixtures/dom (#31894)
This is unused and never was: e6a0473
Configuration menu - View commit details
-
Copy full SHA for 97d7949 - Browse repository at this point
Copy the full SHA 97d7949View commit details
Commits on Dec 26, 2024
-
[compiler] Fix broken fire snapshot (#31920)
This was not committed in #31811 --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31920). * #31919 * #31918 * #31917 * #31916 * #31915 * __->__ #31920
Configuration menu - View commit details
-
Copy full SHA for fc8a898 - Browse repository at this point
Copy the full SHA fc8a898View commit details
Commits on Dec 27, 2024
-
[rcr] Relax react peer dep requirement (#31915)
There's no real reason to restrict the React peer dep to non-experimental, so relax it. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31915). * #31919 * #31918 * #31917 * #31916 * __->__ #31915 * #31920
Configuration menu - View commit details
-
Copy full SHA for 4309bde - Browse repository at this point
Copy the full SHA 4309bdeView commit details
Commits on Dec 28, 2024
-
Add Profiler mode to fixtures even if React DevTools is not installed (…
…#31877) Currently you need to do one of either: 1. Install React DevTools 2. Install React Refresh 3. Add Profiler component To opt in to component level profiling. It was a bit confusing that some of the fixtures was doing 2 which made them work while other was depending on if you had DevTools. Really React Refresh shouldn't really opt you in I think.
Configuration menu - View commit details
-
Copy full SHA for d4ac768 - Browse repository at this point
Copy the full SHA d4ac768View commit details -
[Flight] Mark Errored Server Components (#31879)
This is similar to #31876 but for Server Components. It marks them as errored and puts the error message in the Summary properties. <img width="1511" alt="Screenshot 2024-12-20 at 5 05 35 PM" src="https://github.com/user-attachments/assets/92f11e42-0e23-41c7-bfd4-09effb25e024" /> This only looks at the current chunk for rejections. That means that there might still be promises deeper that rejected but it's only the immediate return value of the Server Component that's considered a rejection of the component itself.
Configuration menu - View commit details
-
Copy full SHA for 50f00fd - Browse repository at this point
Copy the full SHA 50f00fdView commit details
Commits on Dec 29, 2024
-
DevTools: fix Compiler inegration test with 18.2 (#31904)
Currently failing with `TypeError: Invalid Version: 19`, looks like I've overlooked this one in #31241.
Configuration menu - View commit details
-
Copy full SHA for c01b805 - Browse repository at this point
Copy the full SHA c01b805View commit details
Commits on Dec 31, 2024
-
[Flight Parcel] Implement prepareDestinationForModule (#31799)
Followup to #31725 This implements `prepareDestinationForModule` in the Parcel Flight client. On the Parcel side, the `<Resources>` component now only inserts `<link>` elements for stylesheets (along with a bootstrap script when needed), and React is responsible for inserting scripts. This ensures that components that are conditionally dynamic imported during render are also preloaded. CSS must be added to the RSC tree using `<Resources>` to avoid FOUC. This must be manually rendered in both the top-level page, and in any component that is dynamic imported. It would be nice if there was a way for React to automatically insert CSS as well, but unfortunately `prepareDestinationForModule` only knows about client components and not CSS for server components. Perhaps there could be a way we could annotate components at code splitting boundaries with the resources they need? More thoughts in this thread: #31725 (comment)
Configuration menu - View commit details
-
Copy full SHA for 694d3e1 - Browse repository at this point
Copy the full SHA 694d3e1View commit details
Commits on Jan 2, 2025
-
DevTools: fork FastRefresh test for <18 versions of React (#31893)
We currently have a failing test for React DevTools against React 17. This started failing in #30899, where we changed logic for error tracking and started relying on `onPostCommitFiberRoot` hook. Looking at #21183, `onPostCommitFiberRoot` was shipped in 18, which means that any console errors / warnings emitted in passive effects won't be recorded by React DevTools for React < 18.
Configuration menu - View commit details
-
Copy full SHA for 62208be - Browse repository at this point
Copy the full SHA 62208beView 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 518d06d2...62208bee