Commit Graph

22559 Commits

Author SHA1 Message Date
Lauren Tan 9523e7151d merge commit for archive created by Sapling 2025-10-08 09:52:55 -07:00
Lauren Tan 82c636bcaf [eprh] Prepare for 7.0.0
For 7.0.0:

Slim down presets to just 3 configurations:

- `recommended-legacy`: legacy config with all recommended rules
- `recommended`: flat config with all recommended rules, and
- `recommended-experimental`: flat config with all recommended rules plus new bleeding edge experimental compiler rules

Removed:
- `recommended-latest`
- `recommended-latest-legacy`
- `flat/recommended`
2025-10-08 09:52:27 -07:00
lauren dd82f9d35c Merge 0979326ea7 into sapling-pr-archive-poteto 2025-10-08 12:39:05 -04:00
Lauren Tan 0979326ea7 [eprh] Prepare for 7.0.0
For 7.0.0:

Slim down presets to just 3 configurations:

- `recommended-legacy`: legacy config with all recommended rules
- `recommended`: flat config with all recommended rules, and
- `recommended-experimental`: flat config with all recommended rules plus new bleeding edge experimental compiler rules

Removed:
- `recommended-latest`
- `recommended-latest-legacy`
- `flat/recommended`
2025-10-08 09:38:50 -07:00
Ruslan Lesiutin 9724e3e66e [DevTools] Gate SuspenseTab (#34754) 2025-10-08 05:47:50 -07:00
lauren 848e0e3a4f [eprh] Update plugin config to be compatible with flat and legacy (#34762)
This has been incredibly frustrating as [ESLint's own
docs](https://eslint.org/docs/latest/extend/plugins#backwards-compatibility-for-legacy-configs)
are clearly wrong (see #34679).

This PR uses [eslint-plugin-react's
setup](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/index.js)
as a reference, where the presets are assigned to `configs.flat` (not
documented by eslint).
2025-10-07 16:23:56 -04:00
lauren 5c15c1cd34 [ci] Dry run with debug mode (#34767)
Adds `--debug` to our dry run command so we can see the npm dry run
output
2025-10-07 15:16:18 -04:00
Lauren Tan ad399dffb8 merge commit for archive created by Sapling 2025-10-07 12:10:52 -07:00
Lauren Tan 27b2f81cdf [ci] Dry run with debug mode
Adds `--debug` to our dry run command so we can see the npm dry run output
2025-10-07 12:09:49 -07:00
lauren 69b4cb8df4 [ci] Allow dry run (#34765)
Allow running the compiler release script as dry run.
2025-10-07 14:44:46 -04:00
Lauren Tan 4515920735 merge commit for archive created by Sapling 2025-10-07 11:38:59 -07:00
Lauren Tan 450ad4d648 [ci] Allow dry run
Allow running the compiler release script as dry run.
2025-10-07 11:38:30 -07:00
lauren a664f5f2ee [compiler] Fix incorrect version name (#34764)
Script was using the wrong version name.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34764).
* #34765
* __->__ #34764
2025-10-07 14:32:51 -04:00
Lauren Tan d75164fe97 merge commit for archive created by Sapling 2025-10-07 11:32:02 -07:00
Lauren Tan d5a27423f5 [ci] Allow dry run
Allow running the compiler release script as dry run.
2025-10-07 11:31:36 -07:00
lauren 8c4747d696 Merge 9a5849fa9c into sapling-pr-archive-poteto 2025-10-07 14:25:50 -04:00
Lauren Tan 9a5849fa9c [ci] Allow dry run
Allow running the compiler release script as dry run.
2025-10-07 11:25:30 -07:00
Lauren Tan d29b0c4b57 [compiler] Fix incorrect version name
Script was using the wrong version name.
2025-10-07 11:21:56 -07:00
lauren 1384ea8230 [compiler] Update release script for latest tag (#34763)
Updates our release script so we can publish to the `latest` tag.
2025-10-07 14:14:50 -04:00
Lauren Tan 25864e7abd merge commit for archive created by Sapling 2025-10-07 11:10:46 -07:00
Lauren Tan cf2c79b5ff [compiler] Update release script for latest tag
Updates our release script so we can publish to the `latest` tag.
2025-10-07 11:10:13 -07:00
lauren b5cb8de8b4 Merge a1f087fb14 into sapling-pr-archive-poteto 2025-10-07 14:01:22 -04:00
Lauren Tan a1f087fb14 [compiler] Update release script for latest tag
Updates our release script so we can publish to the `latest` tag.
2025-10-07 11:01:05 -07:00
Lauren Tan 356511ee4b merge commit for archive created by Sapling 2025-10-07 08:32:10 -07:00
Lauren Tan 7c2cbb3e09 [eprh] Update plugin config to be compatible with flat and legacy
This has been incredibly frustrating as [ESLint's own docs](https://eslint.org/docs/latest/extend/plugins#backwards-compatibility-for-legacy-configs) are clearly wrong (see #34679).

This PR uses [eslint-plugin-react's setup](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/index.js) as a reference, where the presets are assigned  to `configs.flat` (not documented by eslint).
2025-10-07 08:31:29 -07:00
Sebastian Markbåge 3025aa3964 [Flight] Don't serialize toJSON in Debug path and omit wide arrays (#34759)
There's a couple of issues with serializing Buffer in the debug renders.

For one, the Node.js Buffer has a `toJSON` on it which turns the binary
data into a JSON array which is very inefficient to serialize compared
to the real buffer. For debug info we never really want to resolve these
and unlike the regular render we can't error. So this uses the trick
where we read the original value. It's still unfortunate that this
intermediate gets created at all but at least now we're not serializing
it.

Second, we have a limit on depth of objects but we didn't have a limit
on width like large arrays or typed arrays. This omits large arrays from
the payload when possible and make them deferred when there's a debug
channel.
2025-10-07 06:59:34 -07:00
Sebastian "Sebbie" Silbermann a4eb2dfa6f Release Fragment refs to Canary (#34720)
## Overview

This PR adds the `ref` prop to `<Fragment>` in `react@canary`.

This means this API is ready for final feedback and prepared for a
semver stable release.

## What this means

Shipping Fragment refs to canary means they have gone through extensive
testing in production, we are confident in the stability of the APIs,
and we are preparing to release it in a future semver stable version.

Libraries and frameworks following the [Canary
Workflow](https://react.dev/blog/2023/05/03/react-canaries) should begin
implementing and testing these features.

## Why we follow the Canary Workflow

To prepare for semver stable, libraries should test canary features like
Fragment refs with `react@canary` to confirm compatibility and prepare
for the next semver release in a myriad of environments and
configurations used throughout the React ecosystem. This provides
libraries with ample time to catch any issues we missed before slamming
them with problems in the wider semver release.

Since these features have already gone through extensive production
testing, and we are confident they are stable, frameworks following the
[Canary Workflow](https://react.dev/blog/2023/05/03/react-canaries) can
also begin adopting canary features like Fragment refs.

This adoption is similar to how different Browsers implement new
proposed browser features before they are added to the standard. If a
frameworks adopts a canary feature, they are committing to stability for
their users by ensuring any API changes before a semver stable release
are opaque and non-breaking to their users.

Apps not using a framework are also free to adopt canary features like
Fragment refs as long as they follow the [Canary
Workflow](https://react.dev/blog/2023/05/03/react-canaries), but we
generally recommend waiting for a semver stable release unless you have
the capacity to commit to following along with the canary changes and
debugging library compatibility issues.

Waiting for semver stable means you're able to benefit from libraries
testing and confirming support, and use semver as signal for which
version of a library you can use with support of the feature.

## Docs 

Check out the ["React Labs: View Transitions, Activity, and
more"](https://react.dev/blog/2025/04/23/react-labs-view-transitions-activity-and-more#fragment-refs)
blog post, and [the new docs for Fragment
refs`](https://react.dev/reference/react/Fragment#fragmentinstance) for
more info.
2025-10-06 21:24:24 -07:00
Sebastian "Sebbie" Silbermann 6a8c7fb6f1 Release <ViewTransition /> to Canary (#34712)
## Overview

This PR ships the View Transition APIs to `react@canary`:
- [`<ViewTransition
/>`](https://react.dev/reference/react/ViewTransition)
-
[`addTransitionType`](https://react.dev/reference/react/addTransitionType)

This means these APIs are ready for final feedback and prepare for
semver stable release.

## What this means

Shipping `<ViewTransition />` and `addTransitionType` to canary means
they have gone through extensive testing in production, we are confident
in the stability of the APIs, and we are preparing to release it in a
future semver stable version.

Libraries and frameworks following the [Canary
Workflow](https://react.dev/blog/2023/05/03/react-canaries) should begin
implementing and testing these features.

## Why we follow the Canary Workflow

To prepare for semver stable, libraries should test canary features like
`<ViewTransition />` with `react@canary` to confirm compatibility and
prepare for the next semver release in a myriad of environments and
configurations used throughout the React ecosystem. This provides
libraries with ample time to catch any issues we missed before slamming
them with problems in the wider semver release.

Since these features have already gone through extensive production
testing, and we are confident they are stable, frameworks following the
[Canary Workflow](https://react.dev/blog/2023/05/03/react-canaries) can
also begin adopting canary features like `<ViewTransition />`.

This adoption is similar to how different Browsers implement new
proposed browser features before they are added to the standard. If a
frameworks adopts a canary feature, they are committing to stability for
their users by ensuring any API changes before a semver stable release
are opaque and non-breaking to their users.

Apps not using a framework are also free to adopt canary features like
`<ViewTransition>` as long as they follow the [Canary
Workflow](https://react.dev/blog/2023/05/03/react-canaries), but we
generally recommend waiting for a semver stable release unless you have
the capacity to commit to following along with the canary changes and
debugging library compatibility issues.

Waiting for semver stable means you're able to benefit from libraries
testing and confirming support, and use semver as signal for which
version of a library you can use with support of the feature.

## Docs 

Check out the ["React Labs: View Transitions, Activity, and
more"](https://react.dev/blog/2025/04/23/react-labs-view-transitions-activity-and-more#view-transitions)
blog post, and [the new docs for `<ViewTransition
/>`](https://react.dev/reference/react/ViewTransition) and
[`addTransitionType`](https://react.dev/reference/react/addTransitionType)
for more info.
2025-10-06 21:23:34 -07:00
Lauren Tan f7384bf121 merge commit for archive created by Sapling 2025-10-06 17:28:23 -07:00
Lauren Tan 0d54b4965b [eprh] Prepare for 7.0.0
For 7.0.0:

Slim down presets to just 3 configurations:

- `recommended-legacy`: legacy config with all recommended rules
- `recommended`: flat config with all recommended rules, and
- `recommended-experimental`: flat config with all recommended rules plus new bleeding edge experimental compiler rules

Removed:
- `recommended-latest`
- `recommended-latest-legacy`
- `flat/recommended`
2025-10-06 17:27:37 -07:00
lauren ba0c6432a7 Merge d15251514b into sapling-pr-archive-poteto 2025-10-06 20:23:27 -04:00
Lauren Tan d15251514b [eprh] Prepare for 7.0.0
For 7.0.0:

Slim down presets to just 3 configurations:

- `recommended-legacy`: legacy config with all recommended rules
- `recommended`: flat config with all recommended rules, and
- `recommended-experimental`: flat config with all recommended rules plus new bleeding edge experimental compiler rules

Removed:
- `recommended-latest-legacy`
- `flat/recommended configs`
2025-10-06 17:23:10 -07:00
lauren d75ff6cd1e Merge ed49061027 into sapling-pr-archive-poteto 2025-10-06 20:15:55 -04:00
Lauren Tan ed49061027 [eprh] Prepare for 7.0.0
For 7.0.0:

Slim down presets to just 3 configurations:

- `recommended-legacy`: legacy config with all recommended rules
- `recommended`: flat config with all recommended rules, and
- `recommended-experimental`: flat config with all recommended rules plus new bleeding edge experimental compiler rules

Removed:
- `recommended-latest-legacy`
- `flat/recommended configs`
2025-10-06 17:15:33 -07:00
lauren b65e6fc58b Revert [eprh] Remove hermes-parser (#34747)
Adds back HermesParser to eslint-plugin-react-hooks. There are still
[external users of
Flow](https://github.com/facebook/react/pull/34719#issuecomment-3368137743)
using the plugin, so we shouldn't break the plugin for them. However, we
still have the problem of double parsing: once from eslint (which we
discard) and then another via babel/hermes parser.

In the long run we should investigate a translation layer from estree to
babel (or alternatively, update the compiler to take estree as input).
But for now, I am reverting the PR.

This does mean that [Sandpack in
react.dev](https://github.com/reactjs/react.dev/blob/11cb6b591571caf5fa2a192117b6a6445c3f2027/src/components/MDX/Sandpack/runESLint.tsx#L31)
cannot update to the latest eprh as HermesParser does not appear to be
able to be run in a browser. I discovered this while trying to update
eprh on react.dev last week, but didn't investigate deeply. I'll need to
double check that again to find out more.
2025-10-06 12:43:39 -04:00
lauren 0ee8476112 Merge 8de3085a04 into sapling-pr-archive-poteto 2025-10-06 01:03:11 -04:00
Lauren Tan 8de3085a04 Revert #34719
Adds back HermesParser to eslint-plugin-react-hooks. There are still [external users of Flow](https://github.com/facebook/react/pull/34719#issuecomment-3368137743) using the plugin, so we shouldn't break the plugin for them. However, we still have the problem of double parsing: once from eslint (which we discard) and then another via babel/hermes parser.

In the long run we should investigate a translation layer from estree to babel (or alternatively, update the compiler to take estree as input). For now I am reverting that PR.  This does mean that [Sandpack in react.dev](https://github.com/reactjs/react.dev/blob/11cb6b591571caf5fa2a192117b6a6445c3f2027/src/components/MDX/Sandpack/runESLint.tsx#L31) cannot update to the latest eprh as HermesParser does not appear to be able to be run in a browser. I discovered this while trying to update eprh on react.dev last week, but didn't investigate deeply. I'll need to double check that again to find out more.
2025-10-05 22:02:50 -07:00
lauren c786258422 [eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix #34745. I updated our fixture for eslint-v9 to
include running tsc. I believe there were 2 issues:

1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts
was no longer correct as we updated index.ts to export default instead
of named exports
2. After fixing ^ there was a typescript error which I fixed by making
some small tweaks
2025-10-06 00:53:21 -04:00
Lauren Tan 282b9bb9dc merge commit for archive created by Sapling 2025-10-05 21:20:53 -07:00
Lauren Tan 79c720c473 [eprh] Fix config type not being exported correctly
Another attempt to fix #34745.
2025-10-05 21:20:32 -07:00
lauren ca84eead75 Merge 1e54d0fd45 into sapling-pr-archive-poteto 2025-10-06 00:18:25 -04:00
Lauren Tan 1e54d0fd45 [eprh] Fix config type not being exported correctly
Another attempt to fix #34745.
2025-10-05 21:18:07 -07:00
Sebastian "Sebbie" Silbermann 1be3ce9996 [Fiber] Bail out of diffing wide objects and arrays (#34742) 2025-10-06 01:13:22 +02:00
Ruslan Lesiutin 3b2a398106 [DevTools] Bump version of react-devtools-core for react-devtools (#34740)
This one was overlooked and yarn.lock was not synced.

Related:
- https://github.com/facebook/react/pull/34692
- https://github.com/facebook/react/pull/34723
2025-10-05 13:45:41 +01:00
Ruslan Lesiutin 62ff1e61fc Revert "[DevTools] Always include the root in the timeline and select it by default" (#34739)
Reverts facebook/react#34654
2025-10-05 13:35:07 +01:00
Sebastian Markbåge 0e79784702 [DevTools] Use documentElement to override cmd+F (#34734)
We override Cmd+F to jump to our search input instead of searching
through the HTML. This is ofc critical since our view virtualized.

However, Chrome DevTools installs its own listener on the document as
well (in the bubble phase) so if we prevent it at the document level
it's too late and it ends up stealing the focus instead. If we instead
listen at the documentElement it works as intended.
2025-10-05 13:13:22 +01:00
lauren a2329c10ff [eprh] 6.1.1 changelog (#34726)
Update changelog for 6.1.1
2025-10-03 17:58:06 -04:00
Lauren Tan 2a0ad27d68 merge commit for archive created by Sapling 2025-10-03 17:43:46 -04:00
Lauren Tan 387253d465 [eprh] 6.1.1 changelog
Update changelog for 6.1.1
2025-10-03 17:35:49 -04:00
Ruslan Lesiutin d3f84a433a [DevTools] Bump version for extensions (#34723)
`./scripts/devtools/prepare-release.js` actually does automate the
version bump, but only path / minor ones.
2025-10-03 22:03:48 +01:00