mirror of
https://github.com/facebook/react.git
synced 2026-02-21 19:31:52 +00:00
main
88 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d4a325df4d |
[compiler] Add snap subcommand to minimize a test input (#35663)
Snap now supports subcommands 'test' (default) and 'minimize`. The
minimize subcommand attempts to minimize a single failing input fixture
by incrementally simplifying the ast so long as the same error occurs. I
spot-checked it and it seemed to work pretty well. This is intended for
use in a new subagent designed for investigating bugs — fixture
simplification is an important part of the process and we can automate
this rather than light tokens on fire.
Example Input:
```js
function Component(props) {
const x = [];
let result;
for (let i = 0; i < 10; i++) {
if (cond) {
try {
result = {key: bar([props.cond && props.foo])};
} catch (e) {
console.log(e);
}
}
}
x.push(result);
return <Stringify x={x} />;
}
```
Command output:
```
$ yarn snap minimize --path .../input.js
Minimizing: .../input.js
Minimizing................
--- Minimized Code ---
function Component(props) {
try {
props && props;
} catch (e) {}
}
Reduced from 16 lines to 5 lines
```
This demonstrates things like:
* Removing one statement at at time
* Replacing if/else with the test, consequent, or alternate. Similar for
other control-flow statements including try/catch
* Removing individual array/object expression properties
* Replacing single-value array/object with the value
* Replacing control-flow expression (logical, consequent) w the test or
left/right values
* Removing call arguments
* Replacing calls with a single argument with the argument
* Replacing calls with multiple arguments with an array of the arguments
* Replacing optional member/call with non-optional versions
* Replacing member expression with the object. If computed, also try
replacing w the key
* And a bunch more strategies, see the code
|
||
|
|
ed1351c4fb |
[compiler] improve zod v3 backwards compat (#34877)
## Summary
When upgrading to `babel-plugin-react-compiler@1.0.0` in a project that
uses `zod@3` we are running into TypeScript errors like:
```
node_modules/babel-plugin-react-compiler/dist/index.d.ts:435:10 - error TS2694: Namespace '"/REDACTED/node_modules/zod/v3/external"' has no exported member 'core'.
435 }, z.core.$strip>>>;
~~~~
```
This problem seems to be related to
|
||
|
|
d6eb735938 |
[compiler] Update for Zod v3/v4 compatibility (#34717)
Partial redo of #34710. The changes there tried to use `z.function(args, return)` to be compatible across Zod v3 and v4, but Zod 4's function API has completely changed. Instead, I've updated to just use `z.any()` where we expect a function, and manually validate that it's a function before we call the value. We already have validation of the return type (also using Zod). Co-authored-by: kolvian <eliot@pontarelli.com> |
||
|
|
85c427d822 |
[compiler] Remove @babel/plugin-proposal-private-methods (#34715)
redo of #34458 but fixing up prettier Co-authored-by: Arnaud Barré <arnaud.barre@carbometrix.com> |
||
|
|
7d29ecbeb2 |
[compiler] Aggregate error reporting, separate eslint rules (#34176)
NOTE: this is a merged version of @mofeiZ's original PR along with my edits per offline discussion. The description is updated to reflect the latest approach. The key problem we're trying to solve with this PR is to allow developers more control over the compiler's various validations. The idea is to have a number of rules targeting a specific category of issues, such as enforcing immutability of props/state/etc or disallowing access to refs during render. We don't want to have to run the compiler again for every single rule, though, so @mofeiZ added an LRU cache that caches the full compilation output of N most recent files. The first rule to run on a given file will cause it to get cached, and then subsequent rules can pull from the cache, with each rule filtering down to its specific category of errors. For the categories, I went through and assigned a category roughly 1:1 to existing validations, and then used my judgement on some places that felt distinct enough to warrant a separate error. Every error in the compiler now has to supply both a severity (for legacy reasons) and a category (for ESLint). Each category corresponds 1:1 to a ESLint rule definition, so that the set of rules is automatically populated based on the defined categories. Categories include a flag for whether they should be in the recommended set or not. Note that as with the original version of this PR, only eslint-plugin-react-compiler is changed. We still have to update the main lint rule. ## Test Plan * Created a sample project using ESLint v9 and verified that the plugin can be configured correctly and detects errors * Edited `fixtures/eslint-v9` and introduced errors, verified that the w latest config changes in that fixture it correctly detects the errors * In the sample project, confirmed that the LRU caching is correctly caching compiler output, ie compiling files just once. Co-authored-by: Mofei Zhang <feifei0@meta.com> |
||
|
|
e5f0315efa |
[mcp] Fix package.json (#33101)
Since we use esbuild we need to correctly move dependencies that are required at runtime into `dependencies` and other packages that are only used in development in to `devDependencies`. This ensures the correct packages are included in the build. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/33101). * #33085 * #33084 * #33083 * #33082 * __->__ #33101 |
||
|
|
90a124a980 |
[mdn] Initial experiment for adding performance tool (#33045)
## Summary Add a way for the agent to get some data on the performance of react code ## How did you test this change? Tested function independently and directly with claude desktop app --------- Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com> |
||
|
|
bb74190c26 |
[mcp] Convert docs resource to tool (#33009)
Seems to work better as a tool. Also it now returns plaintext instead of markdown. |
||
|
|
5010364d34 |
[chore] Update caniuse-lite (#33013)
silence annoying warnings ``` npx update-browserslist-db@latest ``` |
||
|
|
08075929f2 |
[compiler] Init react-mcp-server (#32859)
Just trying this out as a small hack for fun. Nothing serious is planned. Inits an MCP server that has 1 assistant prompt and two capabilities. |
||
|
|
4eea4fcf41 |
[compiler] Update rimraf (#32868)
Just updating the compiler workspace package. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32868). * #32859 * __->__ #32868 |
||
|
|
33999c4317 |
[compiler][be] Test runner (snap) now uses tsup bundled plugin (#32758)
Currently, `babel-plugin-react-compiler` is bundled with (almost) all external dependencies. This is because babel traversal and ast logic is not forward-compatible. Since `babel-plugin-react-compiler` needs to be compatible with babel pipelines across a wide semvar range, we (1) set this package's babel dependency to an early version and (2) inline babel libraries into our bundle. A few other packages in `react/compiler` depend on the compiler. This PR moves `snap`, our test fixture compiler and evaluator, to use the bundled version of `babel-plugin-react-compiler`. This decouples the babel version used by `snap` with the version used by `babel-plugin-react-compiler`, which means that `snap` now can test features from newer babel versions (see https://github.com/facebook/react/pull/32742). --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32758). * #32759 * __->__ #32758 |
||
|
|
5ccfcd17ff |
feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416)
This change merges the `react-compiler` rule from `eslint-plugin-react-compiler` into the `eslint-plugin-react-hooks` plugin. In order to do the move in a way that keeps commit history with the moved files, but also no remove them from their origin until a future cleanup change can be done, I did the `git mv` first, and then recreated the files that were moved in their original places, as a separate commit. Unfortunately GH shows the moved files as new instead of the ones that are truly new. But in the IDE and `git blame`, commit history is intact with the moved files. Since this change adds new dependencies, and one of those dependencies has a higher `engines` declaration for `node` than what the plugin currently has, this is technically a breaking change and will have to go out as part of a major release. ### Related Changes - https://github.com/facebook/react/pull/32458 --------- Co-authored-by: Lauren Tan <poteto@users.noreply.github.com> |
||
|
|
4ab827b869 |
[compiler] Dedupe @babel/types (#32581)
Extracting portions of #32416 for easier review. This PR dedupes @babel/types to resolve to 7.26.3, for compatibility in the root workspace where eslint-plugin-react-hooks resides. I also needed to update @babel/preset-typescript in snap. The compiler changes in HIR and ReactiveScopes were needed due to types changing. Notably, Babel [added support for optional chaining assignment](https://github.com/babel/babel/pull/15751) (currently [Stage 1](https://github.com/tc39/proposal-optional-chaining-assignment)), so in the latest versions of @babel/types, AssignmentExpression.left can now also be of t.OptionalMemberExpression. Given that this is in Stage 1, the compiler probably shouldn't support this syntax, so this PR updates HIR to bailout with a TODO if there is a non LVal on the lhs of an Assignment Expression. There was also a small superficial SourceLocation change needed in `InferReactiveScopeVariables` as Babel 8 changes were [accidentally released in 7](https://github.com/babel/babel/issues/10746#issuecomment-2699146670). It doesn't affect our analysis so it seems fine to just update with the new properties. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32581). * #32582 * __->__ #32581 Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> Co-authored-by: michael faith <michaelfaith@users.noreply.github.com> |
||
|
|
00aa0043c7 |
[compiler] Migrate compiler packages to tsup (#32550)
Currently in the `compiler` workspace, we invoke esbuild directly to build most packages (with the exception of `snap`). This has been mostly fine, but does not allow us to do things like generate type declaration files. I would like #32416 to be able to consume the merged eslint-plugin-react-compiler from source rather than via npm, and one of the things that has come up from my exploration in that stack using the compiler from source is that babel-plugin-react-compiler is missing type declarations. This is primarily because React's build process uses rollup + rollup-plugin-typescript, which runs tsc. So the merged plugin needs to typecheck properly in order to build. An alternative might be to migrate to something like babel with rollup instead to simply strip types rather than typecheck before building. The minor downside of that approach is that we would need to manually maintain a d.ts file for eslint-plugin-react-hooks. For now I would like to see if this PR helps us make progress rather than go for the slightly worse alternative. [`tsup`](https://github.com/egoist/tsup) is esbuild based so build performance is comparable. It is slower when generating d.ts files, but it's still much faster than rollup which we used prior to esbuild. For now, I have turned off `dts` by default, and it is only passed when publishing on npm. If you want to also generate d.ts files you can run `yarn build --dts`. ``` # BEFORE: build all compiler packages (esbuild) $ time yarn build ✨ Done in 15.61s. yarn build 13.82s user 1.54s system 96% cpu 15.842 total # --- # AFTER: build all compiler packages (tsup) $ time yarn build ✨ Done in 12.39s. yarn build 12.58s user 1.68s system 106% cpu 13.350 total # --- # AFTER: build all compiler packages and type declarations (tsup) $ time yarn build --dts ✨ Done in 30.69s. yarn build 43.57s user 3.20s system 150% cpu 31.061 total ``` I still need to test if this unblocks #32416 but this stack can be landed independently though as we could probably just release type declarations on npm. No one should be using the compiler directly, but if they really wanted to, lack of type declarations would not stop them (cf React secret internals). Note that I still kept esbuild as we still use it directly for forgive. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32550). * #32551 * __->__ #32550 |
||
|
|
d42a90cf4f |
[forgive] Init (#31918)
Init basic LSP. At the moment the extension doesn't do anything interesting, but it does compile successfully. |
||
|
|
dd9974bbb8 |
[forgive] Scaffold workspaces (#31917)
Basic workspace setup for Forgive. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31917). * #31918 * #31927 * __->__ #31917 |
||
|
|
d814852baf |
[compiler] Upgrade esbuild (#32368)
Just a simple upgrade |
||
|
|
11df5224e6 |
[rcr] Generate ts defs (#31994)
This was accidentally removed in the esbuild transition. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31994). * #31995 * __->__ #31994 |
||
|
|
220dece92b |
[compiler] Switch to esbuild (#31963)
This migrates the compiler's bundler to esbuild instead of rollup. Unlike React, our bundling use cases are far simpler since the majority of our packages are meant to be run on node. Rollup was adding considerable build time overhead whereas esbuild remains fast and has all the functionality we need out of the box. ### Before ``` time yarn workspaces run build yarn workspaces v1.22.22 > babel-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) Circular dependencies # ... created dist/index.js in 15.5s ✨ Done in 16.45s. > eslint-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) Circular dependencies # ... created dist/index.js in 9.1s ✨ Done in 10.11s. > make-read-only-util yarn run v1.22.22 warning package.json: No license field $ tsc ✨ Done in 1.81s. > react-compiler-healthcheck yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) Circular dependencies # ... created dist/index.js in 8.7s ✨ Done in 10.43s. > react-compiler-runtime yarn run v1.22.22 $ rimraf dist && rollup --config --bundleConfigAsCjs src/index.ts → dist/index.js... (!) src/index.ts (1:0): Module level directives cause errors when bundled, "use no memo" in "src/index.ts" was ignored. # ... created dist/index.js in 1.1s ✨ Done in 1.82s. > snap yarn run v1.22.22 $ rimraf dist && concurrently -n snap,runtime "tsc --build" "yarn --silent workspace react-compiler-runtime build --silent" $ rimraf dist && rollup --config --bundleConfigAsCjs --silent [runtime] yarn --silent workspace react-compiler-runtime build --silent exited with code 0 [snap] tsc --build exited with code 0 ✨ Done in 5.73s. ✨ Done in 47.30s. yarn workspaces run build 75.92s user 5.48s system 170% cpu 47.821 total ``` ### After ``` time yarn workspaces run build yarn workspaces v1.22.22 > babel-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 1.02s. > eslint-plugin-react-compiler yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 0.93s. > make-read-only-util yarn run v1.22.22 warning package.json: No license field $ rimraf dist && scripts/build.js ✨ Done in 0.89s. > react-compiler-healthcheck yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 0.58s. > react-compiler-runtime yarn run v1.22.22 $ rimraf dist && scripts/build.js ✨ Done in 0.48s. > snap yarn run v1.22.22 $ rimraf dist && concurrently -n snap,runtime "tsc --build" "yarn --silent workspace react-compiler-runtime build" $ rimraf dist && scripts/build.js [runtime] yarn --silent workspace react-compiler-runtime build exited with code 0 [snap] tsc --build exited with code 0 ✨ Done in 4.69s. ✨ Done in 9.46s. yarn workspaces run build 9.70s user 0.99s system 103% cpu 10.329 total ``` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31963). * #31964 * __->__ #31963 * #31962 |
||
|
|
c784273bcc |
[compiler] Update prettier-plugin-hermes-parser (#31962)
Just updating this package. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31962). * #31964 * #31963 * __->__ #31962 |
||
|
|
c8c89fab5b |
[compiler] Update rollup plugins (#31919)
Update our various compiler rollup plugins. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31919). * #31927 * #31918 * #31917 * #31916 * __->__ #31919 |
||
|
|
b9b510df2a |
Revert "Replace deprecated dependency in eslint-plugin-react-compiler" (#31665)
Reverts facebook/react#31629 `@babel/plugin-proposal-private-methods` is not compatible with `@babel/traverse` versions < 7.25 (see https://github.com/babel/babel/issues/16851). Internally we have partners that use a less modern babel version, and we expect this to be an issue for older codebases in OSS as well. |
||
|
|
7670501b0d |
Replace deprecated dependency in eslint-plugin-react-compiler (#31629)
|
||
|
|
6f0dc2947b |
[compiler] Update hermes deps (#31586)
``` => Found "hermes-parser@0.25.1" info Reasons this module exists - "_project_#prettier-plugin-hermes-parser" depends on it - Hoisted from "_project_#prettier-plugin-hermes-parser#hermes-parser" - Hoisted from "_project_#eslint-plugin-react-compiler#hermes-parser" - Hoisted from "_project_#snap#hermes-parser" - Hoisted from "_project_#snap#babel-plugin-syntax-hermes-parser#hermes-parser" - Hoisted from "_project_#eslint-plugin-react-compiler#hermes-eslint#hermes-parser" info Disk size without dependencies: "1.49MB" info Disk size with unique dependencies: "1.82MB" info Disk size with transitive dependencies: "1.82MB" info Number of shared dependencies: 1 ✨ Done in 0.81s. ``` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31586). * __->__ #31586 * #31585 |
||
|
|
d2e8954d06 |
[compiler] Update react deps (#31585)
``` => Found "react@0.0.0-experimental-4beb1fd8-20241118" info Reasons this module exists - "_project_#babel-plugin-react-compiler" depends on it - Hoisted from "_project_#babel-plugin-react-compiler#react" - Hoisted from "_project_#snap#react" info Disk size without dependencies: "252KB" info Disk size with unique dependencies: "252KB" info Disk size with transitive dependencies: "252KB" info Number of shared dependencies: 0 ✨ Done in 0.60s. ``` ``` => Found "react-dom@0.0.0-experimental-4beb1fd8-20241118" info Reasons this module exists - "_project_#babel-plugin-react-compiler" depends on it - Hoisted from "_project_#babel-plugin-react-compiler#react-dom" - Hoisted from "_project_#snap#react-dom" info Disk size without dependencies: "8.04MB" info Disk size with unique dependencies: "8.17MB" info Disk size with transitive dependencies: "8.17MB" info Number of shared dependencies: 1 ✨ Done in 0.56s. ``` --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31585). * #31586 * __->__ #31585 |
||
|
|
603e6108f3 |
[compiler] Update react deps to experimental instead of beta (#31385)
Some tests rely on experimental APIs so let's just use react@experimental instead of beta |
||
|
|
9c525ea44a |
Bump micromatch from 4.0.5 to 4.0.8 in /compiler (#31186)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/micromatch/micromatch/releases">micromatch's releases</a>.</em></p> <blockquote> <h2>4.0.8</h2> <p>Ultimate release that fixes both CVE-2024-4067 and CVE-2024-4068. We consider the issues low-priority, so even if you see automated scanners saying otherwise, don't be scared.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md">micromatch's changelog</a>.</em></p> <blockquote> <h2>[4.0.8] - 2024-08-22</h2> <ul> <li>backported CVE-2024-4067 fix (from v4.0.6) over to 4.x branch</li> </ul> <h2>[4.0.7] - 2024-05-22</h2> <ul> <li>this is basically v4.0.5, with some README updates</li> <li><strong>it is vulnerable to CVE-2024-4067</strong></li> <li>Updated braces to v3.0.3 to avoid CVE-2024-4068</li> <li>does NOT break API compatibility</li> </ul> <h2>[4.0.6] - 2024-05-21</h2> <ul> <li>Added <code>hasBraces</code> to check if a pattern contains braces.</li> <li>Fixes CVE-2024-4067</li> <li><strong>BREAKS API COMPATIBILITY</strong></li> <li>Should be labeled as a major release, but it's not.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
2011074ab8 |
Bump json5 from 2.2.1 to 2.2.3 in /compiler (#31185)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p> <blockquote> <h2>v2.2.3</h2> <ul> <li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://redirect.github.com/json5/json5/issues/299">#299</a>)</li> </ul> <h2>v2.2.2</h2> <ul> <li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://redirect.github.com/json5/json5/issues/199">#199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://redirect.github.com/json5/json5/issues/295">#295</a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/json5/json5/blob/main/CHANGELOG.md">json5's changelog</a>.</em></p> <blockquote> <h3>v2.2.3 [<a href="https://github.com/json5/json5/tree/v2.2.3">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.2...v2.2.3">diff</a>]</h3> <ul> <li>Fix: json5@2.2.3 is now the 'latest' release according to npm instead of v1.0.2. (<a href="https://redirect.github.com/json5/json5/issues/299">#299</a>)</li> </ul> <h3>v2.2.2 [<a href="https://github.com/json5/json5/tree/v2.2.2">code</a>, <a href="https://github.com/json5/json5/compare/v2.2.1...v2.2.2">diff</a>]</h3> <ul> <li>Fix: Properties with the name <code>__proto__</code> are added to objects and arrays. (<a href="https://redirect.github.com/json5/json5/issues/199">#199</a>) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (<a href="https://redirect.github.com/json5/json5/issues/295">#295</a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
db240980a3 |
[playground] Decouple playground from compiler
Currently the playground is setup as a linked workspace for the
compiler which complicates our yarn workspace setup and means that snap
can sometimes pull in a different version of react than was otherwise
specified.
There's no real reason to have these workspaces combined so let's split
them up.
ghstack-source-id:
|
||
|
|
d0772d5866 |
Bump axios from 1.7.1 to 1.7.4 in /compiler (#30694)
Bumps [axios](https://github.com/axios/axios) from 1.7.1 to 1.7.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/axios/axios/releases">axios's releases</a>.</em></p> <blockquote> <h2>Release v1.7.4</h2> <h2>Release notes:</h2> <h3>Bug Fixes</h3> <ul> <li><strong>sec:</strong> CVE-2024-39338 (<a href="https://redirect.github.com/axios/axios/issues/6539">#6539</a>) (<a href="https://redirect.github.com/axios/axios/issues/6543">#6543</a>) (<a href=" |
||
|
|
9927ab238b |
Bump rollup from 4.13.2 to 4.22.4 in /compiler (#31039)
Bumps [rollup](https://github.com/rollup/rollup) from 4.13.2 to 4.22.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/rollup/rollup/releases">rollup's releases</a>.</em></p> <blockquote> <h2>v4.22.4</h2> <h2>4.22.4</h2> <p><em>2024-09-21</em></p> <h3>Bug Fixes</h3> <ul> <li>Fix a vulnerability in generated code that affects IIFE, UMD and CJS bundles when run in a browser context (<a href="https://redirect.github.com/rollup/rollup/issues/5671">#5671</a>)</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5670">#5670</a>: refactor: Use object.prototype to check for reserved properties (<a href="https://github.com/YuHyeonWook"><code>@YuHyeonWook</code></a>)</li> <li><a href="https://redirect.github.com/rollup/rollup/pull/5671">#5671</a>: Fix DOM Clobbering CVE (<a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> </ul> <h2>v4.22.3</h2> <h2>4.22.3</h2> <p><em>2024-09-21</em></p> <h3>Bug Fixes</h3> <ul> <li>Ensure that mutations in modules without side effects are observed while properly handling transitive dependencies (<a href="https://redirect.github.com/rollup/rollup/issues/5669">#5669</a>)</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5669">#5669</a>: Ensure impure dependencies of pure modules are added (<a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> </ul> <h2>v4.22.2</h2> <h2>4.22.2</h2> <p><em>2024-09-20</em></p> <h3>Bug Fixes</h3> <ul> <li>Revert fix for side effect free modules until other issues are investigated (<a href="https://redirect.github.com/rollup/rollup/issues/5667">#5667</a>)</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5667">#5667</a>: Partially revert <a href="https://redirect.github.com/rollup/rollup/issues/5658">#5658</a> and re-apply <a href="https://redirect.github.com/rollup/rollup/issues/5644">#5644</a> (<a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> </ul> <h2>v4.22.1</h2> <h2>4.22.1</h2> <p><em>2024-09-20</em></p> <h3>Bug Fixes</h3> <ul> <li>Revert <a href="https://redirect.github.com/rollup/rollup/issues/5644">#5644</a> "stable chunk hashes" while issues are being investigated</li> </ul> <h3>Pull Requests</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rollup/rollup/blob/master/CHANGELOG.md">rollup's changelog</a>.</em></p> <blockquote> <h2>4.22.4</h2> <p><em>2024-09-21</em></p> <h3>Bug Fixes</h3> <ul> <li>Fix a vulnerability in generated code that affects IIFE, UMD and CJS bundles when run in a browser context (<a href="https://redirect.github.com/rollup/rollup/issues/5671">#5671</a>)</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5670">#5670</a>: refactor: Use object.prototype to check for reserved properties (<a href="https://github.com/YuHyeonWook"><code>@YuHyeonWook</code></a>)</li> <li><a href="https://redirect.github.com/rollup/rollup/pull/5671">#5671</a>: Fix DOM Clobbering CVE (<a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> </ul> <h2>4.22.3</h2> <p><em>2024-09-21</em></p> <h3>Bug Fixes</h3> <ul> <li>Ensure that mutations in modules without side effects are observed while properly handling transitive dependencies (<a href="https://redirect.github.com/rollup/rollup/issues/5669">#5669</a>)</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5669">#5669</a>: Ensure impure dependencies of pure modules are added (<a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> </ul> <h2>4.22.2</h2> <p><em>2024-09-20</em></p> <h3>Bug Fixes</h3> <ul> <li>Revert fix for side effect free modules until other issues are investigated (<a href="https://redirect.github.com/rollup/rollup/issues/5667">#5667</a>)</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5667">#5667</a>: Partially revert <a href="https://redirect.github.com/rollup/rollup/issues/5658">#5658</a> and re-apply <a href="https://redirect.github.com/rollup/rollup/issues/5644">#5644</a> (<a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> </ul> <h2>4.22.1</h2> <p><em>2024-09-20</em></p> <h3>Bug Fixes</h3> <ul> <li>Revert <a href="https://redirect.github.com/rollup/rollup/issues/5644">#5644</a> "stable chunk hashes" while issues are being investigated</li> </ul> <h3>Pull Requests</h3> <ul> <li><a href="https://redirect.github.com/rollup/rollup/pull/5663">#5663</a>: chore(deps): update dependency inquirer to v11 (<a href="https://github.com/renovate"><code>@renovate</code></a>[bot], <a href="https://github.com/lukastaegert"><code>@lukastaegert</code></a>)</li> <li><a href="https://redirect.github.com/rollup/rollup/pull/5664">#5664</a>: chore(deps): lock file maintenance minor/patch updates (<a href="https://github.com/renovate"><code>@renovate</code></a>[bot])</li> <li><a href="https://redirect.github.com/rollup/rollup/pull/5665">#5665</a>: fix: type in CI file (<a href="https://github.com/YuHyeonWook"><code>@YuHyeonWook</code></a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
c9143b98d0 |
[compiler] Refactor release script
Updates the release script to publish tags as well as take a `--ci`
option
Test plan:
```
$ yarn npm:publish --debug --frfr
yarn run v1.22.22
$ node scripts/release/publish --debug --frfr
ℹ 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
NPM 2-factor auth code: ******
✔ Wrote package.json for babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806
========== babel-plugin-react-compiler ==========
⠧ Publishing babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806 to npm
+ babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806
✔ Successfully published babel-plugin-react-compiler to npm
ℹ dry-run: npm dist-tag add babel-plugin-react-compiler@0.0.0-experimental-10cf18a-20240806 experimental --otp=******
✔ Successfully pushed dist-tag experimental for babel-plugin-react-compiler to npm
✔ Wrote package.json for eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806
========== eslint-plugin-react-compiler ==========
⠹ Publishing eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806 to npm
+ eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806
✔ Successfully published eslint-plugin-react-compiler to npm
ℹ dry-run: npm dist-tag add eslint-plugin-react-compiler@0.0.0-experimental-532f76b-20240806 experimental --otp=******
✔ Successfully pushed dist-tag experimental for eslint-plugin-react-compiler to npm
✔ Wrote package.json for react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806
========== react-compiler-healthcheck ==========
⠙ Publishing react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806 to npm
+ react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806
✔ Successfully published react-compiler-healthcheck to npm
ℹ dry-run: npm dist-tag add react-compiler-healthcheck@0.0.0-experimental-48a8743-20240806 experimental --otp=******
✔ Successfully pushed dist-tag experimental for react-compiler-healthcheck to npm
✅ All done
✨ Done in 50.64s.
```
ghstack-source-id:
|
||
|
|
08b4ee83cc |
[compiler] Add babel-plugin-idx to snap
To surface any potential conflicts with this plugin, let's install it
into snap so we can surface any runtime errors after compilation
ghstack-source-id:
|
||
|
|
70484844bf |
[BE] switch to hermes parser for prettier (#30421)
This will allow us to parse new flow syntax since the `flow` parser is no longer updated. I had to exclude some files and have them fall back to `flow` parser since they contain invalid graphql syntax that makes the plugin crash. |
||
|
|
735d3d2baa |
[compiler][ez] Upgrade babel generator version for playground
---
The current version of `@babel/generator` used by playground has some bugs (see https://github.com/babel/babel/issues/10966)
```js
// Try pasting this into playground
function useFoo(a, b) {
return (a ?? b) == c;
}
// Current playground output
function useFoo(a, b) {
return a ?? b == c;
}
```
We previously locked babel library versions to be compatible with the oldest Meta internal usages. Now that both compiler and eslint plugins are bundled with rollup, this shouldn't be necessary.
ghstack-source-id:
|
||
|
|
6cca9c3184 |
[compiler][be] Fix lint violations in eslint-plugin
ghstack-source-id:
|
||
|
|
9a6e2d078c |
[compiler] Flow support for playground
Summary: The playground currently has limited support for Flow files--it tries to parse them if the // flow sigil is on the fist line, but this is often not the case for files one would like to inspect in practice. more importantly, component syntax isn't supported even then, because it depends on the Hermes parser.
This diff improves the state of flow support in the playground to make it more useful: when we see `flow` anywhere in the file, we'll assume it's a flow file, parse it with the Hermes parser, and disable typescript-specific features of Monaco editor.
ghstack-source-id:
|
||
|
|
bbc8851c84 |
Bump ws from 8.13.0 to 8.17.1 in /compiler (#30043)
Bumps [ws](https://github.com/websockets/ws) from 8.13.0 to 8.17.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p> <blockquote> <h2>8.17.1</h2> <h1>Bug fixes</h1> <ul> <li>Fixed a DoS vulnerability (<a href="https://redirect.github.com/websockets/ws/issues/2231">#2231</a>).</li> </ul> <p>A request with a number of headers exceeding the[<code>server.maxHeadersCount</code>][] threshold could be used to crash a ws server.</p> <pre lang="js"><code>const http = require('http'); const WebSocket = require('ws'); <p>const wss = new WebSocket.Server({ port: 0 }, function () { const chars = "!#$%&'*+-.0123456789abcdefghijklmnopqrstuvwxyz^_`|~".split(''); const headers = {}; let count = 0;</p> <p>for (let i = 0; i < chars.length; i++) { if (count === 2000) break;</p> <pre><code>for (let j = 0; j &lt; chars.length; j++) { const key = chars[i] + chars[j]; headers[key] = 'x'; if (++count === 2000) break; } </code></pre> <p>}</p> <p>headers.Connection = 'Upgrade'; headers.Upgrade = 'websocket'; headers['Sec-WebSocket-Key'] = 'dGhlIHNhbXBsZSBub25jZQ=='; headers['Sec-WebSocket-Version'] = '13';</p> <p>const request = http.request({ headers: headers, host: '127.0.0.1', port: wss.address().port });</p> <p>request.end(); }); </code></pre></p> <p>The vulnerability was reported by <a href="https://github.com/rrlapointe">Ryan LaPointe</a> in <a href="https://redirect.github.com/websockets/ws/issues/2230">websockets/ws#2230</a>.</p> <p>In vulnerable versions of ws, the issue can be mitigated in the following ways:</p> <ol> <li>Reduce the maximum allowed length of the request headers using the [<code>--max-http-header-size=size</code>][] and/or the [<code>maxHeaderSize</code>][] options so that no more headers than the <code>server.maxHeadersCount</code> limit can be sent.</li> </ol> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
61aa159086 |
[compiler] Fix up prettier
Our prettier setup is all messed up after the merge, so this PR should
fix things
ghstack-source-id:
|
||
|
|
0a0a5c02f1 |
[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:
|
||
|
|
c325aec1ee |
Bump word-wrap from 1.2.3 to 1.2.5 in /compiler (#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>🔒 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=" |
||
|
|
ba51ebe03a |
Bump tough-cookie from 4.1.2 to 4.1.4 in /compiler (#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=" |
||
|
|
8287cb9290 |
Bump postcss from 8.4.24 to 8.4.31 in /compiler (#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=" |
||
|
|
b195a947de |
[compiler:publish] Prompt for OTP
Makes running the script a little more ergonomic by prompting for OTP
upfront.
ghstack-source-id:
|
||
|
|
541e3c516d |
[compiler:playground] Resizable tabs (#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 <abishekilango@protonmail.com> |
||
|
|
3f1436cca1 |
[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:
|
||
|
|
3adca7a477 |
compiler: fix jsx text attributes with double quotes (#29079)
Fixes #29069 by detecting the presence of double-quotes in JSX attribute strings and falling back to using an expression container. |
||
|
|
6948639df6 |
[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 📦 babel-plugin-react-compiler@0.0.1 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 📦 eslint-plugin-react-compiler@0.0.0 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 📦 react-compiler-healthcheck@0.0.0 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: https://github.com/facebook/react-forget/pull/2966 |
||
|
|
e63d3d1491 |
Upgrade to React 19 beta (#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. |