-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify React DevTools for Replay integration #2
Commits on Apr 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4ddff73 - Browse repository at this point
Copy the full SHA 4ddff73View commit details
Commits on Apr 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 8090457 - Browse repository at this point
Copy the full SHA 8090457View commit details -
Configuration menu - View commit details
-
Copy full SHA for 190cc99 - Browse repository at this point
Copy the full SHA 190cc99View commit details
Commits on Apr 30, 2024
-
[react-native] Add unit test to ReactNativeAttributePayload (facebook…
…#28955) ## Summary I'm looking at cleaning up some unnecessary manual property flattening in React Native and wanted to verify this behaviour is working as expected, where properties from nested objects will always overwrite properties from the base object. ## How did you test this change? Unit tests
Configuration menu - View commit details
-
Copy full SHA for d779eba - Browse repository at this point
Copy the full SHA d779ebaView commit details -
Move useMemoCache hook to react/compiler-runtime (facebook#28954)
Move useMemoCache hook to react/compiler-runtime For Meta-internal purposes, we keep the export on `react` itself to reduce churn.
Configuration menu - View commit details
-
Copy full SHA for 4508873 - Browse repository at this point
Copy the full SHA 4508873View commit details -
Dynamically detect reanimated plugin
Enables the Reanimated flag automatically if we find reanimated in the user's list of plugins ghstack-source-id: 20e83374612362a30d6c8cc7a903d9320e8cc23a Pull Request resolved: facebook/react-forget#2915
Configuration menu - View commit details
-
Copy full SHA for 86e0f87 - Browse repository at this point
Copy the full SHA 86e0f87View commit details
Commits on May 1, 2024
-
Remove duplicated hermes-parser
ghstack-source-id: 79f3319d87909d05731ef821d0ffe86cb01b0432 Pull Request resolved: facebook/react-forget#2920
Configuration menu - View commit details
-
Copy full SHA for fddc015 - Browse repository at this point
Copy the full SHA fddc015View commit details -
[healthcheck] Add status message
Show compiling status message and not just block UI. ghstack-source-id: 67761c5d32216e105c4aa6404dfa07d76ae22583 Pull Request resolved: https://github.com/facebook/react-forget/pull/2921
Configuration menu - View commit details
-
Copy full SHA for c88d356 - Browse repository at this point
Copy the full SHA c88d356View commit details -
[healthcheck] Check for StrictMode
ghstack-source-id: f05222073be785b77346c4e8760bf4d0bb4d658e Pull Request resolved: https://github.com/facebook/react-forget/pull/2922
Configuration menu - View commit details
-
Copy full SHA for 36d7755 - Browse repository at this point
Copy the full SHA 36d7755View commit details -
[healthcheck] Check for incompatible libraries
Add a configurable list of known incompatible libraries. Check all package.jsons for any uses of known incompatible libraries and warn if found. ghstack-source-id: 7329e3792b57458e681780cba3140a14a9b1a60d Pull Request resolved: https://github.com/facebook/react-forget/pull/2923
Configuration menu - View commit details
-
Copy full SHA for c464445 - Browse repository at this point
Copy the full SHA c464445View commit details -
[healthcheck] Refactor checks into separate files
Makes it easier to extend later, if we want to add more checks. ghstack-source-id: 6fb3435555f1b988e1a185bfda8be9418eb622c5 Pull Request resolved: https://github.com/facebook/react-forget/pull/2924
Configuration menu - View commit details
-
Copy full SHA for 4ce5c56 - Browse repository at this point
Copy the full SHA 4ce5c56View commit details -
[hir] Mark MethodCalls as escaping
Treat MethodCalls similar to general CallExpressions and mark them as escaping in PruneNonEscapingScopes pass. ghstack-source-id: 3c81bdb17f58fbeef8be24e7cb363172d1867217 Pull Request resolved: https://github.com/facebook/react-forget/pull/2925
Configuration menu - View commit details
-
Copy full SHA for 85e6e9b - Browse repository at this point
Copy the full SHA 85e6e9bView commit details -
Update babel plugin to use runtime from react/compiler-runtime (faceb…
…ook#2918) This uses the compiler runtime from `react/compiler-runtime` by default unless `compilerRuntime` is specifified in the Babel options which then imports the runtime from there. The `useMemoCache` hook is now named `c` in accordance with facebook@4508873 Unfortunately, I couldn't figure out how to import `react@beta` which already has that import as various react verstions were conflicting. If someone can figure this out it'd be fantastic. As a result, I had to update the default for the test runner to default the `compilerRuntime` option to `react` to preserve the previous behavior to import from `react`. Once upgraded to React 19, we should be able to remove that override.
Configuration menu - View commit details
-
Copy full SHA for ebe58ee - Browse repository at this point
Copy the full SHA ebe58eeView commit details -
Don't compile node_modules by default
To make a first time setup of the compiler truly config-less, default to not compiling node_modules unless a user provided `sources` (advanced option) is provided ghstack-source-id: b0798052404d772ce6ee471e577699d4b0871d56 Pull Request resolved: facebook/react-forget#2919
Configuration menu - View commit details
-
Copy full SHA for f93529e - Browse repository at this point
Copy the full SHA f93529eView commit details
Commits on May 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 29d3c83 - Browse repository at this point
Copy the full SHA 29d3c83View commit details -
[Tooling] Update critical artifact list (facebook#28966)
When a React PR is opened CI will report large size changes. But for critical packages like react-dom it reports always. In React 19 we moved the build for react-dom the client reconciler from react-dom to react-dom/client This change adds react-dom-client artifacts for stable and oss channels since that is originally what was being tracked. But since react-dom/client always imports react-dom I left the original react-dom packages as critical as well. They are small but it would be good to keep an eye on them
Configuration menu - View commit details
-
Copy full SHA for c7b1ae5 - Browse repository at this point
Copy the full SHA c7b1ae5View commit details -
Introduce a faster version of the addProperties function (facebook#28969
) ## Summary This PR introduces a faster version of the `addProperties` function. This new function is basically the `diffProperties` with `prevProps` set to `null`, propagated constants, and all the unreachable code paths collapsed. ## How did you test this change? I've tested this change with [the benchmark app](https://github.com/react-native-community/RNNewArchitectureApp/tree/new-architecture-benchmarks) and got ~4.4% improvement in the view creation time.
Configuration menu - View commit details
-
Copy full SHA for 73bcdfb - Browse repository at this point
Copy the full SHA 73bcdfbView commit details -
Configuration menu - View commit details
-
Copy full SHA for c44e9d1 - Browse repository at this point
Copy the full SHA c44e9d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 14f71db - Browse repository at this point
Copy the full SHA 14f71dbView commit details -
DevTools: Fix inspecting components with multiple reads of the same C…
…ontext in React 17 (facebook#28974)
Configuration menu - View commit details
-
Copy full SHA for f5f2799 - Browse repository at this point
Copy the full SHA f5f2799View commit details -
ghstack-source-id: bb66913e2d3c814696311371ed655f3da03d1199 Pull Request resolved: facebook/react-forget#2926
Configuration menu - View commit details
-
Copy full SHA for 48e0c70 - Browse repository at this point
Copy the full SHA 48e0c70View commit details -
Update references to Forget to React Compiler
ghstack-source-id: cce73f26b7b3903b8d79b70dbc24cbee09693d81 Pull Request resolved: facebook/react-forget#2927
Configuration menu - View commit details
-
Copy full SHA for b844766 - Browse repository at this point
Copy the full SHA b844766View commit details
Commits on May 3, 2024
-
Rename {r,R}unReactForgetBabelPlugin
ghstack-source-id: e7f00aab61dd749dc6ba11ce7e4d14603bfeeab9 Pull Request resolved: facebook/react-forget#2928
Configuration menu - View commit details
-
Copy full SHA for 95e3cdc - Browse repository at this point
Copy the full SHA 95e3cdcView commit details -
Rename ReactForgetBabelPlugin locals
ghstack-source-id: 9cd5fe41ae322632dfeb3d5c7468268678006d94 Pull Request resolved: facebook/react-forget#2929
Configuration menu - View commit details
-
Copy full SHA for 1c8f8bf - Browse repository at this point
Copy the full SHA 1c8f8bfView commit details -
ghstack-source-id: c6c825f5efdb4f9c413050b22b7713966871338c Pull Request resolved: facebook/react-forget#2931
Configuration menu - View commit details
-
Copy full SHA for 82137ec - Browse repository at this point
Copy the full SHA 82137ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d618a9 - Browse repository at this point
Copy the full SHA 1d618a9View commit details -
Add flag to test fast jsx (facebook#28816)
Following facebook#28768, add a path to testing Fast JSX on www. We want to measure the impact of Fast JSX and enable a path to testing before string refs are completely removed in www (which is a work in progress). Without `disableStringRefs`, we need to copy any object with a `ref` key so we can pass it through `coerceStringRef()` and copy it into the object. This de-opt path is what is gated behind `enableFastJSXWithStringRefs`. The additional checks should have no perf impact in OSS as the flags remain true there and the build output is not changed. For www, I've benchmarked the addition of the boolean checks with values cached at module scope. There is no significant change observed from our benchmarks and any latency will apply to test and control branches evenly. This added experiment complexity is temporary. We should be able to clean it up, along with the flag checks for `enableRefAsProp` and `disableStringRefs` shortly.
Configuration menu - View commit details
-
Copy full SHA for 1beb73d - Browse repository at this point
Copy the full SHA 1beb73dView commit details -
[DevTools] Check in
frontend.d.ts
for react-devtools-fusebox, inclu……de in build output (facebook#28970) ## Summary The `react-devtools-fusebox` private package is used in the React Native DevTools (Fusebox) frontend by checking build artifacts into RN's [fork]([`facebookexperimental/rn-chrome-devtools-frontend`](https://github.com/facebookexperimental/rn-chrome-devtools-frontend)) of the Chrome DevTools (CDT) repo - see facebookexperimental/rn-chrome-devtools-frontend#22. Currently, the CDT fork also includes a [manually written TypeScript definition file](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/blob/1d5f8d5209ac49de97aec16732169d47bf525474/front_end/third_party/react-devtools/package/frontend.d.ts) which describes `react-devtools-fusebox`'s API. This PR moves that file into the React repo, next to the implementation of `react-devtools-fusebox`, so we can update it atomically with changes to the package. As this is the first bit of TypeScript in this repo, the PR adds minimal support for formatting `.d.ts` files with Prettier. It also opts out `react-devtools-fusebox/dist/` from linting/formatting as a drive-by fix. For now, we'll just maintain the `.d.ts` file manually, but we could consider leveraging [`flow-api-translator`](https://www.npmjs.com/package/flow-api-translator) to auto-generate it in the future. ## How did you test this change? Build `react-devtools-fusebox`, observe that `dist/frontend.d.ts` exists.
Configuration menu - View commit details
-
Copy full SHA for 8f7dd55 - Browse repository at this point
Copy the full SHA 8f7dd55View commit details -
[DevTools] Enable inspected element context menu in Fusebox (facebook…
…#28972) ## Summary Enables the inspected element context menu in React Native DevTools (Fusebox). ## How did you test this change? 1. `yarn build` in `react-devtools-fusebox` 2. Copy artifacts to rn-chrome-devtools-frontend 3. Manually test the context menu https://github.com/facebook/react/assets/2246565/b35cc20f-8d67-43b0-b863-7731e10fffac NOTE: The serialised values sometimes expose React internals (e.g. Hook data structures instead of just the values), but that seems to be a problem equally on web, so I'm going for native<->web parity here.
Configuration menu - View commit details
-
Copy full SHA for e3fbb51 - Browse repository at this point
Copy the full SHA e3fbb51View commit details -
ghstack-source-id: 6ab453a3c5e23677d0c178cf4ea464c7a9e7ebf6 Pull Request resolved: facebook/react-forget#2932
Configuration menu - View commit details
-
Copy full SHA for 90863be - Browse repository at this point
Copy the full SHA 90863beView commit details -
Stop committing resources to an external repo (facebook#28963)
This has been integrated into this repo (`builds/facebook-fbsource`) so we no longer need the extra repo
Configuration menu - View commit details
-
Copy full SHA for 38cd73b - Browse repository at this point
Copy the full SHA 38cd73bView commit details -
Bundle config: inline internal hook wrapper (facebook#28978)
Bundle config: inline internal hook wrapper Instead of reading this wrapper from 2 files for "start" and "end" and then string modifying the templates, just inline them like the other wrappers in this file.
Configuration menu - View commit details
-
Copy full SHA for 0a0a3af - Browse repository at this point
Copy the full SHA 0a0a3afView commit details -
Support <fbs> in addition to <fbt>
ghstack-source-id: 1ab99ebb5cef3f42399682a338feb12c4cf55f4c Pull Request resolved: facebook/react-forget#2933
Configuration menu - View commit details
-
Copy full SHA for 738ddf7 - Browse repository at this point
Copy the full SHA 738ddf7View commit details -
[Flight] Track Owner on AsyncLocalStorage When Available (facebook#28807
) Stacked on facebook#28798. Add another AsyncLocalStorage to the FlightServerConfig. This context tracks data on a per component level. Currently the only thing we track is the owner in DEV. AsyncLocalStorage around each component comes with a performance cost so we only do it DEV. It's not generally a particularly safe operation because you can't necessarily associate side-effects with a component based on execution scope. It can be a lazy initializer or cache():ed code etc. We also don't support string refs anymore for a reason. However, it's good enough for optional dev only information like the owner.
Configuration menu - View commit details
-
Copy full SHA for d5c3034 - Browse repository at this point
Copy the full SHA d5c3034View commit details -
Use undici polyfill for tests in old Node versions (facebook#28887)
We currently don't test FormData / File dependent features in CI because we use an old Node.js version in CI. We should probably upgrade to 18 since that's really the minimum version that supports all the features out of the box. JSDOM is not a faithful/compatible implementation of these APIs. The recommended way to use Flight together with FormData/Blob/File in older Node.js versions, is to polyfill using the `undici` library. However, even in these versions the Blob implementation isn't quite faithful so the Reply client needs a slight tweak for multi-byte typed arrays.
Configuration menu - View commit details
-
Copy full SHA for 5fcfd71 - Browse repository at this point
Copy the full SHA 5fcfd71View commit details -
[Flight Reply] Encode ReadableStream and AsyncIterables (facebook#28893)
Same as facebook#28847 but in the other direction. Like other promises, this doesn't actually stream in the outgoing direction. It buffers until the stream is done. This is mainly due to our protocol remains compatible with Safari's lack of outgoing streams until recently. However, the stream chunks are encoded as separate fields and so does support the busboy streaming on the receiving side.
Configuration menu - View commit details
-
Copy full SHA for ec9400d - Browse repository at this point
Copy the full SHA ec9400dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46abd7b - Browse repository at this point
Copy the full SHA 46abd7bView commit details
Commits on May 6, 2024
-
Add FB build for ReactReconcilerConstants (facebook#29003)
In order to integrate the `react-reconciler` build created in facebook#28880 with third party libraries, we need to have matching `react-reconciler/constants` to go with it.
Configuration menu - View commit details
-
Copy full SHA for 5d29478 - Browse repository at this point
Copy the full SHA 5d29478View commit details -
Configuration menu - View commit details
-
Copy full SHA for e177154 - Browse repository at this point
Copy the full SHA e177154View commit details -
Setup Wave 2 of Feature Flags for React Native (facebook#28990)
## Summary Sets up dynamic feature flags for `disableStringRefs`, `enableFastJSX`, and `enableRefAsProp` in React Native (at Meta). ## How did you test this change? ``` $ yarn test $ yarn flow fabric ```
Configuration menu - View commit details
-
Copy full SHA for 9b13002 - Browse repository at this point
Copy the full SHA 9b13002View commit details -
Set enableUseMemoCacheHook to true everywhere (facebook#28964)
Set enableUseMemoCacheHook to true everywhere for the next major releases.
Configuration menu - View commit details
-
Copy full SHA for b498834 - Browse repository at this point
Copy the full SHA b498834View commit details -
ghstack-source-id: b25cc2a481dc1508bbb710dff472f2d23667ec98 Pull Request resolved: facebook/react-forget#2939
Configuration menu - View commit details
-
Copy full SHA for 95ba7dc - Browse repository at this point
Copy the full SHA 95ba7dcView commit details -
Upgrade to React 19 beta (facebook#2938)
- Updated all directly defined dependencies to the latest React 19 Beta - `package.json`: used `resolutions` to force React 19 for `react-is` transitive dependency - `package.json`: postinstall script to patch fbt for the React 19 element Symbol - Match on the message in Snap to exclude a React 19 warning that `act` should be imported from `react` instead (from inside `@testing-library/react`) - Some updated snapshots, I think due to now recovering behavior of `useMemoCache`, please review. In a next step, we can do the following. I excluded it since it from here as it made the PR unreviewable on GitHub. - Snapshots now use `react/compiler-runtime` as in prod, so the different default in Snap is no longer needed.
Configuration menu - View commit details
-
Copy full SHA for e63d3d1 - Browse repository at this point
Copy the full SHA e63d3d1View commit details -
[easy] remove unstable_useMemoCache reference from a snapshot file (f…
…acebook#2937) This file is intended to test that the test will skip if it was already compiled. This updates the import to remove the no longer used name `unstable_useMemoCache`.
Configuration menu - View commit details
-
Copy full SHA for 3708c36 - Browse repository at this point
Copy the full SHA 3708c36View commit details -
Use default runtimeModule setting in Snap tests (facebook#2940)
Lots of updated snapshots. The only updated code is resolving this TODO: https://github.com/facebook/react-forget/blob/2b14805f98e47acdf4b83c7d078fe6727800b3f9/packages/snap/src/compiler.ts#L41
Configuration menu - View commit details
-
Copy full SHA for e2d4734 - Browse repository at this point
Copy the full SHA e2d4734View commit details
Commits on May 7, 2024
-
Default to raising all errors in eslint plugin
We control what gets reported via another function anyway so it's better to raise everything at the compiler config level. This lets us configure what level of diagnostic is reportable later ghstack-source-id: 996d3cbb8d8f3e1bbe943210b8d633420e0f3f3b Pull Request resolved: facebook/react-forget#2935
Configuration menu - View commit details
-
Copy full SHA for 84d28eb - Browse repository at this point
Copy the full SHA 84d28ebView commit details -
Allow eslint rule reportable severity to be set
During the demo I might show an example of fixing a CannotPreserveMemoization error. But I don't want to make that reportable by default, so this PR allows configuration like so ```js module.exports = { root: true, plugins: [ 'eslint-plugin-react-compiler', ], rules: { 'react-compiler/react-compiler': [ 'error', { reportableLevels: new Set([ 'InvalidJs', 'InvalidReact', 'CannotPreserveMemoization' ]) } ] } } ``` ghstack-source-id: 984c6d3cb7e19c8fea2bb88108dd26335c031573 Pull Request resolved: facebook/react-forget#2936
Configuration menu - View commit details
-
Copy full SHA for d0a51e7 - Browse repository at this point
Copy the full SHA d0a51e7View commit details -
Clarify how to address ValidateNoCapitalizedCalls errors
Make it clearer how to address this error by allowlisting globals that are known to be safe ghstack-source-id: e7fa6464ebb561a7a1366ff70430842007c6552e Pull Request resolved: facebook/react-forget#2909
Configuration menu - View commit details
-
Copy full SHA for b28c53d - Browse repository at this point
Copy the full SHA b28c53dView commit details -
Add failing test for eslint-plugin false positive
The eslint rule seems to false positive on this typescript syntax, but strangely the compiler does not ghstack-source-id: 19baa24ff7addd83f59e2b03fdb180af169a2794 Pull Request resolved: facebook/react-forget#2913
Configuration menu - View commit details
-
Copy full SHA for 7caf071 - Browse repository at this point
Copy the full SHA 7caf071View commit details -
Create Fabric-specific version of ReactNativeAttributesPayload (faceb…
…ook#28841) ## Summary This PR introduces Fabric-only version of `ReactNativeAttributesPayload`. It is a copy-paste of `ReactNativeAttributesPayload.js`, and is called `ReactNativeAttributesPayloadFabric.js`. The idea behind this change is that certain optimizations in prop diffing may actually be a regression on the old architecture. For example, removing custom diffing may result in larger updateProps payloads. Which is, I guess, fine with JSI, but might be a problem with the bridge. ## How did you test this change? There should be no runtime effect of this change.
Configuration menu - View commit details
-
Copy full SHA for 7039834 - Browse repository at this point
Copy the full SHA 7039834View commit details -
CI: move .github directory back to root (facebook#2941)
We need this in the root to run the steps. It should merge cleanly with the React repo as there is no file name overlap. Next step is to update the paths to make it work again.
Configuration menu - View commit details
-
Copy full SHA for 55d6c6e - Browse repository at this point
Copy the full SHA 55d6c6eView commit details -
[DevTools] Expose "view source" options to Fusebox integration (faceb…
…ook#28973) ## Summary Exposes the APIs needed by React Native DevTools (Fusebox) to implement the "view element source" and "view attribute source" features. ## How did you test this change? 1. `yarn build` in `react-devtools-fusebox` 2. Copy artifacts to rn-chrome-devtools-frontend 3. Write some additional glue code to implement `viewElementSourceFunction` in our CDT fork. 4. Test the feature manually. https://github.com/facebook/react/assets/2246565/12667018-100a-4b3f-957a-06c07f2af41a
Configuration menu - View commit details
-
Copy full SHA for afe54bf - Browse repository at this point
Copy the full SHA afe54bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fc9c84 - Browse repository at this point
Copy the full SHA 0fc9c84View commit details -
CI: fix Rust CI workflows (facebook#2942)
- update paths - update working directory - rename files for clarity when merged into the main react repo
Configuration menu - View commit details
-
Copy full SHA for 90a5d48 - Browse repository at this point
Copy the full SHA 90a5d48View commit details -
fix[react-devtools]: add backwards compat with legacy element type sy…
…mbol (facebook#28982) Follow-up to facebook#28813. RDT is using `typeOf` from `react-is` to determine the element display name, I've forked an implementation of this method, but will be using legacy element symbol.
Configuration menu - View commit details
-
Copy full SHA for c32ff0f - Browse repository at this point
Copy the full SHA c32ff0fView commit details -
feat[react-devtools]: display forget badge for components in profilin…
…g session (facebook#29014) # Summary - `compiledWithForget` field for nodes is now propagated from the backend to frontend profiler stores - Corresponding node with such field will have a `✨` prefix displayed before its displayName <img width="1728" alt="Screenshot 2024-05-07 at 15 05 37" src="https://github.com/facebook/react/assets/28902667/fe044d40-52cb-4169-867d-5a2d72e3275b"> - Badges are now displayed on the right panel when some fiber is selected in a specific commit <img width="1728" alt="Screenshot 2024-05-07 at 15 05 50" src="https://github.com/facebook/react/assets/28902667/297ba5ca-404d-4172-b9bf-bfed7978afe5"> - Badges are also displayed when user hovers over some node in the tree <img width="1728" alt="Screenshot 2024-05-07 at 15 25 22" src="https://github.com/facebook/react/assets/28902667/bee47884-61d1-46b6-a483-717fc148893a">
Configuration menu - View commit details
-
Copy full SHA for e7d213d - Browse repository at this point
Copy the full SHA e7d213dView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd873e8 - Browse repository at this point
Copy the full SHA fd873e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 257f22a - Browse repository at this point
Copy the full SHA 257f22aView commit details -
CI: fix Compiler Playground workflow (facebook#2945)
Also renamed the workflow to make more sense when merged into the main React repo.
Configuration menu - View commit details
-
Copy full SHA for f4c12cc - Browse repository at this point
Copy the full SHA f4c12ccView commit details -
CI: remove react.yml integration test workflow (facebook#2947)
This was used to run React CI tests compiled with the React Compiler. This is currently no longer used.
Configuration menu - View commit details
-
Copy full SHA for 5a1cbc7 - Browse repository at this point
Copy the full SHA 5a1cbc7View commit details
Commits on May 8, 2024
-
[Flight Reply] Encode binary streams as a single collapsed Blob (face…
…book#28986) Based on facebook#28893. For other streams we encode each chunk as a separate form field which is a bit bloated. Especially for binary chunks since they also have an indirection. We need some way to encode the chunks as separate anyway. This way the streaming using busboy actually allows each chunk to stream in over the network one at a time. For binary streams the actual chunking is not important. The chunks can be split and recombined in whatever size chunk makes sense. Since we buffer the entire content anyway we can combine the chunks to be consecutive. This PR does that with binary streams and also combine them into a single Blob. That way there's no extra overhead when passing through a binary stream. Ideally, we'd be able to just use the stream from that one Blob but Node.js doesn't return byob streams from Blob. Additionally, we don't actually stream the content of Blobs due to the layering with busboy atm. We could do that for binary streams in particular by replacing the File layering with a stream and resolving each chunk as it comes in. That could be a follow up. If we stop buffering in the future, this set up still allows us to split them and send other form fields in between while blocked since the protocol is still the same.
Configuration menu - View commit details
-
Copy full SHA for 826bf4e - Browse repository at this point
Copy the full SHA 826bf4eView commit details -
[Fizz] Fallback to client replaying actions if we're trying to serial…
…ize a Blob (facebook#28987) This follows the same principle as in facebook#28611. We cannot serialize Blobs of a form data into HTML because you can't initialize a file input to some value. However the serialization of state in an Action can contain blobs. In this case we do error but outside the try/catch that recovers to error to client replaying instead of MPA mode. This errors earlier to ensure that this works. Testing this is a bit annoying because JSDOM doesn't have any of the Blob methods but the Blob needs to be compatible with FormData and the FormData needs to be compatible with `<form>` nodes in these tests. So I polyfilled those in JSDOM with some hacks. A possible future enhancement would be to encode these blobs in a base64 mode instead and have some way to receive them on the server. It's just a matter of layering this. I think the RSC layer's `FORM_DATA` implementation can pass some flag to encode as base64 and then have decodeAction include some way to parse them. That way this case would work in MPA mode too.
Configuration menu - View commit details
-
Copy full SHA for 6bac4f2 - Browse repository at this point
Copy the full SHA 6bac4f2View commit details -
[Flight Reply] Resolve outlined models async in Reply just like in Fl…
…ight Client (facebook#28988) This is the same change as facebook#28780 but for the Flight Reply receiver. While it's not possible to create an "async module" reference in this case - resolving a server reference can still be async if loading it requires loading chunks like in a new server instance. Since extracting a typed array from a Blob is async, that's also a case where a dependency can be async.
Configuration menu - View commit details
-
Copy full SHA for ec15267 - Browse repository at this point
Copy the full SHA ec15267View commit details -
fix[react-devtools/ci]: fix configurations for e2e testing (facebook#…
…29016) This should fix failing DevTools e2e tests on `main`. With these changes, running tests locally successfully passes all cases.
Configuration menu - View commit details
-
Copy full SHA for e150a32 - Browse repository at this point
Copy the full SHA e150a32View commit details -
Clean up fastAddProperties and make it more correct (facebook#29015)
## Summary This PR makes some fixes to the `fastAddProperties` function: - Use `if (!attributeConfig)` instead of `if (attributeConfig === undefined)` to account for `null`. - If a prop has an Object `attributeConfig` with a `diff` function defined on it, treat it as an atomic value to keep the semantics of `diffProperties`. ## How did you test this change? Build and run RNTester app.
Configuration menu - View commit details
-
Copy full SHA for b37e4b4 - Browse repository at this point
Copy the full SHA b37e4b4View commit details -
fix[react-devtools/InspectedElementView.css]: dont draw bottom border…
… for empty badge list (facebook#29023) Forward fix to facebook#29014, the bug was discovered while testing v5.2.0.
Configuration menu - View commit details
-
Copy full SHA for 0e6ea69 - Browse repository at this point
Copy the full SHA 0e6ea69View commit details -
React DevTools 5.1.0 -> 5.2.0 (facebook#29022)
Full list of changes (not a public changelog): * fix[react-devtools/ci]: fix configurations for e2e testing ([hoxyq](https://github.com/hoxyq) in [facebook#29016](facebook#29016)) * feat[react-devtools]: display forget badge for components in profiling session ([hoxyq](https://github.com/hoxyq) in [facebook#29014](facebook#29014)) * fix[react-devtools]: add backwards compat with legacy element type symbol ([hoxyq](https://github.com/hoxyq) in [facebook#28982](facebook#28982)) * Expose "view source" options to Fusebox integration ([motiz88](https://github.com/motiz88) in [facebook#28973](facebook#28973)) * Enable inspected element context menu in Fusebox ([motiz88](https://github.com/motiz88) in [facebook#28972](facebook#28972)) * Check in `frontend.d.ts` for react-devtools-fusebox, include in build output ([motiz88](https://github.com/motiz88) in [facebook#28970](facebook#28970)) * Devtools: Fix build-for-devtools ([eps1lon](https://github.com/eps1lon) in [facebook#28976](facebook#28976)) * Move useMemoCache hook to react/compiler-runtime ([kassens](https://github.com/kassens) in [facebook#28954](facebook#28954)) * warn -> error for Test Renderer deprecation ([acdlite](https://github.com/acdlite) in [facebook#28904](facebook#28904)) * [react-dom] move all client code to `react-dom/client` ([gnoff](https://github.com/gnoff) in [facebook#28271](facebook#28271)) * Rename the react.element symbol to react.transitional.element ([sebmarkbage](https://github.com/sebmarkbage) in [facebook#28813](facebook#28813)) * Rename Forget badge ([jbonta](https://github.com/jbonta) in [facebook#28858](facebook#28858)) * Devtools: Add support for useFormStatus ([eps1lon](https://github.com/eps1lon) in [facebook#28413](facebook#28413))
Configuration menu - View commit details
-
Copy full SHA for 1717ab0 - Browse repository at this point
Copy the full SHA 1717ab0View commit details -
Cleanup enableServerComponentKeys flag (facebook#28743)
Cleanup enableServerComponentKeys flag Flag is `true` everywhere but RN where it doesn't apply.
Configuration menu - View commit details
-
Copy full SHA for 6946ebe - Browse repository at this point
Copy the full SHA 6946ebeView commit details -
Facebook: merge react index.classic.fb and index.modern.fb (facebook#…
…29025) Facebook: merge react index.classic.fb and index.modern.fb These export the same. NOTE: The 2 builds are still different based on flags and other forked files.
Configuration menu - View commit details
-
Copy full SHA for b1d4096 - Browse repository at this point
Copy the full SHA b1d4096View commit details -
Upgrade jest and jsdom (facebook#29026)
## Summary This brings: - jest* up from 29.4.2 -> 29.7.0 - jsdom up from 20.0.0 -> 22.1.0 While the latest version of jest-dom-environment still wants `jsdom@^20.0.0`, it can safely use at least up to `[email protected]`. See jestjs/jest#13825 (comment) for details. Upgrading to latest versions lets us improve some WheelEvent tests and will make it possible to test a much simpler FormData construction approach (see facebook#29018) ## How did you test this change? Ran `yarn test` and `yarn test --prod` successfully
Configuration menu - View commit details
-
Copy full SHA for 04b0588 - Browse repository at this point
Copy the full SHA 04b0588View commit details
Commits on May 9, 2024
-
Track Stack of JSX Calls (facebook#29032)
This is the first step to experimenting with a new type of stack traces behind the `enableOwnerStacks` flag - in DEV only. The idea is to generate stacks that are more like if the JSX was a direct call even though it's actually a lazy call. Not only can you see which exact JSX call line number generated the erroring component but if that's inside an abstraction function, which function called that function and if it's a component, which component generated that component. For this to make sense it really need to be the "owner" stack rather than the parent stack like we do for other component stacks. On one hand it has more precise information but on the other hand it also loses context. For most types of problems the owner stack is the most useful though since it tells you which component rendered this component. The problem with the platform in its current state is that there's two ways to deal with stacks: 1) `new Error().stack` 2) `console.createTask()` The nice thing about `new Error().stack` is that we can extract the frames and piece them together in whatever way we want. That is great for constructing custom UIs like error dialogs. Unfortunately, we can't take custom stacks and set them in the native UIs like Chrome DevTools. The nice thing about `console.createTask()` is that the resulting stacks are natively integrated into the Chrome DevTools in the console and the breakpoint debugger. They also automatically follow source mapping and ignoreLists. The downside is that there's no way to extract the async stack outside the native UI itself so this information cannot be used for custom UIs like errors dialogs. It also means we can't collect this on the server and then pass it to the client for server components. The solution here is that we use both techniques and collect both an `Error` object and a `Task` object for every JSX call. The main concern about this approach is the performance so that's the main thing to test. It's certainly too slow for production but it might also be too slow even for DEV. This first PR doesn't actually use the stacks yet. It just collects them as the first step. The next step is to start utilizing this information in error printing etc. For RSC we pass the stack along across over the wire. This can be concatenated on the client following the owner path to create an owner stack leading back into the server. We'll later use this information to restore fake frames on the client for native integration. Since this information quickly gets pretty heavy if we include all frames, we strip out the top frame. We also strip out everything below the functions that call into user space in the Flight runtime. To do this we need to figure out the frames that represents calling out into user space. The resulting stack is typically just the one frame inside the owner component's JSX callsite. I also eagerly strip out things we expect to be ignoreList:ed anyway - such as `node_modules` and Node.js internals.
Configuration menu - View commit details
-
Copy full SHA for 151cce3 - Browse repository at this point
Copy the full SHA 151cce3View commit details -
Support useFormStatus in progressively-enhanced forms (facebook#29019)
Before this change, `useFormStatus` is only activated if a form is submitted by an action function (either `<form action={actionFn}>` or `<button formAction={actionFn}>`). After this change, `useFormStatus` will also be activated if you call `startTransition(actionFn)` inside a submit event handler that is `preventDefault`-ed. This is the last missing piece for implementing a custom `action` prop that is progressively enhanced using `onSubmit` while maintaining the same behavior as built-in form actions. Here's the basic recipe for implementing a progressively-enhanced form action. This would typically be implemented in your UI component library, not regular application code: ```js import {requestFormReset} from 'react-dom'; // To implement progressive enhancement, pass both a form action *and* a // submit event handler. The action is used for submissions that happen // before hydration, and the submit handler is used for submissions that // happen after. <form action={action} onSubmit={(event) => { // After hydration, we upgrade the form with additional client- // only behavior. event.preventDefault(); // Manually dispatch the action. startTransition(async () => { // (Optional) Reset any uncontrolled inputs once the action is // complete, like built-in form actions do. requestFormReset(event.target); // ...Do extra action-y stuff in here, like setting a custom // optimistic state... // Call the user-provided action const formData = new FormData(event.target); await action(formData); }); }} /> ```
Configuration menu - View commit details
-
Copy full SHA for c334563 - Browse repository at this point
Copy the full SHA c334563View commit details -
Adds supports for hot module reloading (HMR) by resetting the cache if a hash of the source file changes. This is enabled via a compiler flag, but also enabled automatically via the babel plugin when NODE_ENV=development. ghstack-source-id: 5cd1ad5c893533c93275c2d78b57ec0c8f1d24e7 Pull Request resolved: facebook/react-forget#2951
Configuration menu - View commit details
-
Copy full SHA for 6b23c25 - Browse repository at this point
Copy the full SHA 6b23c25View commit details -
[Flight] Encode references to existing objects by property path (face…
…book#28996) Instead of forcing an object to be outlined to be able to refer to it later we can refer to it by the property path inside another parent object. E.g. this encodes such a reference as `'$123:props:children:foo:bar'`. That way we don't have to preemptively outline object and we can dedupe after the first time we've found it. There's no cost on the client if it's not used because we're not storing any additional information preemptively. This works mainly because we only have simple JSON objects from the root reference. Complex objects like Map, FormData etc. are stored as their entries array in the look up and not the complex object. Other complex objects like TypedArrays or imports don't have deeply nested objects in them that can be referenced. This solves the problem that we only dedupe after the third instance. This dedupes at the second instance. It also solves the problem where all nested objects inside deduped instances also are outlined. The property paths can get pretty large. This is why a test on payload size increased. We could potentially outline the reference itself at the first dupe. That way we get a shorter ID to refer to in the third instance.
Configuration menu - View commit details
-
Copy full SHA for 7a78d03 - Browse repository at this point
Copy the full SHA 7a78d03View commit details -
[Flight Reply] Dedupe Objects and Support Cyclic References (facebook…
…#28997) Uses the same technique as in facebook#28996 to encode references to already emitted objects. This now means that Reply can support cyclic objects too for parity.
Configuration menu - View commit details
-
Copy full SHA for 38d9f15 - Browse repository at this point
Copy the full SHA 38d9f15View commit details
Commits on May 10, 2024
-
[Flight Reply] Encode Objects Returned to the Client by Reference (fa…
…cebook#29010) Stacked on facebook#28997. We can use the technique of referencing an object by its row + property name path for temporary references - like we do for deduping. That way we don't need to generate an ID for temporary references. Instead, they can just be an opaque marker in the slot and it has the implicit ID of the row + path. Then we can stash all objects, even the ones that are actually available to read on the server, as temporary references. Without adding anything to the payload since the IDs are implicit. If the same object is returned to the client, it can be referenced by reference instead of serializing it back to the client. This also helps preserve object identity. We assume that the objects are immutable when they pass the boundary. I'm not sure if this is worth it but with this mechanism, if you return the `FormData` payload from a `useActionState` it doesn't have to be serialized on the way back to the client. This is a common pattern for having access to the last submission as "default value" to the form fields. However you can still control it by replacing it with another object if you want. In MPA mode, the temporary references are not configured and so it needs to be serialized in that case. That's required anyway for hydration purposes. I'm not sure if people will actually use this in practice though or if FormData will always be destructured into some other object like with a library that turns it into typed data, and back. If so, the object identity is lost.
Configuration menu - View commit details
-
Copy full SHA for 6c409ac - Browse repository at this point
Copy the full SHA 6c409acView commit details -
[Flight] Enable Binary and ReadableStreams in Stable (facebook#29035)
These are ready to ship in stable.
Configuration menu - View commit details
-
Copy full SHA for 6ef0dd4 - Browse repository at this point
Copy the full SHA 6ef0dd4View commit details -
Clean up the enableEarlyReturnForPropDiffing experiment (facebook#29041)
## Summary The experiment has shown no significant performance changes. This PR removes it. ## How did you test this change? ``` yarn flow native yarn lint ```
Configuration menu - View commit details
-
Copy full SHA for 2c022b8 - Browse repository at this point
Copy the full SHA 2c022b8View commit details -
[Flight] Error if a legacy React Element is attempted to be rendered (f…
…acebook#29043) This errors on the client normally but in the case the `type` is a function - i.e. a Server Component - it wouldn't be transferred to error on the client so you end up with a worse error message. So this just implements the same check as ChildFiber.
Configuration menu - View commit details
-
Copy full SHA for 9d76c95 - Browse repository at this point
Copy the full SHA 9d76c95View commit details
Commits on May 11, 2024
-
Fixes a small typo by request ghstack-source-id: 00889150a952308f00d89472c864726222e835d3 Pull Request resolved: facebook/react-forget#2952
Configuration menu - View commit details
-
Copy full SHA for c58142b - Browse repository at this point
Copy the full SHA c58142bView commit details -
Better detection for reanimated
We found this issue through enabling the compiler on the React Conf app. `babel-preset-expo` automatically adds the `react-native-animated` plugin to apps that use the preset. This means that Expo apps sometimes omit the react-native-animated plugin from their config, which was failing our existing check. This PR copies the same detection that Expo does for adding reanimated as a fallback ghstack-source-id: 46f7aec0bc3035a92369f65b0842bafab0089a9e Pull Request resolved: facebook/react-forget#2953
Configuration menu - View commit details
-
Copy full SHA for 9b0044e - Browse repository at this point
Copy the full SHA 9b0044eView commit details -
[healthcheck] Build with rollup
ghstack-source-id: cd40da2ddce047838ed031eed1c1f8e605648a78 Pull Request resolved: facebook/react-forget#2954
Configuration menu - View commit details
-
Copy full SHA for db34843 - Browse repository at this point
Copy the full SHA db34843View commit details -
runReactBabelPluginReactCompiler brings in fbt which is unnecessary for OSS so I removed it. Also makes it so healthckeck is installed as an executable ghstack-source-id: ec6c76f8be01483d4ca75d9d74037b3966fccbdb Pull Request resolved: facebook/react-forget#2955
Configuration menu - View commit details
-
Copy full SHA for 9a6ce33 - Browse repository at this point
Copy the full SHA 9a6ce33View commit details -
[healthcheck] Rename to react-compiler-healthcheck
Don't really have time to implement the react-compiler/healthcheck version of this script, so for now i propose we just publish this as react-compiler-healthcheck the command for running this would be ``` $ npx react-compiler-healthcheck --src 'whatever/**/*.*' ``` ghstack-source-id: e2c443a91257433d80dd51c8c855e4aa0bd99a37 Pull Request resolved: facebook/react-forget#2956
Configuration menu - View commit details
-
Copy full SHA for 63e5330 - Browse repository at this point
Copy the full SHA 63e5330View commit details -
[healthcheck] Only glob files with certain extensions by default
ghstack-source-id: b8db17266992a705645c86916966e06404709fa0 Pull Request resolved: facebook/react-forget#2957
Configuration menu - View commit details
-
Copy full SHA for 76b7331 - Browse repository at this point
Copy the full SHA 76b7331View commit details -
[healthcheck] Remove console.error
ghstack-source-id: c06d44960cfb831e3dc8162858977c4ef619309d Pull Request resolved: facebook/react-forget#2958
Configuration menu - View commit details
-
Copy full SHA for 78da5be - Browse repository at this point
Copy the full SHA 78da5beView commit details -
[healthcheck] Don't compile mjs
ghstack-source-id: 087985cd23baeefc0e2fb9478cd9a162b4e2e023 Pull Request resolved: facebook/react-forget#2959
Configuration menu - View commit details
-
Copy full SHA for 9ef7557 - Browse repository at this point
Copy the full SHA 9ef7557View commit details -
[healthcheck] Refine glob pattern
ghstack-source-id: 6f9e7f95348ab66c699c38f3625a654d91c856c4 Pull Request resolved: facebook/react-forget#2960
Configuration menu - View commit details
-
Copy full SHA for 669e8d0 - Browse repository at this point
Copy the full SHA 669e8d0View commit details
Commits on May 13, 2024
-
Use unique name for c import local identifier
ghstack-source-id: 93055b972fd91572edf8ba51c980006dfdfcd314 Pull Request resolved: facebook/react-forget#2961
Configuration menu - View commit details
-
Copy full SHA for 7e3be12 - Browse repository at this point
Copy the full SHA 7e3be12View commit details -
CI: remove non-functional Rust compiler benchmark workflow (facebook#…
…2948) `forget_napi` doesn't exist and given we're not currently working on the Rust compiler, I'm not sure we need to keep this around until we know that we do want to invest into this area again.
Configuration menu - View commit details
-
Copy full SHA for 4cf7ee2 - Browse repository at this point
Copy the full SHA 4cf7ee2View commit details -
[healthcheck] Clean up ignorelist and check if deps exist
ghstack-source-id: b6d58988eeb86e657a6db2a481b6c2fe2fba0344 Pull Request resolved: facebook/react-forget#2962
Configuration menu - View commit details
-
Copy full SHA for ce0c08e - Browse repository at this point
Copy the full SHA ce0c08eView commit details -
ghstack-source-id: e2507b7285bb52ee02d2cece35aa16eb0bc0baa5 Pull Request resolved: facebook/react-forget#2963
Configuration menu - View commit details
-
Copy full SHA for b956024 - Browse repository at this point
Copy the full SHA b956024View commit details
Commits on May 14, 2024
-
Enable
enableUnifiedSyncLane
for React Native (Meta) (facebook#29052)## Summary Enables the `enableUnifiedSyncLane` feature flag for React Native (Meta). ## How did you test this change? ``` $ yarn test $ yarn flow fabric ```
Configuration menu - View commit details
-
Copy full SHA for 5f28f51 - Browse repository at this point
Copy the full SHA 5f28f51View commit details -
Remove 2 no longer existing files from inlinedHostConfig (facebook#29027
Configuration menu - View commit details
-
Copy full SHA for 26f2496 - Browse repository at this point
Copy the full SHA 26f2496View commit details -
Fix healthcheck package.json bin field
ghstack-source-id: 28045c6edb342dea125ea8fcea564ce90626f21d Pull Request resolved: facebook/react-forget#2964
Configuration menu - View commit details
-
Copy full SHA for 5a842db - Browse repository at this point
Copy the full SHA 5a842dbView commit details -
[publish] Fix
files
field for packages, invalid version rangeThe [`files` field](https://docs.npmjs.com/cli/v10/commands/npm-publish#files-included-in-package) controls what files get included in the published package. This PR specifies the `files` field on our publishable packages to only include the `dist` directory, since we don't need to ship any types or sourcemaps with 3 of them. react-compiler-runtime is a runtime package which has sourcemaps, so we also include the `src` directory in the published package. Also fixes an invalid version range for the react peer dependency in react-compiler-runtime, tested that it works via https://semver.npmjs.com/ ghstack-source-id: 12b36c203fc9fd8d72a1995fb3fba2312de4aa51 Pull Request resolved: facebook/react-forget#2965
Configuration menu - View commit details
-
Copy full SHA for 67ea821 - Browse repository at this point
Copy the full SHA 67ea821View commit details -
[publish] Add script to publish packages
Adds a script to publish babel-plugin-react-compiler, eslint-plugin-react-compiler, and react-compiler-healthcheck to npm. Instructions are in a comment in scripts/publish.js, please read carefully before using this script! Test plan: ``` $ yarn npm:publish yarn run v1.22.10 $ node scripts/publish ℹ Preparing to publish (dry run) [debug=false] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ℹ Dry run: Report tarball contents ========== babel-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠦ Running npm pack --dry-run npm notice npm notice 📦 [email protected] npm notice === Tarball Contents === npm notice 11B dist/__tests__/DisjointSet-test.d.ts npm notice 11B dist/__tests__/envConfig-test.d.ts npm notice 11B dist/__tests__/Logger-test.d.ts npm notice 11B dist/__tests__/parseConfigPragma-test.d.ts npm notice 11B dist/__tests__/Result-test.d.ts npm notice 145B dist/__tests__/test-utils/validateNoUseBeforeDefine.d.ts npm notice 144B dist/Babel/BabelPlugin.d.ts npm notice 350B dist/Babel/RunReactCompilerBabelPlugin.d.ts npm notice 2.4kB dist/CompilerError.d.ts npm notice 455B dist/Entrypoint/Gating.d.ts npm notice 376B dist/Entrypoint/Imports.d.ts npm notice 166B dist/Entrypoint/index.d.ts npm notice 1.8kB dist/Entrypoint/Options.d.ts npm notice 1.3kB dist/Entrypoint/Pipeline.d.ts npm notice 819B dist/Entrypoint/Program.d.ts npm notice 295B dist/Entrypoint/Reanimated.d.ts npm notice 753B dist/Entrypoint/Suppression.d.ts npm notice 113B dist/HIR/AssertConsistentIdentifiers.d.ts npm notice 115B dist/HIR/AssertTerminalSuccessorsExist.d.ts npm notice 529B dist/HIR/AssertValidBlockNesting.d.ts npm notice 110B dist/HIR/AssertValidMutableRanges.d.ts npm notice 585B dist/HIR/BuildHIR.d.ts npm notice 116B dist/HIR/BuildReactiveScopeTerminalsHIR.d.ts npm notice 125B dist/HIR/ComputeUnconditionalBlocks.d.ts npm notice 602B dist/HIR/Dominator.d.ts npm notice 12.7kB dist/HIR/Environment.d.ts npm notice 184B dist/HIR/FindContextIdentifiers.d.ts npm notice 401B dist/HIR/Globals.d.ts npm notice 22.2kB dist/HIR/HIR.d.ts npm notice 2.8kB dist/HIR/HIRBuilder.d.ts npm notice 1.1kB dist/HIR/index.d.ts npm notice 108B dist/HIR/MergeConsecutiveBlocks.d.ts npm notice 115B dist/HIR/MergeOverlappingReactiveScopesHIR.d.ts npm notice 2.2kB dist/HIR/ObjectShape.d.ts npm notice 1.4kB dist/HIR/PrintHIR.d.ts npm notice 106B dist/HIR/PruneUnusedLabelsHIR.d.ts npm notice 1.1kB dist/HIR/Types.d.ts npm notice 1.9kB dist/HIR/visitors.d.ts npm notice 776B dist/index.d.ts npm notice 5.4MB dist/index.js npm notice 429B dist/Inference/AnalyseFunctions.d.ts npm notice 324B dist/Inference/DropManualMemoization.d.ts npm notice 436B dist/Inference/index.d.ts npm notice 224B dist/Inference/InferAlias.d.ts npm notice 204B dist/Inference/InferAliasForPhis.d.ts npm notice 206B dist/Inference/InferAliasForStores.d.ts npm notice 115B dist/Inference/InferMutableContextVariables.d.ts npm notice 151B dist/Inference/InferMutableLifetimes.d.ts npm notice 109B dist/Inference/InferMutableRanges.d.ts npm notice 212B dist/Inference/InferMutableRangesForAlias.d.ts npm notice 106B dist/Inference/InferReactivePlaces.d.ts npm notice 368B dist/Inference/InferReferenceEffects.d.ts npm notice 201B dist/Inference/InferTryCatchAliases.d.ts npm notice 130B dist/Inference/InlineImmediatelyInvokedFunctionExpressions.d.ts npm notice 106B dist/Optimization/ConstantPropagation.d.ts npm notice 258B dist/Optimization/DeadCodeElimination.d.ts npm notice 177B dist/Optimization/index.d.ts npm notice 103B dist/Optimization/PruneMaybeThrows.d.ts npm notice 108B dist/ReactiveScopes/AlignMethodCallScopes.d.ts npm notice 110B dist/ReactiveScopes/AlignObjectMethodScopes.d.ts npm notice 133B dist/ReactiveScopes/AlignReactiveScopesToBlockScopes.d.ts npm notice 126B dist/ReactiveScopes/AlignReactiveScopesToBlockScopesHIR.d.ts npm notice 132B dist/ReactiveScopes/AssertScopeInstructionsWithinScope.d.ts npm notice 125B dist/ReactiveScopes/AssertWellFormedBreakTargets.d.ts npm notice 363B dist/ReactiveScopes/BuildReactiveBlocks.d.ts npm notice 142B dist/ReactiveScopes/BuildReactiveFunction.d.ts npm notice 759B dist/ReactiveScopes/CodegenReactiveFunction.d.ts npm notice 154B dist/ReactiveScopes/CollectReactiveIdentifiers.d.ts npm notice 128B dist/ReactiveScopes/CollectReferencedGlobals.d.ts npm notice 698B dist/ReactiveScopes/DeriveMinimalDependencies.d.ts npm notice 138B dist/ReactiveScopes/ExtractScopeDeclarationsFromDestructuring.d.ts npm notice 121B dist/ReactiveScopes/FlattenReactiveLoops.d.ts npm notice 124B dist/ReactiveScopes/FlattenScopesWithHooksOrUse.d.ts npm notice 2.1kB dist/ReactiveScopes/index.d.ts npm notice 370B dist/ReactiveScopes/InferReactiveScopeVariables.d.ts npm notice 217B dist/ReactiveScopes/MemoizeFbtOperandsInSameScope.d.ts npm notice 127B dist/ReactiveScopes/MergeOverlappingReactiveScopes.d.ts npm notice 138B dist/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.d.ts npm notice 1.0kB dist/ReactiveScopes/PrintReactiveFunction.d.ts npm notice 123B dist/ReactiveScopes/PromoteUsedTemporaries.d.ts npm notice 118B dist/ReactiveScopes/PropagateEarlyReturns.d.ts npm notice 127B dist/ReactiveScopes/PropagateScopeDependencies.d.ts npm notice 123B dist/ReactiveScopes/PruneAllReactiveScopes.d.ts npm notice 126B dist/ReactiveScopes/PruneAlwaysInvalidatingScopes.d.ts npm notice 117B dist/ReactiveScopes/PruneHoistedContexts.d.ts npm notice 227B dist/ReactiveScopes/PruneNonEscapingScopes.d.ts npm notice 125B dist/ReactiveScopes/PruneNonReactiveDependencies.d.ts npm notice 122B dist/ReactiveScopes/PruneTemporaryLValues.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedLabels.d.ts npm notice 118B dist/ReactiveScopes/PruneUnusedScopes.d.ts npm notice 123B dist/ReactiveScopes/RenameVariables.d.ts npm notice 114B dist/ReactiveScopes/StabilizeBlockIds.d.ts npm notice 3.1kB dist/ReactiveScopes/visitors.d.ts npm notice 170B dist/SSA/EliminateRedundantPhi.d.ts npm notice 101B dist/SSA/EnterSSA.d.ts npm notice 154B dist/SSA/index.d.ts npm notice 99B dist/SSA/LeaveSSA.d.ts npm notice 63.5kB dist/tsconfig.tsbuildinfo npm notice 43B dist/TypeInference/index.d.ts npm notice 103B dist/TypeInference/InferTypes.d.ts npm notice 352B dist/Utils/ComponentDeclaration.d.ts npm notice 256B dist/Utils/DisjointSet.d.ts npm notice 322B dist/Utils/HookDeclaration.d.ts npm notice 613B dist/Utils/logger.d.ts npm notice 2.3kB dist/Utils/Result.d.ts npm notice 119B dist/Utils/RuntimeDiagnosticConstants.d.ts npm notice 1.1kB dist/Utils/Stack.d.ts npm notice 149B dist/Utils/todo.d.ts npm notice 782B dist/Utils/utils.d.ts npm notice 603B dist/Validation/index.d.ts npm notice 117B dist/Validation/ValidateContextVariableLValues.d.ts npm notice 109B dist/Validation/ValidateHooksUsage.d.ts npm notice 214B dist/Validation/ValidateMemoizedEffectDependencies.d.ts npm notice 113B dist/Validation/ValidateNoCapitalizedCalls.d.ts npm notice 114B dist/Validation/ValidateNoRefAccesInRender.d.ts npm notice 113B dist/Validation/ValidateNoSetStateInRender.d.ts npm notice 131B dist/Validation/ValidatePreservedManualMemoization.d.ts npm notice 102B dist/Validation/ValidateUseMemo.d.ts npm notice 2.3kB package.json npm notice === Tarball Details === npm notice name: babel-plugin-react-compiler npm notice version: 0.0.1 npm notice filename: babel-plugin-react-compiler-0.0.1.tgz npm notice package size: 1.1 MB npm notice unpacked size: 5.5 MB npm notice shasum: 9a0fb71bdc904d6ab92432a506b0e037f10dd7ce npm notice integrity: sha512-hXtObyIEP4MbO[...]jstRbpztyLf4g== npm notice total files: 119 npm notice ========== eslint-plugin-react-compiler ========== ⠴ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠋ Running npm pack --dry-run npm notice npm notice 📦 [email protected] npm notice === Tarball Contents === npm notice 827B README.md npm notice 2.1MB dist/index.js npm notice 968B package.json npm notice === Tarball Details === npm notice name: eslint-plugin-react-compiler npm notice version: 0.0.0 npm notice filename: eslint-plugin-react-compiler-0.0.0.tgz npm notice package size: 300.5 kB npm notice unpacked size: 2.1 MB npm notice shasum: f24dab544b03d36d9bb676a16256f114bd5e0ed6 npm notice integrity: sha512-8PcKZXZ+RVBDP[...]D7jFmkvHJoBeA== npm notice total files: 3 npm notice ========== react-compiler-healthcheck ========== ⠼ Running npm pack --dry-run npm WARN config init.author.name Use `--init-author-name` instead. npm WARN config init.author.email Use `--init-author-email` instead. ⠏ Running npm pack --dry-run npm notice npm notice 📦 [email protected] npm notice === Tarball Contents === npm notice 2.1MB dist/index.js npm notice 677B package.json npm notice 1.8kB rollup.config.js npm notice 1.1kB src/checks/libraryCompat.ts npm notice 3.2kB src/checks/reactCompiler.ts npm notice 759B src/checks/strictMode.ts npm notice 67B src/config.ts npm notice 1.5kB src/index.ts npm notice 602B tsconfig.json npm notice === Tarball Details === npm notice name: react-compiler-healthcheck npm notice version: 0.0.0 npm notice filename: react-compiler-healthcheck-0.0.0.tgz npm notice package size: 290.4 kB npm notice unpacked size: 2.1 MB npm notice shasum: 55c0eb57aebc7305270a29e78ebf6c056044bae0 npm notice integrity: sha512-nPVhGyh8i9PoO[...]v52c3U0tKGpzA== npm notice total files: 9 npm notice ✔ Please confirm contents of packages before publishing. You can run this command again with --for-real to publish to npm ✨ Done in 61.19s. ``` ``` $ yarn npm:publish --debug --for-real yarn run v1.22.10 $ node scripts/publish --debug --for-real ℹ Preparing to publish (for real) [debug=true] ℹ Building packages ✔ Successfully built babel-plugin-react-compiler ✔ Successfully built eslint-plugin-react-compiler ✔ Successfully built react-compiler-healthcheck ✔ Bumped babel-plugin-react-compiler to 0.0.0-experimental-2769f7a-20240513 ✔ Bumped eslint-plugin-react-compiler to 0.0.0-experimental-e04a001-20240513 ✔ Bumped react-compiler-healthcheck to 0.0.0-experimental-410375f-20240513 ========== babel-plugin-react-compiler ========== ⠋ Publishing babel-plugin-react-compiler to npm Command that would have run: npm publish --dry-run /Users/lauren/code/react-forget/compiler/scripts/publish.js:188 throw new Error( ^ Error: This error is intentional, please double check scripts/publish.js and remove this error prior to publishing at main (/Users/lauren/code/react-forget/compiler/scripts/publish.js:188:13) Node.js v20.11.0 error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` On the day of launch, remove the hardcoded error, then run `yarn npm:publish --debug --for-real` first as a sanity check. Confirm the contents are correct. Then when you are certain, run `yarn npm:publish --for-real`, and push the commited version bumps to GitHub so the hashes that the packages originate from are public. ghstack-source-id: 403bc22d4b340056fd112fcfc38580f28ed6c986 Pull Request resolved: facebook/react-forget#2966
Configuration menu - View commit details
-
Copy full SHA for 6948639 - Browse repository at this point
Copy the full SHA 6948639View commit details -
Don't emit types for babel-plugin-react-compiler
ghstack-source-id: a1776f97d5f7d4d8e02886906eb001e358628fc8 Pull Request resolved: facebook/react-forget#2967
Configuration menu - View commit details
-
Copy full SHA for 6457343 - Browse repository at this point
Copy the full SHA 6457343View commit details -
ghstack-source-id: 43bb0c8c957fc550203445868c90fa706e3a8d11 Pull Request resolved: facebook/react-forget#2968
Configuration menu - View commit details
-
Copy full SHA for ecccaf6 - Browse repository at this point
Copy the full SHA ecccaf6View commit details
Commits on May 15, 2024
-
Bump React 19 beta to RC (facebook#29060)
This updates the Canary label from "beta" to "rc". We will publish an actual RC (e.g. 19.0.0-rc.0) too; this only changes the label in the canary releases.
Configuration menu - View commit details
-
Copy full SHA for 915b914 - Browse repository at this point
Copy the full SHA 915b914View commit details -
Configuration menu - View commit details
-
Copy full SHA for 41142f3 - Browse repository at this point
Copy the full SHA 41142f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d794e4a - Browse repository at this point
Copy the full SHA d794e4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5501ebc - Browse repository at this point
Copy the full SHA 5501ebcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 740b7c1 - Browse repository at this point
Copy the full SHA 740b7c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 575477a - Browse repository at this point
Copy the full SHA 575477aView commit details -
Merge pull request facebook#29061 from facebook/compiler
Open-source React Compiler
Configuration menu - View commit details
-
Copy full SHA for 71565a9 - Browse repository at this point
Copy the full SHA 71565a9View commit details -
Add a
main
field toeslint-plugin-react-compiler
, fixes facebook#……29068. (facebook#29072) ## Summary The main field is missing, this fixes it. Fixes facebook#29068. ## How did you test this change? Manually patched the package and tried it in my codebase.
Configuration menu - View commit details
-
Copy full SHA for cfeb491 - Browse repository at this point
Copy the full SHA cfeb491View commit details -
Fix ESLint and Prettier configs for React Compiler (facebook#29073)
Fixes the top-level ESLint and Prettier configs to ignore the compiler. For now the compiler has its own prettier and linting setup with different versions/configs.
Configuration menu - View commit details
-
Copy full SHA for c93c30f - Browse repository at this point
Copy the full SHA c93c30fView commit details -
[heathcheck] Check for namespaced StrictMode (facebook#29076)
Previously, we only checked for StrictMode by searching for `<StrictMode>` but we should also check for the namespaced version, `<React.StrictMode>`. Fixes facebook#29075
Configuration menu - View commit details
-
Copy full SHA for 5e11e7f - Browse repository at this point
Copy the full SHA 5e11e7fView commit details -
compiler: fix jsx text attributes with double quotes (facebook#29079)
Fixes facebook#29069 by detecting the presence of double-quotes in JSX attribute strings and falling back to using an expression container.
Configuration menu - View commit details
-
Copy full SHA for 3adca7a - Browse repository at this point
Copy the full SHA 3adca7aView commit details -
[compiler:eslint] Fix false positive with TS type param syntax
Previously we would attempt to parse code in the eslint plugin with the HermesParser first as it can handle some TS syntax. However, this was leading to a mis-parse of React hook calls with type params (eg, `useRef<null>()` as a BinaryExpression rather than a CallExpression with a type param. This triggered our validation that Hooks should not be used as normal values. To fix this, we now try to parse with the babel parser (with TS support) for filenames that end with ts/tsx, and fallback to HermesParser for regular JS files. ghstack-source-id: 5b7231031cace749a6e689412b3e8b5c9d03ed4b Pull Request resolved: facebook#29081
Configuration menu - View commit details
-
Copy full SHA for cf7d895 - Browse repository at this point
Copy the full SHA cf7d895View commit details -
[compiler] Various fixes for publishing script
- Specify a registry for npm publish because otherwise it tries to use the yarn registry - `packages` option actually works This _should_ work now (note last line of output), will test it once we land this since i want to publish a new version of the eslint plugin with some important fixes. ``` npm notice npm notice 📦 [email protected] npm notice === Tarball Contents === npm notice 827B README.md npm notice 2.1MB dist/index.js npm notice 1.0kB package.json npm notice === Tarball Details === npm notice name: eslint-plugin-react-compiler npm notice version: 0.0.0-experimental-53bb89e-20240515 npm notice filename: eslint-plugin-react-compiler-0.0.0-experimental-53bb89e-20240515.tgz npm notice package size: 300.9 kB npm notice unpacked size: 2.1 MB npm notice shasum: cb99823f3a483c74f470085cac177bd020f7a85a npm notice integrity: sha512-L3HV9qja1dnCl[...]IaRSZJ3P/v6yQ== npm notice total files: 3 npm notice npm notice Publishing to http://registry.npmjs.org/ with tag latest and default access (dry-run) ``` ghstack-source-id: 63067ef772c780a665fc04e642b0f533aaacbe44 Pull Request resolved: facebook#29082
Configuration menu - View commit details
-
Copy full SHA for 5572edc - Browse repository at this point
Copy the full SHA 5572edcView commit details -
[compiler] Check if current branch is main
This script needs to run from `main` since it commits version bumps for packages, and those need to point to publicly available hashes. So, throw an error if we're not already on main. ghstack-source-id: ce0168e826b990fd55733e777ee8effe4f35400a Pull Request resolved: facebook#29083
Configuration menu - View commit details
-
Copy full SHA for a0eb265 - Browse repository at this point
Copy the full SHA a0eb265View commit details
Commits on May 16, 2024
-
[compiler] Add readme for babel plugin
Adds a simple readme for the babel plugin with links to the docs. ghstack-source-id: 4dac0b2a4b2e2114e369dd8f63eea55909f668c1 Pull Request resolved: facebook#29084
Configuration menu - View commit details
-
Copy full SHA for 50c999e - Browse repository at this point
Copy the full SHA 50c999eView commit details -
chore(docs): fix typo (plugion => plugin) in DESIGN_GOALS.md (faceboo…
…k#29086) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary This PR fixes a typo in `./compiler/docs/DESIGN_GOALS.md`. I believe `plugion` should be `plugin`. ## How did you test this change? Rendered the markdown to html.
Configuration menu - View commit details
-
Copy full SHA for 5052bfb - Browse repository at this point
Copy the full SHA 5052bfbView commit details -
[compiler:publish] Specify https for registry
Uses https for the npm registry so the publishing script isn't rejected. Fixes: ``` Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/ ``` ghstack-source-id: b247d044ea48f3007cf8bd13445fb7ece0f5b02f Pull Request resolved: facebook#29087
Configuration menu - View commit details
-
Copy full SHA for 7f22c52 - Browse repository at this point
Copy the full SHA 7f22c52View commit details -
Configuration menu - View commit details
-
Copy full SHA for f470ba3 - Browse repository at this point
Copy the full SHA f470ba3View commit details -
Configuration menu - View commit details
-
Copy full SHA for c912057 - Browse repository at this point
Copy the full SHA c912057View commit details -
Configuration menu - View commit details
-
Copy full SHA for 149b917 - Browse repository at this point
Copy the full SHA 149b917View commit details -
[React Compiler] use
filename
instead ofcontext.filename
in ESLi……nt plugin (facebook#29104) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Use `filename` instead of `context.filename` in eslint compiler. The problem is that in `react-native` + `typescript` project the context may not have `filename`: <img width="384" alt="image" src="https://github.com/facebook/react/assets/22820318/e5d184fa-5ac9-4512-96b9-644baa3d5f25"> And eslint will crash with: ```bash TypeError: Error while loading rule 'react-compiler/react-compiler': Cannot read properties of undefined (reading 'endsWith') ``` But in fact we already derive `filename` variable earlier so we can simply reuse the variable (I guess). ## How did you test this change? - add `eslint` plugin to RN project; - run eslint
Configuration menu - View commit details
-
Copy full SHA for e8779a9 - Browse repository at this point
Copy the full SHA e8779a9View commit details -
[React Compiler] Fix rule name for ESLint plugin (facebook#29096)
/cc @poteto <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> Seems like the README of the package was outdated. ## How did you test this change? Tried this configuration in a project of mine. <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
Configuration menu - View commit details
-
Copy full SHA for 94896cb - Browse repository at this point
Copy the full SHA 94896cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 91e88f9 - Browse repository at this point
Copy the full SHA 91e88f9View commit details -
docs: fix typo DESIGN_GOALS.md (facebook#29102)
## Summary Fixes typo DESIGN_GOALS.md in react compiler docs ## How did you test this change? it's document fix, so no tests needed.
Configuration menu - View commit details
-
Copy full SHA for 7a149aa - Browse repository at this point
Copy the full SHA 7a149aaView commit details
Commits on May 17, 2024
-
compiler: merge reactive scopes across const StoreLocal (facebook#29095)
@jbonta nerd-sniped me into making this optimization during conference prep, posting this as a PR now that keynote is over. Consider these two cases: ```javascript export default function MyApp1({ count }) { const cb = () => count; return <div onclick={cb}>Hello World</div>; } export default function MyApp2({ count }) { return <div onclick={() => count}>Hello World</div>; } ``` Previously, the former would create two reactive scopes (one for `cb`, one for the div) while the latter would only have a single scope for the `div` and its inline callback. The reason we created separate scopes before is that there's a `StoreLocal 'cb' = t0` instruction in-between, and i had conservatively implemented the merging pass to not allow intervening StoreLocal instructions. The observation is that intervening StoreLocals are fine _if_ the assigned variable's last usage is the next scope. We already have a check that the intervening lvalues are last-used at/before the next scope, so it's trivial to extend this to support StoreLocal. Note that we already don't merge scopes if there are intervening terminals, so we don't have to worry about things like conditional StoreLocal, conditional access of the resulting value, etc.
Configuration menu - View commit details
-
Copy full SHA for 5ab5471 - Browse repository at this point
Copy the full SHA 5ab5471View commit details -
[compiler:playground] Fix broken builds
Now that the compiler is public, the `*` version was grabbing the latest version of the compiler off of npm and was resolving to my very first push to npm (an empty package containing only a single package.json). This was breaking the playground as it would attempt to load the compiler but then crash the babel pipeline due to the node module not being found. ghstack-source-id: 695fd9caac64d15edfa095b8c871e75520381fcb Pull Request resolved: facebook#29122
Configuration menu - View commit details
-
Copy full SHA for 3f1436c - Browse repository at this point
Copy the full SHA 3f1436cView commit details -
[compiler] Todo for for-await loops
ghstack-source-id: 13f11edfbef2af2e2a9ab876c18b0a4013a3eae0 Pull Request resolved: facebook#29118
Configuration menu - View commit details
-
Copy full SHA for 477a3d1 - Browse repository at this point
Copy the full SHA 477a3d1View commit details -
Lazily freeze in case anything in the currently initializing chunk is…
… blocked (facebook#29139) Fixed facebook#29129. --------- Co-authored-by: Hendrik Liebau <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for af3a55e - Browse repository at this point
Copy the full SHA af3a55eView commit details -
compiler: Workaround Babel bug with unicode in jsx string attrs
Workaround for a bug in older versions of Babel, where strings with unicode are incorrectly escaped when emitted as JSX attributes, causing double-escaping by later processing. Closes facebook#29120 Closes facebook#29124 ghstack-source-id: 065440d4fb97e164beb8a8f15f252f372a59c5a0 Pull Request resolved: facebook#29141
Configuration menu - View commit details
-
Copy full SHA for be6712f - Browse repository at this point
Copy the full SHA be6712fView commit details -
Add issue template for React Compiler
Adds a GitHub issue template form so we can automatically categorize issues and get more information upfront. I mostly referenced the DevTools bug report template and made some tweaks. ghstack-source-id: 5bfc728a625f367932fc21263e82681079d3ac65 Pull Request resolved: facebook#29140
Configuration menu - View commit details
-
Copy full SHA for ecddf3c - Browse repository at this point
Copy the full SHA ecddf3cView commit details -
compiler: update comment on memo cache import code
ghstack-source-id: b6c98c78854c9125bef504731515b9854c01960d Pull Request resolved: facebook#29142
Configuration menu - View commit details
-
Copy full SHA for 6400172 - Browse repository at this point
Copy the full SHA 6400172View commit details -
[Compiler][script] Dedupe error report counts before reporting in hea…
…lthcheck (facebook#29085) Certain compiler passes currently may collect a few error events before reporting (see https://github.com/facebook/react/blob/main/compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts#L101-L107)
Configuration menu - View commit details
-
Copy full SHA for 1d6eebf - Browse repository at this point
Copy the full SHA 1d6eebfView commit details -
[compiler:playground] Resizable tabs (facebook#29133)
## Summary Every tab wraps the text around but there is no way to resize it. It was also hard to use the source map tab. It doesn't occupy the full height nor is the tab resizable. So I made all the tabs resizable. > Also, > * make the source map tab occupy full height > * make it a teeny tiny bit easier to work with the compiler playground (especially source map) ## How did you test this change? https://github.com/facebook/react/assets/91976421/cdec30e8-cadb-4958-8786-31c54ea83bd6 Signed-off-by: abizek <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 541e3c5 - Browse repository at this point
Copy the full SHA 541e3c5View commit details -
compiler: workaround babel issue with html entity escaping
Babel doesn't seem to properly preserve escaping of HTML entities when emitting JSX text children, so this commit works around the issue by emitting a JsxExpressionContainer for JSX children that contain ">", "<", or "&" characters. Closes facebook#29100 ghstack-source-id: 2d0622397cc067c6336f3635073e07daef854084 Pull Request resolved: facebook#29143
Configuration menu - View commit details
-
Copy full SHA for 5a12a0d - Browse repository at this point
Copy the full SHA 5a12a0dView commit details -
[compiler:publish] Rename publish script
ghstack-source-id: 1cccc91b5d0e69240b2f4f539c60eab0f156e15f Pull Request resolved: facebook#29148
Configuration menu - View commit details
-
Copy full SHA for e7673e4 - Browse repository at this point
Copy the full SHA e7673e4View commit details -
[compiler:publish] Don't hash node_modules
ghstack-source-id: 4ac2ecc8654b1a8c149ab9d00c06cb4c401473da Pull Request resolved: facebook#29147
Configuration menu - View commit details
-
Copy full SHA for 4fbc3a3 - Browse repository at this point
Copy the full SHA 4fbc3a3View commit details -
[compiler:publish] Prompt for OTP
Makes running the script a little more ergonomic by prompting for OTP upfront. ghstack-source-id: e9967bfde1ab01ff9417a848154743ae1926318d Pull Request resolved: facebook#29149
Configuration menu - View commit details
-
Copy full SHA for b195a94 - Browse repository at this point
Copy the full SHA b195a94View commit details -
[compiler:publish] Bump time to reconsider to 3s
ghstack-source-id: afc8976a8956db79ed824f30cf575d3f5cf93cfe Pull Request resolved: facebook#29150
Configuration menu - View commit details
-
Copy full SHA for 38d961f - Browse repository at this point
Copy the full SHA 38d961fView commit details -
[compiler:publish] Don't check branch in debug mode
ghstack-source-id: 465f5a358096c55310ebf5a0beef581646ab553e Pull Request resolved: facebook#29153
Configuration menu - View commit details
-
Copy full SHA for 1052a5f - Browse repository at this point
Copy the full SHA 1052a5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2a64b0 - Browse repository at this point
Copy the full SHA c2a64b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 630c6fb - Browse repository at this point
Copy the full SHA 630c6fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 597ad74 - Browse repository at this point
Copy the full SHA 597ad74View commit details
Commits on May 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ff60b11 - Browse repository at this point
Copy the full SHA ff60b11View commit details
Commits on May 19, 2024
-
Add hyperlink for Good First Issues header (facebook#29103)
## Summary The "Good First Issues" header in the README was missing a hyperlink where the other similar headlines had one. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? N/A <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
Configuration menu - View commit details
-
Copy full SHA for ccb06b0 - Browse repository at this point
Copy the full SHA ccb06b0View commit details -
feat(hyperlink): added a hyperlink to Node in README.md file (faceboo…
…k#28940) As a fellow beginner to React, I didn't even know React runs on top of Node when I started. So, some beginners might get confused about what is Node and how to find details about it or how to download it. So, I thought to add a hyperlink to Node replacing the word Node in the README.md file. I think this might be a valuable contribution. - Januda
Configuration menu - View commit details
-
Copy full SHA for f74c5cc - Browse repository at this point
Copy the full SHA f74c5ccView commit details
Commits on May 20, 2024
-
compiler: Improve ValidateNoRefAccessInRender to ignore access in eff…
…ects Improves ValidateNoRefAccessInRender (still disabled by default) to properly ignore ref access within effects. This includes allowing ref access within functions that are only transitively called from an effect. While I was here I also added some extra test fixtures for allowing global mutation in effects. ghstack-source-id: fb6352a1788b7bdbebb40d5b844b711ef87d6771 Pull Request resolved: facebook#29151
Configuration menu - View commit details
-
Copy full SHA for 8592369 - Browse repository at this point
Copy the full SHA 8592369View commit details -
compiler: fix accidental propagation of function effects from StartMe…
…moize/FinishMemoize By default, React Compiler will skip compilation if it cannot preserve existing memoization. Ie, if the code has an existing `useMemo()` or `useCallback()` and the compiler cannot determine that it is safe to keep that memoization — or do even better — then we'll leave the code alone. The actual compilation doesn't use any hints from existing memo calls, this is purely to check and avoid regressing any specific memoization that developers may have already applied. However, we were accidentally reporting some false-positive _validation_ errors due to the StartMemoize and FinishMemoize instructions that we emit to track where the memoization was in the source code. This is now fixed. Fixes facebook#29131 Fixes facebook#29132 ghstack-source-id: 9f6b8dbc5074ccc96e6073cf11c4920b5375faf6 Pull Request resolved: facebook#29154
Configuration menu - View commit details
-
Copy full SHA for cca15a2 - Browse repository at this point
Copy the full SHA cca15a2View commit details -
[compiler:chore] fix SSA pdf reference link (facebook#29162)
## Summary This PR fixes the deadlink in the SSA comment. Previously the attached link is down now. ## How did you test this change? 1. I can confirm the PDF in the new link is the same as the old now. Reference: https://www.recompiled.dev/blog/ssa/ 2. I can confirm the old link is down, and it is [not just me](https://downforeveryoneorjustme.com/pp.info.uni-karlsruhe.de?proto=https) <img width="580" alt="image" src="https://github.com/facebook/react/assets/2883231/eeca5eda-6f61-4ac4-a113-1b04370533d9"> --------- Co-authored-by: Jan Kassens <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 68de7d0 - Browse repository at this point
Copy the full SHA 68de7d0View commit details -
Bump postcss from 8.4.24 to 8.4.31 in /compiler (facebook#29063)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.31. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/releases">postcss's releases</a>.</em></p> <blockquote> <h2>8.4.31</h2> <ul> <li>Fixed <code>\r</code> parsing to fix CVE-2023-44270.</li> </ul> <h2>8.4.30</h2> <ul> <li>Improved source map performance (by <a href="https://github.com/romainmenke"><code>@romainmenke</code></a>).</li> </ul> <h2>8.4.29</h2> <ul> <li>Fixed <code>Node#source.offset</code> (by <a href="https://github.com/idoros"><code>@idoros</code></a>).</li> <li>Fixed docs (by <a href="https://github.com/coliff"><code>@coliff</code></a>).</li> </ul> <h2>8.4.28</h2> <ul> <li>Fixed <code>Root.source.end</code> for better source map (by <a href="https://github.com/romainmenke"><code>@romainmenke</code></a>).</li> <li>Fixed <code>Result.root</code> types when <code>process()</code> has no parser.</li> </ul> <h2>8.4.27</h2> <ul> <li>Fixed <code>Container</code> clone methods types.</li> </ul> <h2>8.4.26</h2> <ul> <li>Fixed clone methods types.</li> </ul> <h2>8.4.25</h2> <ul> <li>Improve stringify performance (by <a href="https://github.com/romainmenke"><code>@romainmenke</code></a>).</li> <li>Fixed docs (by <a href="https://github.com/vikaskaliramna07"><code>@vikaskaliramna07</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's changelog</a>.</em></p> <blockquote> <h2>8.4.31</h2> <ul> <li>Fixed <code>\r</code> parsing to fix CVE-2023-44270.</li> </ul> <h2>8.4.30</h2> <ul> <li>Improved source map performance (by Romain Menke).</li> </ul> <h2>8.4.29</h2> <ul> <li>Fixed <code>Node#source.offset</code> (by Ido Rosenthal).</li> <li>Fixed docs (by Christian Oliff).</li> </ul> <h2>8.4.28</h2> <ul> <li>Fixed <code>Root.source.end</code> for better source map (by Romain Menke).</li> <li>Fixed <code>Result.root</code> types when <code>process()</code> has no parser.</li> </ul> <h2>8.4.27</h2> <ul> <li>Fixed <code>Container</code> clone methods types.</li> </ul> <h2>8.4.26</h2> <ul> <li>Fixed clone methods types.</li> </ul> <h2>8.4.25</h2> <ul> <li>Improve stringify performance (by Romain Menke).</li> <li>Fixed docs (by <a href="https://github.com/vikaskaliramna07"><code>@vikaskaliramna07</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/postcss/postcss/commit/90208de8805dd762596c0028b8637ffbed23e371"><code>90208de</code></a> Release 8.4.31 version</li> <li><a href="https://github.com/postcss/postcss/commit/58cc860b4c1707510c9cd1bc1fa30b423a9ad6c5"><code>58cc860</code></a> Fix carrier return parsing</li> <li><a href="https://github.com/postcss/postcss/commit/4fff8e4cdc237619df1d73a444c0a8329701c1e2"><code>4fff8e4</code></a> Improve pnpm test output</li> <li><a href="https://github.com/postcss/postcss/commit/cd43ed123274a92ebc13a1e8cccf1d65b8198f84"><code>cd43ed1</code></a> Update dependencies</li> <li><a href="https://github.com/postcss/postcss/commit/caa916bdcbf66c51321574e2dde112ab13e8b306"><code>caa916b</code></a> Update dependencies</li> <li><a href="https://github.com/postcss/postcss/commit/8972f76923e921a3c9655822382039b31b1c8e1a"><code>8972f76</code></a> Typo</li> <li><a href="https://github.com/postcss/postcss/commit/11a5286f781d2a637f2c545c5e9cd661055acaab"><code>11a5286</code></a> Typo</li> <li><a href="https://github.com/postcss/postcss/commit/45c55017776fc61f7815d1ea8e92d5291ca5d6c8"><code>45c5501</code></a> Release 8.4.30 version</li> <li><a href="https://github.com/postcss/postcss/commit/bc3c341f589f9c15f1b56838a33d908374e537e0"><code>bc3c341</code></a> Update linter</li> <li><a href="https://github.com/postcss/postcss/commit/b2be58a2eb788d12474ee1335f8ecdb9fa6225aa"><code>b2be58a</code></a> Merge pull request <a href="https://redirect.github.com/postcss/postcss/issues/1881">#1881</a> from romainmenke/improve-sourcemap-performance--phil...</li> <li>Additional commits viewable in <a href="https://github.com/postcss/postcss/compare/8.4.24...8.4.31">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=postcss&package-manager=npm_and_yarn&previous-version=8.4.24&new-version=8.4.31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/react/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 8287cb9 - Browse repository at this point
Copy the full SHA 8287cb9View commit details -
Bump rustix from 0.37.22 to 0.37.27 in /compiler (facebook#29173)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.22 to 0.37.27. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/bytecodealliance/rustix/commit/b38dc512628b5db8d08c26449ee2beed7ed51dcc"><code>b38dc51</code></a> chore: Release rustix version 0.37.27</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/a2d9c8ee1a0c1548f17e5ec6096f3a005111d481"><code>a2d9c8e</code></a> Fix p{read,write}v{,v2}'s encoding of the offset argument on Linux. (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/896">#896</a>) (#...</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/dce277762238d5fd40c57ccf0151645d8de3d33d"><code>dce2777</code></a> chore: Release rustix version 0.37.26</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/06dbe83c60cbfa603c9437aef9dfd119f068b1df"><code>06dbe83</code></a> Fix <code>sendmsg_unix</code>'s address encoding. (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/885">#885</a>) (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/886">#886</a>)</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/00b84d6aac2364455eab2c68e42afee63d6e3ad3"><code>00b84d6</code></a> chore: Release rustix version 0.37.25</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/cad15a7076d493a0651fb0b7889bd5e5a72a8f17"><code>cad15a7</code></a> Fixes for <code>Dir</code> on macOS, FreeBSD, and WASI.</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/df3c3a192cf144af0da8a57417fb4addbdc611f6"><code>df3c3a1</code></a> Merge pull request from GHSA-c827-hfw6-qwvm</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/b78aeff1a271863ecc75ccca37f014d33b9f6705"><code>b78aeff</code></a> chore: Release rustix version 0.37.24</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/c0c3f01d7c8296ebadb23ad0b4f82a9a082252ae"><code>c0c3f01</code></a> Add GNU/Hurd support (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/852">#852</a>)</li> <li><a href="https://github.com/bytecodealliance/rustix/commit/f416b6b27b8d0540e8be14f8d30153ea3e3d7476"><code>f416b6b</code></a> Fix the <code>test_ttyname_ok</code> test when /dev/stdin is inaccessable. (<a href="https://redirect.github.com/bytecodealliance/rustix/issues/821">#821</a>)</li> <li>Additional commits viewable in <a href="https://github.com/bytecodealliance/rustix/compare/v0.37.22...v0.37.27">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustix&package-manager=cargo&previous-version=0.37.22&new-version=0.37.27)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/react/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 9abea0c - Browse repository at this point
Copy the full SHA 9abea0cView commit details -
Bump tough-cookie from 4.1.2 to 4.1.4 in /compiler (facebook#29065)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/salesforce/tough-cookie/releases">tough-cookie's releases</a>.</em></p> <blockquote> <h2>v4.1.4</h2> <p><a href="https://www.npmjs.com/package/tough-cookie/v/4.1.4">https://www.npmjs.com/package/tough-cookie/v/4.1.4</a></p> <h2>What's Changed</h2> <ul> <li>Add local alias for <code>toString</code> by <a href="https://github.com/corvidism"><code>@corvidism</code></a> in <a href="https://redirect.github.com/salesforce/tough-cookie/pull/409">salesforce/tough-cookie#409</a></li> <li>Fix incorrect string validation for URL by <a href="https://github.com/coditva"><code>@coditva</code></a> in <a href="https://redirect.github.com/salesforce/tough-cookie/pull/261">salesforce/tough-cookie#261</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/corvidism"><code>@corvidism</code></a> made their first contribution in <a href="https://redirect.github.com/salesforce/tough-cookie/pull/409">salesforce/tough-cookie#409</a></li> <li><a href="https://github.com/coditva"><code>@coditva</code></a> made their first contribution in <a href="https://redirect.github.com/salesforce/tough-cookie/pull/261">salesforce/tough-cookie#261</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/salesforce/tough-cookie/compare/v4.1.3...v4.1.4">https://github.com/salesforce/tough-cookie/compare/v4.1.3...v4.1.4</a></p> <h2>4.1.3</h2> <p>Security fix for Prototype Pollution discovery in <a href="https://redirect.github.com/salesforce/tough-cookie/issues/282">#282</a>. This is a minor release, although output from the <code>inspect</code> utility is affected by this change, we felt this change was important enough to be pushed into the next patch.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/salesforce/tough-cookie/commit/cacbc37936bd4824693d885e1e65dca626ed3c8c"><code>cacbc37</code></a> Bump version to 4.1.4</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/a48fb3a6ba2bbce41595a20e1db56543d974057b"><code>a48fb3a</code></a> Add tests for url validation</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/50e69bf9372c13a1e573b77c179a879198a240e3"><code>50e69bf</code></a> Merge pull request <a href="https://redirect.github.com/salesforce/tough-cookie/issues/261">#261</a> from postmanlabs/fix/url-string-validation</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/1253d58825378c2327e3a71e2228b65812d1cf7c"><code>1253d58</code></a> Merge pull request <a href="https://redirect.github.com/salesforce/tough-cookie/issues/409">#409</a> from corvidism/validators-to-string</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/238367e2f1d8a2c72cc25cc80a6eeecb612983d6"><code>238367e</code></a> Add local alias for <code>toString</code></li> <li><a href="https://github.com/salesforce/tough-cookie/commit/4ff4d29f6cefd279a412b8d62a21142ebd410b36"><code>4ff4d29</code></a> 4.1.3 release preparation, update the package and lib/version to 4.1.3. (<a href="https://redirect.github.com/salesforce/tough-cookie/issues/284">#284</a>)</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e"><code>12d4747</code></a> Prevent prototype pollution in cookie memstore (<a href="https://redirect.github.com/salesforce/tough-cookie/issues/283">#283</a>)</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/f06b72d1d447f33dfa6222c0a3c0c5e063558248"><code>f06b72d</code></a> Fix documentation for store.findCookies, missing allowSpecialUseDomain proper...</li> <li><a href="https://github.com/salesforce/tough-cookie/commit/cf6debd15f16df43030f36719251fcce0ed27dfc"><code>cf6debd</code></a> Fix incorrect string validation for URL</li> <li>See full diff in <a href="https://github.com/salesforce/tough-cookie/compare/v4.1.2...v4.1.4">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~ccasey">ccasey</a>, a new releaser for tough-cookie since your current version.</p> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tough-cookie&package-manager=npm_and_yarn&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/react/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for ba51ebe - Browse repository at this point
Copy the full SHA ba51ebeView commit details -
Bump word-wrap from 1.2.3 to 1.2.5 in /compiler (facebook#29064)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jonschlinkert/word-wrap/releases">word-wrap's releases</a>.</em></p> <blockquote> <h2>1.2.5</h2> <p><strong>Changes</strong>:</p> <p>Reverts default value for <code>options.indent</code> to two spaces <code>' '</code>.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/jonschlinkert/word-wrap/compare/1.2.4...1.2.5">https://github.com/jonschlinkert/word-wrap/compare/1.2.4...1.2.5</a></p> <h2>1.2.4</h2> <h2>What's Changed</h2> <ul> <li>Remove default indent by <a href="https://github.com/mohd-akram"><code>@mohd-akram</code></a> in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li> <li>🔒fix: CVE 2023 26115 (2) by <a href="https://github.com/OlafConijn"><code>@OlafConijn</code></a> in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li> <li>:lock: fix: CVE-2023-26115 by <a href="https://github.com/aashutoshrathi"><code>@aashutoshrathi</code></a> in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li> <li>chore: publish workflow by <a href="https://github.com/OlafConijn"><code>@OlafConijn</code></a> in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/42">jonschlinkert/word-wrap#42</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mohd-akram"><code>@mohd-akram</code></a> made their first contribution in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/24">jonschlinkert/word-wrap#24</a></li> <li><a href="https://github.com/OlafConijn"><code>@OlafConijn</code></a> made their first contribution in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/41">jonschlinkert/word-wrap#41</a></li> <li><a href="https://github.com/aashutoshrathi"><code>@aashutoshrathi</code></a> made their first contribution in <a href="https://redirect.github.com/jonschlinkert/word-wrap/pull/33">jonschlinkert/word-wrap#33</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4">https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/207044ebda1dd3809d15b6000a48409266536771"><code>207044e</code></a> 1.2.5</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/98943154855b0dd79b707462b9202614990c7f61"><code>9894315</code></a> revert default indent</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/f64b188c7261d26b99e1e2075d6b12f21798e83a"><code>f64b188</code></a> run verb to generate README</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/03ea08256ba0c8e8b02b1b304f0f5bd2b1863207"><code>03ea082</code></a> Merge pull request <a href="https://redirect.github.com/jonschlinkert/word-wrap/issues/42">#42</a> from jonschlinkert/chore/publish-workflow</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/420dce9a2412b21881202b73a3c34f0edc53cb2e"><code>420dce9</code></a> Merge pull request <a href="https://redirect.github.com/jonschlinkert/word-wrap/issues/41">#41</a> from jonschlinkert/fix/CVE-2023-26115-2</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/bfa694edf55bb84ff84512f13da6d68bf7593f06"><code>bfa694e</code></a> Update .github/workflows/publish.yml</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/ace0b3c78f81aaf43040bab3bc91d3c5546d3fd2"><code>ace0b3c</code></a> chore: bump version to 1.2.4</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/6fd727594676f3e1b196b08a320908bec2f4ca02"><code>6fd7275</code></a> chore: add publish workflow</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/30d6daf60fce429f5f559252fa86ee78200652c4"><code>30d6daf</code></a> chore: fix test</li> <li><a href="https://github.com/jonschlinkert/word-wrap/commit/655929cabea6299dddf3b4a21fc3713fca701b48"><code>655929c</code></a> chore: remove package-lock</li> <li>Additional commits viewable in <a href="https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=word-wrap&package-manager=npm_and_yarn&previous-version=1.2.3&new-version=1.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/react/network/alerts). </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for c325aec - Browse repository at this point
Copy the full SHA c325aecView commit details -
refactor[react-devtools]: rewrite context menus (facebook#29049)
## Summary - While rolling out RDT 5.2.0 on Fusebox, we've discovered that context menus don't work well with this environment. The reason for it is the context menu state implementation - in a global context we define a map of registered context menus, basically what is shown at the moment (see deleted Contexts.js file). These maps are not invalidated on each re-initialization of DevTools frontend, since the bundle (react-devtools-fusebox module) is not reloaded, and this results into RDT throwing an error that some context menu was already registered. - We should not keep such data in a global state, since there is no guarantee that this will be invalidated with each re-initialization of DevTools (like with browser extension, for example). - The new implementation is based on a `ContextMenuContainer` component, which will add all required `contextmenu` event listeners to the anchor-element. This component will also receive a list of `items` that will be displayed in the shown context menu. - The `ContextMenuContainer` component is also using `useImperativeHandle` hook to extend the instance of the component, so context menus can be managed imperatively via `ref`: `contextMenu.current?.hide()`, for example. - **Changed**: The option for copying value to clipboard is now hidden for functions. The reasons for it are: - It is broken in the current implementation, because we call `JSON.stringify` on the value, see `packages/react-devtools-shared/src/backend/utils.js`. - I don't see any reasonable value in doing this for the user, since `Go to definition` option is available and you can inspect the real code and then copy it. - We already filter out fields from objects, if their value is a function, because the whole object is passed to `JSON.stringify`. ## How did you test this change? ### Works with element props and hooks: - All context menu items work reliably for props items - All context menu items work reliably or hooks items https://github.com/facebook/react/assets/28902667/5e2d58b0-92fa-4624-ad1e-2bbd7f12678f ### Works with timeline profiler: - All context menu items work reliably: copying, zooming, ... - Context menu automatically closes on the scroll event https://github.com/facebook/react/assets/28902667/de744cd0-372a-402a-9fa0-743857048d24 ### Works with Fusebox: - Produces no errors - Copy to clipboard context menu item works reliably https://github.com/facebook/react/assets/28902667/0288f5bf-0d44-435c-8842-6b57bc8a7a24
Configuration menu - View commit details
-
Copy full SHA for d14ce51 - Browse repository at this point
Copy the full SHA d14ce51View commit details -
[Compiler playground] bold changed passes (facebook#29159)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> In the playground, it's hard to see at a glance what compiler passes are involved in introducing changes. This PR bolds every pass that introduces a change. ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. --> Before: <img width="1728" alt="image" src="https://github.com/facebook/react/assets/5144292/803ca786-0726-4456-b0db-520dc90a6771"> After: <img width="1728" alt="image" src="https://github.com/facebook/react/assets/5144292/38885644-00e9-4065-9c44-db533000d13a">
Configuration menu - View commit details
-
Copy full SHA for 57fbe3b - Browse repository at this point
Copy the full SHA 57fbe3bView commit details -
feat(compiler-healthcheck): Support strict mode check for nextjs apps (…
…facebook#29167) ## Summary Closes facebook#29130 ## How did you test this change? Run the healthcheck in the compiler playground and the nodejs.org repo for the next config with a `.mjs` extension. Sanity with Vite React template. Signed-off-by: abizek <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d3ce0d3 - Browse repository at this point
Copy the full SHA d3ce0d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f90365 - Browse repository at this point
Copy the full SHA 6f90365View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf046e8 - Browse repository at this point
Copy the full SHA bf046e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55dd0b1 - Browse repository at this point
Copy the full SHA 55dd0b1View commit details
Commits on May 21, 2024
-
Enable
disableStringRefs
andenableRefAsProp
for React Native (Me……ta) (facebook#29177) ## Summary Enables the `disableStringRefs` and `enableRefAsProp` feature flags for React Native (Meta). ## How did you test this change? ``` $ yarn test $ yarn flow fabric ```
Configuration menu - View commit details
-
Copy full SHA for 7621466 - Browse repository at this point
Copy the full SHA 7621466View commit details -
Fix assertConsoleErrorDev on message mismatch with withoutStack: true (…
…facebook#29198) ## Summary ```js assertConsoleErrorDev([ ['Hello', {withoutStack: true}] ]) ``` now errors with a helpful diff message if the message mismatched. See first commit for previous behavior. ## How did you test this change? - `yarn test --watch packages/internal-test-utils/__tests__/ReactInternalTestUtils-test.js`
Configuration menu - View commit details
-
Copy full SHA for 5cc9f69 - Browse repository at this point
Copy the full SHA 5cc9f69View commit details -
[Flight / Flight Reply] Don't clear pending listeners when entering b…
…locked state (facebook#29201) Fixes facebook#29200 The cyclic state might have added listeners that will still need to be invoked. This happens if we have a cyclic reference AND end up blocked. We have already cleared these before entering the parsing when we enter the CYCLIC state so we they already have the right type. If listeners are added during this phase they should carry over to the blocked state. --------- Co-authored-by: Hendrik Liebau <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8f3c052 - Browse repository at this point
Copy the full SHA 8f3c052View commit details -
[compiler:playground] Wait for build before running playground
Explicitly waits for the build to finish since the playground requires them to run ghstack-source-id: 0bd7d5272d7fa09dc3a140b82a962dc4a3ae585b Pull Request resolved: facebook#29180
Configuration menu - View commit details
-
Copy full SHA for 0a0a5c0 - Browse repository at this point
Copy the full SHA 0a0a5c0View commit details -
[Flight] don't overwrite existing chunk listeners in 'wakeChunkIfInit…
…ialized' (facebook#29204) Follow up to facebook#29201. If a chunk had listeners attached already (e.g. because `.then` was called on the chunk returned from `createFromReadableStream`), `wakeChunkIfInitialized` would overwrite any listeners added during chunk initialization. This caused cyclic [path references](facebook#28996) within that chunk to never resolve. Fixed by merging the two arrays of listeners.
Configuration menu - View commit details
-
Copy full SHA for 9b3f909 - Browse repository at this point
Copy the full SHA 9b3f909View commit details -
[compiler:playground] JS tab is expanded by default
When using the playground you typically want to see what it outputs, so let's make the JS tab expanded by default. ghstack-source-id: 721bc4c381c50db008058b31e1f976e92eab8548 Pull Request resolved: facebook#29203
Configuration menu - View commit details
-
Copy full SHA for b759b71 - Browse repository at this point
Copy the full SHA b759b71View commit details -
[compiler:playground] Update babel.config.js
Use new defaults ghstack-source-id: d2da1df69db9f1b01578af6d52ea4a2613769f9b Pull Request resolved: facebook#29205
Configuration menu - View commit details
-
Copy full SHA for 0f58454 - Browse repository at this point
Copy the full SHA 0f58454View commit details -
[Fiber] render boundary in fallback if it contains a new stylesheet d…
…uring sync update (facebook#28965) Updates Suspensey instances and resources to preload even during urgent updates and to potentially suspend. The current implementation is unchanged for transitions but for sync updates if there is a suspense boundary above the resource/instance it will be rendered in fallback mode instead. Note: This behavior is not what we want for images once we make them suspense enabled. We will need to have forked behavior here to distinguish between stylesheets which should never commit when not loaded and images which should commit after a small delay
Configuration menu - View commit details
-
Copy full SHA for 217b2cc - Browse repository at this point
Copy the full SHA 217b2ccView commit details -
[Flight Reply] retain listeners when resolving models with existing l…
…isteners (facebook#29207) In facebook#29201 a fix was made to ensure we don't "forget" about some listeners when handling cyclic chunks. In facebook#29204 another fix was made for a special case when the chunk already has listeners before it first resolves. This implements the followup fix for Flight Reply which was originally missed in facebook#29204 Co-authored-by: Janka Uryga <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 81c5ff2 - Browse repository at this point
Copy the full SHA 81c5ff2View commit details
Commits on May 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3ac551e - Browse repository at this point
Copy the full SHA 3ac551eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f994737 - Browse repository at this point
Copy the full SHA f994737View commit details -
compiler: Handle TSNonNullAssertion expressions (facebook#29218)
## Summary We ran React compiler against part of our codebase and collected compiler errors. One of the more common non-actionable errors is caused by usage of the `!` TypeScript non-null assertion operation: ``` (BuildHIR::lowerExpression) Handle TSNonNullExpression expressions ``` It seems like React Compiler _should_ be able to support this by just ignoring the syntax and using the underlying expression. I'm sure a lot of our non-null assertion usage should not exist and I understand if React Compiler does not want to support this syntax. It wasn't obvious to me if this omission was intentional or if there are future plans to use `TSNonNullExpression` as part of the compiler's analysis. If there are no future plans it seems like just ignoring it should be fine. ## How did you test this change? ```sh ❯ yarn snap --filter yarn run v1.17.3 $ yarn workspace babel-plugin-react-compiler run snap --filter $ node ../snap/dist/main.js --filter PASS non-null-assertion 1 Tests, 1 Passed, 0 Failed ```
Configuration menu - View commit details
-
Copy full SHA for 4c2e457 - Browse repository at this point
Copy the full SHA 4c2e457View commit details
Commits on May 23, 2024
-
Unify ReactFiberCurrentOwner and ReactCurrentFiber (facebook#29038)
We previously had two slightly different concepts for "current fiber". There's the "owner" which is set inside of class components in prod if string refs are enabled, and sometimes inside function components in DEV but not other contexts. Then we have the "current fiber" which is only set in DEV for various warnings but is enabled in a bunch of contexts. This unifies them into a single "current fiber". The concept of string refs shouldn't really exist so this should really be a DEV only concept. In the meantime, this sets the current fiber inside class render only in prod, however, in DEV it's now enabled in more contexts which can affect the string refs. That was already the case that a string ref in a Function component was only connecting to the owner in prod. Any string ref associated with any non-class won't work regardless so that's not an issue. The practical change here is that an element with a string ref created inside a life-cycle associated with a class will work in DEV but not in prod. Since we need the current fiber to be available in more contexts in DEV for the debugging purposes. That wouldn't affect any old code since it would have a broken ref anyway. New code shouldn't use string refs anyway. The other implication is that "owner" doesn't necessarily mean "rendering" since we need the "owner" to track other debug information like stacks - in other contexts like useEffect, life cycles, etc. Internally we have a separate `isRendering` flag that actually means we're rendering but even that is a very overloaded concept. So anything that uses "owner" to imply rendering might be wrong with this change. This is a first step to a larger refactor for tracking current rendering information. --------- Co-authored-by: Sebastian Silbermann <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2e3e6a9 - Browse repository at this point
Copy the full SHA 2e3e6a9View commit details -
Set the current fiber to the source of the error during error reporti…
…ng (facebook#29044) This lets us expose the component stack to the error reporting that happens here as `console.error` patching. Now if you just call `console.error` in the error handlers it'll get the component stack added to the end by React DevTools. However, unfortunately this happens a little too late so the Fiber will be disconnected with its `.return` pointer set to null already. So it'll be too late to extract a parent component stack from but you can at least get the stack from source to error boundary. To work around this I manually add the parent component stack in our default handlers when owner stacks are off. We could potentially fix this but you can also just include it yourself if you're calling `console.error` and it's not a problem for owner stacks. This is not a problem for owner stacks because we'll still have those and so for those just calling `console.error` just works. However, the main feature is that by letting React add them, we can switch to using native error stacks when available.
Configuration menu - View commit details
-
Copy full SHA for 2e540e2 - Browse repository at this point
Copy the full SHA 2e540e2View commit details -
compiler: fixture for suboptimal jsx sibling memo block merging
React Compiler attempts to merge consecutive reactive scopes in order to reduce overhead. The basic idea is that if two consecutive scopes would always invalidate together then we should merge them. It gets more complicated, though, because values produced by the earlier scope may not always invalidate when their inputs do. For example, a scope that produces `fn(x)` may not invalidate on all changes to `x` if the function is `Math.max(x, 10)` (changing x from 8 to 9 won't change the output). Previously we were conservative and only merged if either: * the two scopes had the same dependencies * the second scope's deps exactly matched the previous scope's outputs. You can see this in the new fixture, where the second `<button>` gets its own scope, which happens because the preceding scope has an extra output that isn't a dep of the `<button>`'s scope. ghstack-source-id: d869c8d4df5aa4105bbdae01b5dd7f106145b351 Pull Request resolved: facebook#29155
Configuration menu - View commit details
-
Copy full SHA for 82a0a5f - Browse repository at this point
Copy the full SHA 82a0a5fView commit details -
compiler: Improve merging of memo scopes that invalidate together
Improves merging of consecutive scopes so that we now merge two scopes if the dependencies of the second scope are a subset of the previous scope's output *and* that dependency has a type that will always produce a new value (array, object, jsx, function) if it is re-evaluated. To make this easier, we extend the set of builtin types to include ones for function expressions and JSX and to infer these types in InferTypes. This allows using the already inferred types in MergeReactiveScopesThatInvalidateTogether. ghstack-source-id: e9119fc4e02b3665848113d71fdff0c5bac3348a Pull Request resolved: facebook#29156
Configuration menu - View commit details
-
Copy full SHA for 890896b - Browse repository at this point
Copy the full SHA 890896bView commit details -
compiler: Use types to decide which scopes are eligible for merging
In MergeReactiveScopesThatInvalidateTogether when deciding which scopes were eligible for mergin at all, we looked specifically at the instructions whose lvalue produces the declaration. So if a scope declaration was `t0`, we'd love for the instruction where `t0` was the lvalue and look at the instruction type to decide if it is eligible for merging. Here, we use the inferred type instead (now that the inferred types support the same set of types of instructions we looked at before). This allows us to find more cases where scopes can be merged. ghstack-source-id: 0e3e05f24ea0ac6e3c43046bc3e114f906747a04 Pull Request resolved: facebook#29157
Configuration menu - View commit details
-
Copy full SHA for b687fd2 - Browse repository at this point
Copy the full SHA b687fd2View commit details -
compiler: repro for unmerged scopes due to intermediates
Repro of a case where we should ideally merge consecutive scopes, but where intermediate temporaries prevent the scopes from merging. We'd need to reorder instructions in order to merge these. ghstack-source-id: 4f05672604eeb547fc6c26ef99db6572843ac646 Pull Request resolved: facebook#29197
Configuration menu - View commit details
-
Copy full SHA for 5fe8c0b - Browse repository at this point
Copy the full SHA 5fe8c0bView commit details -
Move createElement/JSX Warnings into the Renderer (facebook#29088)
This is necessary to simplify the component stack handling to make way for owner stacks. It also solves some hacks that we used to have but don't quite make sense. It also solves the problem where things like key warnings get silenced in RSC because they get deduped. It also surfaces areas where we were missing key warnings to begin with. Almost every type of warning is issued from the renderer. React Elements are really not anything special themselves. They're just lazily invoked functions and its really the renderer that determines there semantics. We have three types of warnings that previously fired in JSX/createElement: - Fragment props validation. - Type validation. - Key warning. It's nice to be able to do some validation in the JSX/createElement because it has a more specific stack frame at the callsite. However, that's the case for every type of component and validation. That's the whole point of enableOwnerStacks. It's also not sufficient to do it in JSX/createElement so we also have validation in the renderers too. So this validation is really just an eager validation but also happens again later. The problem with these is that we don't really know what types are valid until we get to the renderer. Additionally, by placing it in the isomorphic code it becomes harder to do deduping of warnings in a way that makes sense for that renderer. It also means we can't reuse logic for managing stacks etc. Fragment props validation really should just be part of the renderer like any other component type. This also matters once we add Fragment refs and other fragment features. So I moved this into Fiber. However, since some Fragments don't have Fibers, I do the validation in ChildFiber instead of beginWork where it would normally happen. For `type` validation we already do validation when rendering. By leaving it to the renderer we don't have to hard code an extra list. This list also varies by context. E.g. class components aren't allowed in RSC but client references are but we don't have an isomorphic way to identify client references because they're defined by the host config so the current logic is flawed anyway. I kept the early validation for now without the `enableOwnerStacks` since it does provide a nicer stack frame but with that flag on it'll be handled with nice stacks anyway. I normalized some of the errors to ensure tests pass. For `key` validation it's the same principle. The mechanism for the heuristic is still the same - if it passes statically through a parent JSX/createElement call then it's considered validated. We already did print the error later from the renderer so this also disables the early log in the `enableOwnerStacks` flag. I also added logging to Fizz so that key warnings can print in SSR logs. Flight is a bit more complex. For elements that end up on the client we just pass the `validated` flag along to the client and let the client renderer print the error once rendered. For server components we log the error from Flight with the server component as the owner on the stack which will allow us to print the right stack for context. The factoring of this is a little tricky because we only want to warn if it's in an array parent but we want to log the error later to get the right debug info. Fiber/Fizz has a similar factoring problem that causes us to create a fake Fiber for the owner which means the logs won't be associated with the right place in DevTools.
Configuration menu - View commit details
-
Copy full SHA for 84239da - Browse repository at this point
Copy the full SHA 84239daView commit details -
[Fiber] clarify entry condition for suspensey commit recursion (faceb…
…ook#29222) Previously Suspensey recursion would only trigger if the ShouldSuspendCommit flag was true. However there is a dependence on the Visibility flag embedded in this logic because these flags share a bit. To make it clear that the semantics of Suspensey resources require considering both flags I've added it to the condition even though this extra or-ing is a noop when the bit is shared
Configuration menu - View commit details
-
Copy full SHA for f55d172 - Browse repository at this point
Copy the full SHA f55d172View commit details -
Fix async batching in React.startTransition (facebook#29226)
Note: Despite the similar-sounding description, this fix is unrelated to the issue where updates that occur after an `await` in an async action must also be wrapped in their own `startTransition`, due to the absence of an AsyncContext mechanism in browsers today. --- Discovered a flaw in the current implementation of the isomorphic startTransition implementation (React.startTransition), related to async actions. It only creates an async scope if something calls setState within the synchronous part of the action (i.e. before the first `await`). I had thought this was fine because if there's no update during this part, then there's nothing that needs to be entangled. I didn't think this through, though — if there are multiple async updates interleaved throughout the rest of the action, we need the async scope to have already been created so that _those_ are batched together. An even easier way to observe this is to schedule an optimistic update after an `await` — the optimistic update should not be reverted until the async action is complete. To implement, during the reconciler's module initialization, we compose its startTransition implementation with any previous reconciler's startTransition that was already initialized. Then, the isomorphic startTransition is the composition of every reconciler's startTransition. ```js function startTransition(fn) { return startTransitionDOM(() => { return startTransitionART(() => { return startTransitionThreeFiber(() => { // and so on... return fn(); }); }); }); } ``` This is basically how flushSync is implemented, too.
Configuration menu - View commit details
-
Copy full SHA for ee5c194 - Browse repository at this point
Copy the full SHA ee5c194View commit details
Commits on May 24, 2024
-
compiler: distinguish globals/imports/module-locals
We currently use `LoadGlobal` and `StoreGlobal` to represent any read (or write) of a variable defined outside the component or hook that is being compiled. This is mostly fine, but for a lot of things we want to do going forward (resolving types across modules, for example) it helps to understand the actual source of a variable. This PR is an incremental step in that direction. We continue to use LoadGlobal/StoreGlobal, but LoadGlobal now has a `binding:NonLocalBinding` instead of just the name of the global. The NonLocalBinding type tells us whether it was an import (and which kind, the source module name etc), a module-local binding, or a true global. By keeping the LoadGlobal/StoreGlobal instructions, most code that deals with "anything not declared locally" doesn't have to care about the difference. However, code that _does_ want to know the source of the value can figure it out. ghstack-source-id: e701d4ebc0fb5681a0197198ac2c2a03b3e8aae9 Pull Request resolved: facebook#29188
Configuration menu - View commit details
-
Copy full SHA for 5061f31 - Browse repository at this point
Copy the full SHA 5061f31View commit details -
compiler: getGlobalDeclaration() takes a NonLocalBinding
No-op refactor to make Environment#getGlobalDeclaration() take a NonLocalBinding instead of just a name. The idea is that in subsequent PRs we can use information about the binding to resolve a type more accurately. For example, we can resolve `Array` differently if its an import or local and not the global Array. Similar for resolving local `useState` differently than the one from React. ghstack-source-id: c8063e6fb8acdd347a56477d6b06238dd54979b1 Pull Request resolved: facebook#29189
Configuration menu - View commit details
-
Copy full SHA for 788ed90 - Browse repository at this point
Copy the full SHA 788ed90View commit details -
compiler: only resolve globals and react imports
Updates Environment#getGlobalDeclaration() to only resolve "globals" if they are a true global or an import from react/react-dom. We still keep the logic to resolve hook-like names as custom hooks. Notably, this means that a local `Array` reference won't get confused with our Array global declaration, a local `useState` (or import from something other than React) won't get confused as `React.useState()`, etc. I tried to write a proper fixture test to test that we react to changes to a custom setState setter function, but I think there may be an issue with snap and how it handles re-renders from effects. I think the tests are good here but open to feedback if we want to go down the rabbit hole of figuring out a proper snap test for this. ghstack-source-id: 5e9a8f6e0d23659c72a9d041e8d394b83d6e526d Pull Request resolved: facebook#29190
Configuration menu - View commit details
-
Copy full SHA for 935180c - Browse repository at this point
Copy the full SHA 935180cView commit details
Commits on May 25, 2024
-
[Fiber] Use Owner/JSX Stack When Appending Stacks to Console (faceboo…
…k#29206) This one should be fully behind the `enableOwnerStacks` flag. Instead of printing the parent Component stack all the way to the root, this now prints the owner stack of every JSX callsite. It also includes intermediate callsites between the Component and the JSX call so it has potentially more frames. Mainly it provides the line number of the JSX callsite. In terms of the number of components is a subset of the parent component stack so it's less information in that regard. This is usually better since it's more focused on components that might affect the output but if it's contextual based on rendering it's still good to have parent stack. Therefore, I still use the parent stack when printing DOM nesting warnings but I plan on switching that format to a diff view format instead (Next.js already reformats the parent stack like this). __Follow ups__ - Server Components show up in the owner stack for client logs but logs done by Server Components don't yet get their owner stack printed as they're replayed. They're also not yet printed in the server logs of the RSC server. - Server Component stack frames are formatted as the server and added to the end but this might be a different format than the browser. E.g. if server is running V8 and browser is running JSC or vice versa. Ideally we can reformat them in terms of the client formatting. - This doesn't yet update Fizz or DevTools. Those will be follow ups. Fizz still prints parent stacks in the server side logs. The stacks added to user space `console.error` calls by DevTools still get the parent stacks instead. - It also doesn't yet expose these to user space so there's no way to get them inside `onCaughtError` for example or inside a custom `console.error` override. - In another follow up I'll use `console.createTask` instead and completely remove these stacks if it's available.
Configuration menu - View commit details
-
Copy full SHA for d6cfa0f - Browse repository at this point
Copy the full SHA d6cfa0fView commit details -
[Fiber] Replace setCurrentDebugFiberInDEV with runWithFiberInDEV (fac…
…ebook#29221) Stacked on facebook#29044. To work with `console.createTask(...).run(...)` we need to be able to run a function in the scope of the task. The main concern with this, other than general performance, is that it might add more stack frames on very deep stacks that hit the stack limit. Such as with the commit phase where we recursively go down the tree. These callbacks aren't really necessary in the recursive part but only in the shallow invocation of the commit phase for each tag. So we could refactor the commit phase so that only the shallow part at each level is covered this way.
Configuration menu - View commit details
-
Copy full SHA for b078c81 - Browse repository at this point
Copy the full SHA b078c81View commit details
Commits on May 26, 2024
-
[Fiber] Enable Native console.createTask Stacks When Available (faceb…
…ook#29223) Stacked on facebook#29206 and facebook#29221. This disables appending owner stacks to console when `console.createTask` is available in the environment. Instead we rely on native "async" stacks that end up looking like this with source maps and ignore list enabled. <img width="673" alt="Screenshot 2024-05-22 at 4 00 27 PM" src="https://github.com/facebook/react/assets/63648/5313ed53-b298-4386-8f76-8eb85bdfbbc7"> Unfortunately Chrome requires a string name for each async stack and, worse, a suffix of `(async)` is automatically added which is very confusing since it seems like it might be an async component or something which it is not. In this case it's not so bad because it's nice to refer to the host component which otherwise doesn't have a stack frame since it's internal. However, if there were more owners here there would also be a `<Counter> (async)` which ends up being kind of duplicative. If the Chrome DevTools is not open from the start of the app, then `console.createTask` is disabled and so you lose the stack for those errors (or those parents if the devtools is opened later). Unlike our appended ones that are always added. That's unfortunate and likely to be a bit of a DX issue but it's also nice that it saves on perf in DEV mode for those cases. Framework dialogs can still surface the stack since we also track it in user space in parallel. This currently doesn't track Server Components yet. We need a more clever hack for that part in a follow up. I think I probably need to also add something to React DevTools to disable its stacks for this case too. Since it looks for stacks in the console.error and adds a stack otherwise. Since we don't add them anymore from the runtime, the DevTools adds them instead.
Configuration menu - View commit details
-
Copy full SHA for ea6e059 - Browse repository at this point
Copy the full SHA ea6e059View commit details
Commits on May 28, 2024
-
cleanup[react-devtools]: remove unused supportsProfiling flag from st…
…ore config (facebook#29193) Looks like this is unused
Configuration menu - View commit details
-
Copy full SHA for 6f23540 - Browse repository at this point
Copy the full SHA 6f23540View commit details -
Repro function expr hoisting (facebook#29615)
Modified version of @mofeiZ's facebook#29232 with CI passing (had to run prettier) --------- Co-authored-by: Mofei Zhang <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4ec6a6f - Browse repository at this point
Copy the full SHA 4ec6a6fView commit details -
Throw if React and React DOM versions don't match (facebook#29236)
Throw an error during module initialization if the version of the "react-dom" package does not match the version of "react". We used to be more relaxed about this, because the "react" package changed so infrequently. However, we now have many more features that rely on an internal protocol between the two packages, including Hooks, Float, and the compiler runtime. So it's important that both packages are versioned in lockstep. Before this change, a version mismatch would often result in a cryptic internal error with no indication of the root cause. Instead, we will now compare the versions during module initialization and immediately throw an error to catch mistakes as early as possible and provide a clear error message.
Configuration menu - View commit details
-
Copy full SHA for 681a4aa - Browse repository at this point
Copy the full SHA 681a4aaView commit details -
Clean up disableDOMTestUtils (facebook#29610)
`disableDOMTestUtils` and the FB build `ReactTestUtilsFB` allowed us to finish migrating internal callsites off of ReactTestUtils. Now that usage is cleaned up, we can remove the flag, build artifact, and test coverage for the deprecated utility methods.
Configuration menu - View commit details
-
Copy full SHA for 2787eeb - Browse repository at this point
Copy the full SHA 2787eebView commit details -
Fix: Use action implementation at time of dispatch (facebook#29618)
Fixes the behavior of actions that are queued by useActionState to use the action function that was current at the time it was dispatched, not at the time it eventually executes. The conceptual model is that the action is immediately dispatched, as if it were sent to a remote server/worker. It's the remote worker that maintains the queue, not the client. This is another property of actions makes them more like event handlers than like reducers.
Configuration menu - View commit details
-
Copy full SHA for 1631227 - Browse repository at this point
Copy the full SHA 1631227View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97722ca - Browse repository at this point
Copy the full SHA 97722caView commit details -
compiler: error on reassigning to const
We currently don't report an error if the code attempts to reassign a const. Our thinking has been that we're not trying to catch all possible mistakes you could make in JavaScript — that's what ESLint, TypeScript, and Flow are for — and that we want to focus on React errors. However, accidentally reassigning a const is easy to catch and doesn't get in the way of other analysis so let's implement it. Note that React Compiler's ESLint plugin won't report these errors by default, but they will show up in playground. Fixes facebook#29598 ghstack-source-id: a0af8b9a486d74a8991413322efddc3e3028c755 Pull Request resolved: facebook#29619
Configuration menu - View commit details
-
Copy full SHA for 4633972 - Browse repository at this point
Copy the full SHA 4633972View commit details -
compiler: fix for calls on builtin jsx/function types
When I added new builtin types for jsx and functions, i forget to add a shape definition. This meant that attempting to accesss a property or method on these types would cause an internal error with an unresolved shape. That wasn't obvious because we rarely call methods on these types. I confirmed that the new fixtures here fail without the fix. ghstack-source-id: aa8f8d75a302bb5bac126d3e963594545e71ec74 Pull Request resolved: facebook#29624
Configuration menu - View commit details
-
Copy full SHA for bd4bb32 - Browse repository at this point
Copy the full SHA bd4bb32View commit details -
[Flight] Check if a return value is a client reference before introsp…
…ecting (facebook#29611) This didn't actually fail before but I'm just adding an extra check. Currently Client References are always "function" proxies so they never fall into this branch. However, we do in theory support objects as client references too depending on environment. We have checks elsewhere. So this just makes that consistent.
Configuration menu - View commit details
-
Copy full SHA for 1816476 - Browse repository at this point
Copy the full SHA 1816476View commit details -
feat(compiler): Implement constant string concat propagation (faceboo…
…k#29621) ## Summary Resolves facebook#29617 ## How did you test this change? I verified the implementation using the test.
Configuration menu - View commit details
-
Copy full SHA for a9a0106 - Browse repository at this point
Copy the full SHA a9a0106View commit details
Commits on May 29, 2024
-
Our prettier setup is all messed up after the merge, so this PR should fix things ghstack-source-id: f825460ea6637138db6ba08fd6136fac3f7aa001 Pull Request resolved: facebook#29213
Configuration menu - View commit details
-
Copy full SHA for 61aa159 - Browse repository at this point
Copy the full SHA 61aa159View commit details -
[compiler] Run prettier, fix snap
After this is merged, I'll add it to .git-blame-ignore-revs. I can't do it now as the hash will change after ghstack lands this stack. ghstack-source-id: 054ca869b7839c589524c47d1962262f6b50f8ed Pull Request resolved: facebook#29214
Configuration menu - View commit details
-
Copy full SHA for c998bb1 - Browse repository at this point
Copy the full SHA c998bb1View commit details -
[compiler:babel] Don't read config files when not running as part of
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes facebook#29135 ghstack-source-id: d6fdc43c5c9107645f36718203873aa3f6228475 Pull Request resolved: facebook#29211
Configuration menu - View commit details
-
Copy full SHA for 9d530e9 - Browse repository at this point
Copy the full SHA 9d530e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81c3775 - Browse repository at this point
Copy the full SHA 81c3775View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84c47b3 - Browse repository at this point
Copy the full SHA 84c47b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd30dc3 - Browse repository at this point
Copy the full SHA bd30dc3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b44263a - Browse repository at this point
Copy the full SHA b44263aView commit details -
Fix "findNodeHandle inside its render()" False Positive Warning (face…
…book#29627) This was missed in facebook#29038 when unifying the "owner" abstractions, causing `findNodeHandle` to warn even outside of `render()` invocations.
Configuration menu - View commit details
-
Copy full SHA for 3b29ed1 - Browse repository at this point
Copy the full SHA 3b29ed1View commit details -
- Moves the file as it needs to be in root git directory - Removes now unreachable commits due to repo merge - Add run prettier commit c998bb1 to ignored revs ghstack-source-id: d9dfa7099fbc7782fbce600af4caafd405c196cb Pull Request resolved: facebook#29630
Configuration menu - View commit details
-
Copy full SHA for e2e12f3 - Browse repository at this point
Copy the full SHA e2e12f3View commit details -
compiler: Allow global mutation in jsx props
Fixes https://x.com/raibima/status/1794395807216738792 The issue is that if you pass a global-modifying function as prop to JSX, we currently report that it's invalid to modify a global during rendering. The problem is that we don't really know when/if the child component will actually call that function prop. It would be against the rules to call the function during render, but it's totally fine to call it during an event handler or from a useEffect. Since we don't know at the call-site how the child will use the function, we should allow such calls. In the future we could improve this in a few ways: * For all functions that modify globals, codegen an assertion or warning into the function that fires if it's called "during render". We'd have to precisely define what "during render" is, but this would at least help developers catch this dynamically. * Use the type system to distinguish "event/effect" and "render" functions to help developers avoid accidentally mutating globals during render. ghstack-source-id: 4aba4e6d214fd6c062e4029294efe9b8fe25cd83 Pull Request resolved: facebook#29591
Configuration menu - View commit details
-
Copy full SHA for 49ed6f0 - Browse repository at this point
Copy the full SHA 49ed6f0View commit details -
compiler: Add todo for getter/setter syntax
We were missing a check that ObjectMethods are not getters or setters. In our experience this is pretty rare within React components and hooks themselves, so let's start with a todo. Closes facebook#29586 ghstack-source-id: 03c6cce9a9368a4a4f4ba98bcdff3fa4729ceaf9 Pull Request resolved: facebook#29592
Configuration menu - View commit details
-
Copy full SHA for c272789 - Browse repository at this point
Copy the full SHA c272789View commit details -
compiler: fixtures for fast-refresh mode (w todos)
ghstack-source-id: 65dd14fe9b37328bd60fe791b23dde54da10b285 Pull Request resolved: facebook#29175
Configuration menu - View commit details
-
Copy full SHA for afb2c39 - Browse repository at this point
Copy the full SHA afb2c39View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38e3b23 - Browse repository at this point
Copy the full SHA 38e3b23View commit details -
feat(compiler): Compiler Logical Negation Constant Propagation (faceb…
…ook#29623) ## Summary Resolves facebook#29622 ## How did you test this change? I verified the implementation using the test. Note: This PR was done without waiting for approval in facebook#29622, so feel free to just close it.
Configuration menu - View commit details
-
Copy full SHA for 320da67 - Browse repository at this point
Copy the full SHA 320da67View commit details -
compiler: ValidateNoRefInRender detects writes of refs
Improves ValidateNoRefAccessInRender, detecting modifications of refs during render. Fixes facebook#29161 ghstack-source-id: 99078b3cea5b2d9019dbf77ede9c2e4cd9fbfd27 Pull Request resolved: facebook#29170
Configuration menu - View commit details
-
Copy full SHA for 867edc6 - Browse repository at this point
Copy the full SHA 867edc6View commit details -
feat(compiler): Implement constant folding for more binary expressions (
facebook#29650) ## Summary There are already most arithmetic operators in constant propagation: `+`, `-`, `*`, `/`. We could add more, namely: `|`, `&`, `^`, `<<`, `>>`, `>>>` and `%`: Input: ```js function f() { return [ 123.45 | 0, 123.45 & 0, 123.45 ^ 0, 123 << 0, 123 >> 0, 123 >>> 0, 123.45 | 1, 123.45 & 1, 123.45 ^ 1, 123 << 1, 123 >> 1, 123 >>> 1, 3 ** 2, 3 ** 2.5, 3.5 ** 2, 2 ** 3 ** 0.5, 4 % 2, 4 % 2.5, 4 % 3, 4.5 % 2, ]; } ``` Output: ```js function f() { return [ 123, 0, 123, 123, 123, 123, 123, 1, 122, 246, 61, 61, 9, 15.588457268119896, 12.25, 3.3219970854839125, 0, 1.5, 1, 0.5, ]; } ``` Resolves facebook#29649 ## How did you test this change? See tests. Note: This PR was done without waiting for approval in facebook#29649, so feel free to just close it without any comment.
Configuration menu - View commit details
-
Copy full SHA for c2b45ef - Browse repository at this point
Copy the full SHA c2b45efView commit details
Commits on May 30, 2024
-
Add tests for ReactNativeAttributePayloadFabric.js (facebook#29608)
## Summary This PR add tests for `ReactNativeAttributePayloadFabric.js`. It introduces `ReactNativeAttributePayloadFabric-test.internal.js`, which is a copy-paste of `ReactNativeAttributePayload-test.internal.js`. On top of that, there is a bunch of new test cases for the `ReactNativeAttributePayloadFabric.create` function. ## How did you test this change? ``` yarn test packages/react-native-renderer ```
Configuration menu - View commit details
-
Copy full SHA for 51dd096 - Browse repository at this point
Copy the full SHA 51dd096View commit details -
Fix
key
Warning for Flattened Positional Children (facebook#29662)## Summary facebook#29088 introduced a regression triggering this warning when rendering flattened positional children: > Each child in a list should have a unique "key" prop. The specific scenario that triggers this is when rendering multiple positional children (which do not require unique `key` props) after flattening them with one of the `React.Children` utilities (e.g. `React.Children.toArray`). The refactored logic in `React.Children` incorrectly drops the `element._store.validated` property in `__DEV__`. This diff fixes the bug and introduces a unit test to prevent future regressions. ## How did you test this change? ``` $ yarn test ReactChildren-test.js ```
Configuration menu - View commit details
-
Copy full SHA for 72644ef - Browse repository at this point
Copy the full SHA 72644efView commit details -
Revert Build Versions from Content Hash to Commit Hash (facebook#29663)
facebook#29236 caused issues for internal syncs at Meta, because we were computing version numbers using file hashes (to eliminate "no-op" internal sync commits). The problem is that since version numbers may not be consistent across synced files (e.g. if some files have not changed in recent commits), the newly introduced version mismatch check fails. There's some more work that needs to be done here to restore the benefits of file-specific hashing, but for now this simply reverts the content hash changes from the following PRs: - facebook#28633 (95319ab) - facebook#28590 (37676ab) - facebook#28582 (cb076b5) - facebook#26734 (5dd90c5) - facebook#26331 (3cad3a5)
Configuration menu - View commit details
-
Copy full SHA for 5bd4031 - Browse repository at this point
Copy the full SHA 5bd4031View commit details -
fix[ReactDebugHooks/find-primitive-index]: remove some assumptions (f…
…acebook#29652) Partially reverts facebook#28593. While rolling out RDT 5.2.0, I've observed some issues on React Native side: hooks inspection for some complex hook trees, like in AnimatedView, were broken. After some debugging, I've noticed a difference between what is in frame's source. The difference is in the top-most frame, where with V8 it will correctly pick up the `Type` as `Proxy` in `hookStack`, but for Hermes it will be `Object`. This means that for React Native this top most frame is skipped, since sources are identical. Here I am reverting back to the previous logic, where we check each frame if its a part of the wrapper, but also updated `isReactWrapper` function to have an explicit case for `useFormStatus` support.
Configuration menu - View commit details
-
Copy full SHA for fb61a1b - Browse repository at this point
Copy the full SHA fb61a1bView commit details -
[Flight] Eval Fake Server Component Functions to Recreate Native Stac…
…ks (facebook#29632) We have three kinds of stacks that we send in the RSC protocol: - The stack trace where a replayed `console.log` was called on the server. - The JSX callsite that created a Server Component which then later called another component. - The JSX callsite that created a Host or Client Component. These stack frames disappear in native stacks on the client since they're executed on the server. This evals a fake file which only has one call in it on the same line/column as the server. Then we call through these fake modules to "replay" the callstack. We then replay the `console.log` within this stack, or call `console.createTask` in this stack to recreate the stack. The main concern with this approach is the performance. It adds significant cost to create all these eval:ed functions but it should eventually balance out. This doesn't yet apply source maps to these. With source maps it'll be able to show the server source code when clicking the links. I don't love how these appear. - Because we haven't yet initialized the client module we don't have the name of the client component we're about to render yet which leads to the `<...>` task name. - The `(async)` suffix Chrome adds is still a problem. - The VMxxxx prefix is used to disambiguate which is noisy. Might be helped by source maps. - The continuation of the async stacks end up rooted somewhere in the bootstrapping of the app. This might be ok when the bootstrapping ends up ignore listed but it's kind of a problem that you can't clear the async stack. <img width="927" alt="Screenshot 2024-05-28 at 11 58 56 PM" src="https://github.com/facebook/react/assets/63648/1c9d32ce-e671-47c8-9d18-9fab3bffabd0"> <img width="431" alt="Screenshot 2024-05-28 at 11 58 07 PM" src="https://github.com/facebook/react/assets/63648/52f57518-bbed-400e-952d-6650835ac6b6"> <img width="327" alt="Screenshot 2024-05-28 at 11 58 31 PM" src="https://github.com/facebook/react/assets/63648/d311a639-79a1-457f-9a46-4f3298d07e65"> <img width="817" alt="Screenshot 2024-05-28 at 11 59 12 PM" src="https://github.com/facebook/react/assets/63648/3aefd356-acf4-4daa-bdbf-b8c8345f6d4b">
Configuration menu - View commit details
-
Copy full SHA for 9d4fba0 - Browse repository at this point
Copy the full SHA 9d4fba0View commit details -
[Flight] Try/Catch Eval (facebook#29671)
Follow up to facebook#29632. It's possible for `eval` to throw such as if we're in a CSP environment. This is non-essential debug information. We can still proceed to create a fake stack entry. It'll still have the right name. It just won't have the right line/col number nor source url/source map. It might also be ignored listed since it's inside Flight.
Configuration menu - View commit details
-
Copy full SHA for 9710853 - Browse repository at this point
Copy the full SHA 9710853View commit details -
Add react-easy-state to list of known incompatible libraries. (facebo…
…ok#29661) Like mobx, this library depends on mutating a Proxied store and breaks reference equality checks.
Configuration menu - View commit details
-
Copy full SHA for aa3d6c0 - Browse repository at this point
Copy the full SHA aa3d6c0View commit details
Commits on May 31, 2024
-
Fix Missing
key
Validation inReact.Children
(facebook#29675)## Summary In facebook#29088, the validation logic for `React.Children` inspected whether `mappedChild` — the return value of the map callback — has a valid `key`. However, this deviates from existing behavior which only warns if the original `child` is missing a required `key`. This fixes false positive `key` validation warnings when using `React.Children`, by validating the original `child` instead of `mappedChild`. This is a more general fix that expands upon my previous fix in facebook#29662. ## How did you test this change? ``` $ yarn test ReactChildren-test.js ```
Configuration menu - View commit details
-
Copy full SHA for 8fd963a - Browse repository at this point
Copy the full SHA 8fd963aView commit details -
Use both displayName and name in forwardRef/memo (facebook#29625)
When defining a displayName on forwardRef/memo we forward that name to the inner function. We used to use displayName for this but in facebook#29206 I switched this to use `"name"`. That's because V8 doesn't use displayName, it only uses the overridden name in stack traces. This is the only thing covered by our tests for component stacks. However, I realized that Safari only uses displayName and not the name. So this sets both.
Configuration menu - View commit details
-
Copy full SHA for 63d673c - Browse repository at this point
Copy the full SHA 63d673cView commit details -
Don't allow blank issues (facebook#29691)
We're getting a ton of issues filed using the blank template, for example these airline support tickets: https://github.com/facebook/react/issues/29678 I think someone somewhere is linking to our issues with pre-filled content. This fixes it by forcing a template to be used.
Configuration menu - View commit details
-
Copy full SHA for 6d3110b - Browse repository at this point
Copy the full SHA 6d3110bView commit details -
Create a root task for every Flight response (facebook#29673)
This lets any element created from the server, to bottom out with a client "owner" which is the creator of the Flight request. This could be a Server Action being invoked or a router. This is similar to how a client element bottoms out in the creator of the root element without an owner. E.g. where the root app element was created. Without this, we inherit the task of whatever is currently executing when we're parsing which can be misleading. Before: <img width="507" alt="Screenshot 2024-05-30 at 12 06 57 PM" src="https://github.com/facebook/react/assets/63648/e234db7e-67f7-404c-958a-5c5500ffdf1f"> After: <img width="555" alt="Screenshot 2024-05-30 at 4 59 04 PM" src="https://github.com/facebook/react/assets/63648/8ba6acb4-2ffd-49d4-bd44-08228ad4200e"> The before/after doesn't show much of a difference here but that's just because our Flight parsing loop is an async, which maybe it shouldn't be because it can be unnecessarily deep, and it creates a hidden line for every loop. That's what the `Promise.then` is. If the element is lazily initialized it's worse because we can end up in an unrelated render task as the owner - although that's its own problem.
Configuration menu - View commit details
-
Copy full SHA for 8bc81ca - Browse repository at this point
Copy the full SHA 8bc81caView commit details -
[compiler] Option for preserving calls to useMemo/useCallback
Summary: This adds a compiler option to not drop existing manual memoization and leaving useMemo/useCallback in the generated source. Why do we need this, given that we also have options to validate or ensure that existing memoization is preserved? It's because later diffs on this stack are designed to alter the behavior of the memoization that the compiler emits, in order to detect rules of react violations and debug issues. We don't want to change the behavior of user-level memoization, however, since doing so would be altering the semantics of the user's program in an unacceptable way. ghstack-source-id: 89dccdec9ccb4306b16e849e9fa2170bb5dd021f Pull Request resolved: facebook#29654
Configuration menu - View commit details
-
Copy full SHA for 28fe581 - Browse repository at this point
Copy the full SHA 28fe581View commit details -
[compiler] Option to always take the non-memo branch
Summary: This adds a debugging mode to the compiler that simply adds a `|| true` to the guard on all memoization blocks, which results in the generated code never using memoized values and always recomputing them. This is designed as a validation tool for the compiler's correctness--every program *should* behave exactly the same with this option enabled as it would with it disabled, and so any difference in behavior should be investigated as either a compiler bug or a pipeline issue. (We add `|| true` rather than dropping the conditional block entirely because we still want to exercise the guard tests, in case the guards themselves are the source of an error, like reading a property from undefined in a guard.) ghstack-source-id: 955a47ec1689842da82552225a19a1008c57fe2c Pull Request resolved: facebook#29655
Configuration menu - View commit details
-
Copy full SHA for 8b01a2e - Browse repository at this point
Copy the full SHA 8b01a2eView commit details -
[compiler] Debug tool to emit change detection code rather than memoi…
…zation Summary: The essential assumption of the compiler is that if the inputs to a computation have not changed, then the output should not change either--computation that the compiler optimizes is idempotent. This is, of course, known to be false in practice, because this property rests on requirements (the Rules of React) that are loosely enforced at best. When rolling out the compiler to a codebase that might have rules of react violations, how should developers debug any issues that arise? This diff attempts one approach to that: when the option is set, rather than simply skipping computation when dependencies haven't changed, we will *still perform the computation*, but will then use a runtime function to compare the original value and the resultant value. The runtime function can be customized, but the idea is that it will perform a structural equality check on the values, and if the values aren't structurally equal, we can report an error, including information about what file and what variable was to blame. This assists in debugging by narrowing down what specific computation is responsible for a difference in behavior between the uncompiled code and the program after compilation. ghstack-source-id: 50dad3dacfc7fef74be350431aa2ebf5e9cb0031 Pull Request resolved: facebook#29656
Configuration menu - View commit details
-
Copy full SHA for 5c420e3 - Browse repository at this point
Copy the full SHA 5c420e3View commit details -
[compiler] Prune dependencies that are only used by useRef or useState
Summary: jmbrown215 recently had an observation that the arguments to useState/useRef are only used when a component renders for the first time, and never afterwards. We can skip more computation that we previously could, with reactive blocks that previously recomputed values when inputs changed now only ever computing them on the first render. ghstack-source-id: 5d044ef787a7da901c70990f4399aa90c9b96802 Pull Request resolved: facebook#29653
Configuration menu - View commit details
-
Copy full SHA for c69211a - Browse repository at this point
Copy the full SHA c69211aView commit details -
[compiler] Recompute values every time
Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render. The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables. ghstack-source-id: d0f11a4cb2a612cbffdfdcaa9e75efbd6e38019f Pull Request resolved: facebook#29657
Configuration menu - View commit details
-
Copy full SHA for 522d22f - Browse repository at this point
Copy the full SHA 522d22fView commit details -
[compiler] rfc: Include location information in identifiers and react…
…ive scopes for debugging Summary: Using the change detection code to debug codebases that violate the rules of react is a lot easier when we have a source location corresponding to the value that has changed inappropriately. I didn't see an easy way to track that information in the existing data structures at the point of codegen, so this PR adds locations to identifiers and reactive scopes (the location of a reactive scope is the range of the locations of its included identifiers). I'm interested if there's a better way to do this that I missed! ghstack-source-id: aed5f7eddae7256f41da4389e8f16fcb3daaee49 Pull Request resolved: facebook#29658
Configuration menu - View commit details
-
Copy full SHA for ec6fe57 - Browse repository at this point
Copy the full SHA ec6fe57View commit details -
Fix:
useTransition
afteruse
gets stuck in pending state (faceboo……k#29670) When a component suspends with `use`, we switch to the "re-render" dispatcher during the subsequent render attempt, so that we can reuse the work from the initial attempt. However, once we run out of hooks from the previous attempt, we should switch back to the regular "update" dispatcher. This is conceptually the same fix as the one introduced in facebook#26232. That fix only accounted for initial mount, but the useTransition regression test added in f829733 illustrates that we need to handle updates, too. The issue affects more than just useTransition but because most of the behavior between the "re-render" and "update" dispatchers is the same it's hard to contrive other scenarios in a test, which is probably why it took so long for someone to notice. Closes facebook#28923 and facebook#29209 --------- Co-authored-by: eps1lon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for adbec0c - Browse repository at this point
Copy the full SHA adbec0cView commit details -
[compiler:eslint] Don't crash if hermes parser fails to parse
Eslint rules should never throw, so if we fail to parse with Babel or Hermes, we should just ignore the error. This should fix issues such as trying to run the eslint rule on non tsx|ts|jsx|js files, Hermes parser not supporting certain JS syntax, etc. I didn't add a test for this as our eslint-rule-tester config uses hermes-eslint parser, so it wasn't possible to add a top level await as it would crash hermes-eslint before our rule was triggered. Similarly I couldn't add a test for non-JS files as it would not be parseable by hermes-eslint. Fixes facebook#29107 ghstack-source-id: 60afcdb89ab4a8d2e4697cc50c5490803e7cbeac Pull Request resolved: facebook#29631
Configuration menu - View commit details
-
Copy full SHA for 113c8e7 - Browse repository at this point
Copy the full SHA 113c8e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for b17016c - Browse repository at this point
Copy the full SHA b17016cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c6b651b - Browse repository at this point
Copy the full SHA c6b651bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d77dd31 - Browse repository at this point
Copy the full SHA d77dd31View commit details
Commits on Jun 3, 2024
-
[Flight] Add findSourceMapURL option to get a URL to load Server sour…
…ce maps from (facebook#29708) This lets you click a stack frame on the client and see the Server source code inline. <img width="871" alt="Screenshot 2024-06-01 at 11 44 24 PM" src="https://github.com/facebook/react/assets/63648/581281ce-0dce-40c0-a084-4a6d53ba1682"> <img width="840" alt="Screenshot 2024-06-01 at 11 43 37 PM" src="https://github.com/facebook/react/assets/63648/00dc77af-07c1-4389-9ae0-cf1f45199efb"> We could do some logic on the server that sends a source map url for every stack frame in the RSC payload. That would make the client potentially config free. However regardless we need the config to describe what url scheme to use since that’s not built in to the bundler config. In practice you likely have a common pattern for your source maps so no need to send data over and over when we can just have a simple function configured on the client. The server must return a source map, even if the file is not actually compiled since the fake file is still compiled. The source mapping strategy can be one of two models depending on if the server’s stack traces (`new Error().stack`) are source mapped back to the original (`—enable-source-maps`) or represents the location in compiled code (like in the browser). If it represents the location in compiled code it’s actually easier. You just serve the source map generated for that file by the tooling. If it is already source mapped it has to generate a source map where everything points to the same location (as if not compiled) ideally with a segment per logical ast node.
Configuration menu - View commit details
-
Copy full SHA for ba099e4 - Browse repository at this point
Copy the full SHA ba099e4View commit details -
Skip empty sync commits (both repos) (facebook#29707)
Requires facebook#29706 The strategy here is to: - Checkout the builds/facebook-www branch - Read the current sync'd VERSION - Checkout out main and sync new build - sed/{new version string}/{old version string} - Run git status, skip sync if clean - Otherwise, sed/{old version string}/{new version string} and push commit This means that: - We're using the real version strings from the builds - We are checking the last commit on the branch for the real last version - We're skipping any commits that won't result in changes - ??? - Profit!
Configuration menu - View commit details
-
Copy full SHA for 5ad2c37 - Browse repository at this point
Copy the full SHA 5ad2c37View commit details -
Configuration menu - View commit details
-
Copy full SHA for b421783 - Browse repository at this point
Copy the full SHA b421783View commit details -
[Fiber][Float] Error when a host fiber changes "flavor" (facebook#29693)
Host Components can exist as four semantic types 1. regular Components (Vanilla obv) 2. singleton Components 2. hoistable components 3. resources Each of these component types have their own rules related to mounting and reconciliation however they are not direclty modeled as their own unique fiber type. This is partly for code size but also because reconciling the inner type of these components would be in a very hot path in fiber creation and reconciliation and it's just not practical to do this logic check here. Right now we have three Fiber types used to implement these 4 concepts but we probably need to reconsider the model and think of Host Components as a single fiber type with an inner implementation. Once we do this we can regularize things like transitioning between a resource and a regular component or a singleton and a hoistable instance. The cases where these transitions happen today aren't particularly common but they can be observed and currently the handling of these transitions is incomplete at best and buggy at worst. The most egregious case is the link type. This can be a regular component (stylesheet without precedence) a hoistable component (non stylesheet link tags) or a resource (stylesheet with a precedence) and if you have a single jsx slot that tries to reconcile transitions between these types it just doesn't work well. This commit adds an error for when a Hoistable goes from Instance to Resource. Currently this is only possible for `<link>` elements going to and from stylesheets with precedence. Hopefully we'll be able to remove this error and implement as an inner type before we encounter new categories for the Hoistable types detecting type shifting to and from regular components is harder to do efficiently because we don't want to reevaluate the type on every update for host components which is currently not required and would add overhead to a very hot path singletons can't really type shift in their one practical implementation (DOM) so they are only a problem in theroy not practice
Configuration menu - View commit details
-
Copy full SHA for 47d0c30 - Browse repository at this point
Copy the full SHA 47d0c30View commit details -
Configuration menu - View commit details
-
Copy full SHA for def67b9 - Browse repository at this point
Copy the full SHA def67b9View commit details -
useActionState: Transfer transition context (facebook#29694)
Mini-refactor of useActionState to only wrap the action in a transition context if the dispatch is called during a transition. Conceptually, the action starts as soon as the dispatch is called, even if the action is queued until earlier ones finish. We will also warn if an async action is dispatched outside of a transition, since that is almost certainly a mistake. Ideally we would automatically upgrade these to a transition, but we don't have a great way to tell if the action is async until after it's already run.
Configuration menu - View commit details
-
Copy full SHA for 67b05be - Browse repository at this point
Copy the full SHA 67b05beView commit details -
useActionState: On error, cancel remaining actions (facebook#29695)
Based on - facebook#29694 --- If an action in the useActionState queue errors, we shouldn't run any subsequent actions. The contract of useActionState is that the actions run in sequence, and that one action can assume that all previous actions have completed successfully. For example, in a shopping cart UI, you might dispatch an "Add to cart" action followed by a "Checkout" action. If the "Add to cart" action errors, the "Checkout" action should not run. An implication of this change is that once useActionState falls into an error state, the only way to recover is to reset the component tree, i.e. by unmounting and remounting. The way to customize the error handling behavior is to wrap the action body in a try/catch.
Configuration menu - View commit details
-
Copy full SHA for 9598c41 - Browse repository at this point
Copy the full SHA 9598c41View commit details -
Update build script to automatically generate RCs (facebook#29736)
RC releases are a special kind of prerelease build because unlike canaries we shouldn't publish new RCs from any commit on `main`, only when we intentionally bump the RC number. But they are still prerelases — like canary and experimental releases, they should use exact version numbers in their dependencies (no ^). We only need to generate these builds during the RC phase, i.e. when the canary channel label is set to "rc". Example of resulting package.json output: ```json { "name": "react-dom", "version": "19.0.0-rc.0", "dependencies": { "scheduler": "0.25.0-rc.0" }, "peerDependencies": { "react": "19.0.0-rc.0" } } ``` https://react-builds.vercel.app/prs/29736/files/oss-stable-rc/react-dom/package.json
Configuration menu - View commit details
-
Copy full SHA for bf3a29d - Browse repository at this point
Copy the full SHA bf3a29dView commit details -
[Fiber] Prefix owner stacks with the current stack at the console call (
facebook#29697) This information is available in the regular stack but since that's hidden behind an expando and our appended stack to logs is not hidden, it hides the most important frames like the name of the current component. This is closer to what happens to the native stack. We only include stacks if they're within a ReactFiberCallUserSpace call frame. This should be most that have a current fiber but this is critical to filtering out most React frames if the regular node_modules filter doesn't work. Most React warnings fire during the rendering phase and not inside a user space function but some do like hooks warnings and setState in render. This feature is more important if we port this to React DevTools appending stacks to all logs where it's likely to originate from inside a component and you want the line within that component to immediately part of the visible stack. One thing that kind sucks is that we don't have a reliable way to exclude React internal stack frames. We filter node_modules but it might not match. For other cases I try hard to only track the stack frame at the root of React (e.g. immediately inside createElement) until the ReactFiberCallUserSpace so we don't need the filtering to work. In this case it's hard to achieve the same thing though. This is easier in RDT because we have the start/end line and parsing of stack traces so we can use that to exclude internals but that's a lot of code/complexity for shipping within the library. For example in Safari: <img width="590" alt="Screenshot 2024-05-31 at 6 15 27 PM" src="https://github.com/facebook/react/assets/63648/2820c8c0-8a03-42e9-8678-8348f66b051a"> Ideally warnOnUseFormStateInDev and useFormState wouldn't be included since they're React internals. Before this change, the Counter.js line also wasn't included though which points to exactly where the error is within the user code. (Note Server Components have V8 formatted lines and Client Components have JSC formatted lines.)
Configuration menu - View commit details
-
Copy full SHA for 4dcdf21 - Browse repository at this point
Copy the full SHA 4dcdf21View commit details -
Fix xplat sync to ignore @generated header (facebook#29738)
Use some clever git diffing to ignore lines that only change the `@generated` header. We can't do this for the version string because the version string can be embedded in lines with other changes, but this header is always on one line.
Configuration menu - View commit details
-
Copy full SHA for 8c3697a - Browse repository at this point
Copy the full SHA 8c3697aView commit details -
compiler: Allow opting out of installed library check
ghstack-source-id: eedd024d36f66a68abe43ba0f679e2d462b77505 Pull Request resolved: facebook#29742
Configuration menu - View commit details
-
Copy full SHA for 8b677b1 - Browse repository at this point
Copy the full SHA 8b677b1View commit details -
fix<compiler>: only call readTestFilter if the filter option is enabl…
…ed (facebook#29720) Following the instructions in the compiler/docs/DEVELOPMENT_GUIDE.md, we are stuck on the command `yarn snap --watch` because it calls readTestFilter even though the filter option is not enabled.
Configuration menu - View commit details
-
Copy full SHA for 4082582 - Browse repository at this point
Copy the full SHA 4082582View commit details
Commits on Jun 4, 2024
-
www: set enableRefAsProp to true (facebook#29756)
www: set enableRefAsProp to true
Configuration menu - View commit details
-
Copy full SHA for a26e90c - Browse repository at this point
Copy the full SHA a26e90cView commit details -
Remove startTransition and useActionState from react-server condition…
… of react (facebook#29753) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary Remove `startTransition` and `useActionState` from `react-server` condition of react, as they should only stay in client bundle. This will reduce the server bundle of react itself. Found this while tracing where the `process.emit` was called. <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
Configuration menu - View commit details
-
Copy full SHA for 9185b9b - Browse repository at this point
Copy the full SHA 9185b9bView commit details -
Add xplat test variants (facebook#29734)
## Overview We didn't have any tests that ran in persistent mode with the xplat feature flags (for either variant). As a result, invalid test gating like in facebook#29664 were not caught. This PR adds test flavors for `ReactFeatureFlag-native-fb.js` in both variants.
Configuration menu - View commit details
-
Copy full SHA for eabb681 - Browse repository at this point
Copy the full SHA eabb681View commit details -
Configuration menu - View commit details
-
Copy full SHA for e177f0b - Browse repository at this point
Copy the full SHA e177f0bView commit details
Commits on Jun 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for db731f5 - Browse repository at this point
Copy the full SHA db731f5View commit details
Commits on Jul 1, 2024
-
Merge pull request #14 from replayio/feature/PRO-467-update-rdt-fork
Update RDT fork to support React 19
Configuration menu - View commit details
-
Copy full SHA for cc8b61c - Browse repository at this point
Copy the full SHA cc8b61cView commit details