Commit Graph

145 Commits

Author SHA1 Message Date
Jan Kassens 6ddcbd4f96
[flow] enable LTI inference mode (#26104)
This is the next generation inference mode for Flow.
2023-02-09 17:07:39 -05:00
Jan Kassens 6b30832666
Upgrade prettier (#26081)
The old version of prettier we were using didn't support the Flow syntax
to access properties in a type using `SomeType['prop']`. This updates
`prettier` and `rollup-plugin-prettier` to the latest versions.

I added the prettier config `arrowParens: "avoid"` to reduce the diff
size as the default has changed in Prettier 2.0. The largest amount of
changes comes from function expressions now having a space. This doesn't
have an option to preserve the old behavior, so we have to update this.
2023-01-31 08:25:05 -05:00
Jan Kassens c49131669b
Remove unused Flow suppressions (#25977)
These suppressions are no longer required.

Generated using:
```sh
flow/tool update-suppressions .
```
followed by adding back 1 or 2 suppressions that were only triggered in
some configurations.
2023-01-10 10:32:42 -05:00
Jan Kassens 0b4f443020
[flow] enable enforce_local_inference_annotations (#25921)
This setting is an incremental path to the next Flow version enforcing
type annotations on most functions (except some inline callbacks).

Used
```
node_modules/.bin/flow codemod annotate-functions-and-classes --write .
```
to add a majority of the types with some hand cleanup when for large
inferred objects that should just be `Fiber` or weird constructs
including `any`.

Suppressed the remaining issues.

Builds on #25918
2023-01-09 15:46:48 -05:00
Mengdi Chen 827cbdbcc6
React DevTools 4.27.0 -> 4.27.1 (#25835)
patch for devtools bug
2022-12-07 12:23:52 -05:00
Mengdi Chen f197ca997b
React DevTools 4.26.1 -> 4.27.0 (#25753) 2022-11-30 19:14:11 -05:00
Tianyu Yao 44e2ca393e
React DevTools 4.26.0 -> 4.26.1 (#25478) 2022-10-14 10:36:52 -07:00
Jan Kassens f02a5f5c79 Flow upgrade to 0.182
ghstack-source-id: b9bb8c1560
Pull Request resolved: https://github.com/facebook/react/pull/25419
2022-10-04 13:37:58 -04:00
Tianyu Yao e099e1dc0e
React DevTools 4.25.0 -> 4.26.0 (#25283) 2022-09-16 12:35:00 -07:00
Jan Kassens ba7b6f4183
Flow: upgrade to 0.132 (#25244) 2022-09-12 14:36:02 -04:00
Jan Kassens 8003ab9cf5
Flow: remove explicit object syntax (#25223) 2022-09-09 16:03:48 -04:00
Konpaku Youmu 3f3b46c845
docs(react-devtools-inline): `react-dom@experimental` instead of `react-dom@experimenal` (#25001) 2022-07-30 10:57:13 +02:00
Mengdi Chen d54880d424
React DevTools 4.24.7 -> 4.25.0 (#24919) 2022-07-13 15:57:50 -04:00
Luna Ruan 254b49e589
Add snapshot testing on e2e test failure (#24672)
We have a currently unreproducible flaky e2e test. This PR captures snapshots on e2e test failures so we can better debug flaky e2e tests that don't fail locally.
2022-06-06 10:36:58 -07:00
Luna Ruan 25837acfee
React DevTools 4.24.6 -> 4.24.7 (#24646) 2022-05-31 16:16:07 -04:00
Luna Ruan 1328ff70cd
[DevTools] Regression-proof e2e Tests (#24620)
This PR:

* Increases test retry count to 2 so that flaky tests have more of a chance to pass
* Ideally most e2e tests will run for all React versions (and ensure DevTools elegantly fails if React doesn't support its features). However, some features aren't supported in older React versions at all (ex. Profiling) Add runOnlyForReactRange function in these cases to skip tests that don't satisfy the correct React semver range
* Fix should allow searching for component by name test, which was flaky because sometimes the Searchbox would be unfocused the second time we try to type in it
* Edited test Should allow elements to be inspected to check that element inspect gracefully fails in older React versions
* Updated config to add a config.use.url field and a config.use.react_version field, which change depending on the React Version (and whether it's specified)
2022-05-25 20:53:44 -04:00
Mengdi "Monday" Chen 52c434be1d
React DevTools 4.24.5 -> 4.24.6 (#24547) 2022-05-12 10:52:55 -04:00
Brian Vaughn 547b707493
React DevTools 4.24.4 -> 4.24.5 (#24503) 2022-05-05 10:19:08 -07:00
Brian Vaughn 5b2e7253f9
React DevTools 4.24.3 -> 4.24.4 (#24315) 2022-04-08 11:38:07 -04:00
Brian Vaughn 65f35035a6
Allow react-devtools-inline createStore() method to override Store config params (#24303) 2022-04-08 08:59:12 -04:00
Mengdi "Monday" Chen adb8ebc927
React DevTools 4.24.2 -> 4.24.3 (#24198) 2022-03-29 14:44:32 -04:00
Mengdi "Monday" Chen 1159ff6193
Add details in READMEs for react-devtools local developement (#24148)
* Add details in READMEs for react-devtools local developement

* typo

* update yarn for release script
2022-03-24 10:04:12 -04:00
Brian Vaughn 8df8a57edd
React DevTools 4.24.1 -> 4.24.2 (#24150) 2022-03-24 09:06:10 -04:00
Brian Vaughn 8fce116998
Update DevTools READMEs (#24105) 2022-03-16 11:37:10 -04:00
Luna Ruan ac574d6883
React DevTools 4.24.0 -> 4.24.1 (#24100) 2022-03-15 14:13:00 -04:00
Brian Vaughn f6c130f614
React DevTools 4.23.0 -> 4.24.0 (#23400)
* React DevTools 4.23.0 -> 4.24.0

* Fixed CHANGELOG header format

* Add separator line beween header version numbers
2022-03-02 13:28:42 -05:00
Sebastian Markbåge 17806594cc
Move createRoot/hydrateRoot to react-dom/client (#23385)
* Move createRoot/hydrateRoot to /client

We want these APIs ideally to be imported separately from things you
might use in arbitrary components (like flushSync). Those other methods
are "isomorphic" to how the ReactDOM tree is rendered. Similar to hooks.

E.g. importing flushSync into a component that only uses it on the client
should ideally not also pull in the entry client implementation on the
server.

This also creates a nicer parity with /server where the roots are in a
separate entry point.

Unfortunately, I can't quite do this yet because we have some legacy APIs
that we plan on removing (like findDOMNode) and we also haven't implemented
flushSync using a flag like startTransition does yet.

Another problem is that we currently encourage these APIs to be aliased by
/profiling (or unstable_testing). In the future you don't have to alias
them because you can just change your roots to just import those APIs and
they'll still work with the isomorphic forms. Although we might also just
use export conditions for them.

For that all to work, I went with a different strategy for now where the
real API is in / but it comes with a warning if you use it. If you instead
import /client it disables the warning in a wrapper. That means that if you
alias / then import /client that will inturn import the alias and it'll
just work.

In a future breaking changes (likely when we switch to ESM) we can just
remove createRoot/hydrateRoot from / and move away from the aliasing
strategy.

* Update tests to import from react-dom/client

* Fix fixtures

* Update warnings

* Add test for the warning

* Update devtools

* Change order of react-dom, react-dom/client alias

I think the order matters here. The first one takes precedence.

* Require react-dom through client so it can be aliased

Co-authored-by: Andrew Clark <git@andrewclark.io>
2022-03-01 00:13:28 -05:00
Sebastian Markbåge 0dedfcc681
Update the exports field (#23257)
* Add .browser and .node explicit entry points

This can be useful when the automatic selection doesn't work properly.

* Remove react/index

I'm not sure why I added this in the first place. Perhaps due to how our
builds work somehow.

* Remove build-info.json from files field
2022-02-08 21:07:26 -05:00
Brian Vaughn e28a0db224 React DevTools 4.22.1 -> 4.23.0 2022-01-24 09:29:18 -05:00
BIKI DAS 20212349ad
Fix variable name (#23021) 2021-12-23 08:35:54 -05:00
Brian Vaughn a4ead704ba
Use ReactDOM Test Selector API in DevTools e2e tests (#22978)
Builds on top of the existing Playwright tests to plug in the test selector API: https://gist.github.com/bvaughn/d3c8b8842faf2ac2439bb11773a19cec

My goals in doing this are to...
1. Experiment with the new API to see what works and what doesn't.
2. Add some test selector attributes (and remove DOM-structure based selectors).
3. Focus the tests on DevTools itself (rather than the test app).

I also took this opportunity to add a few new test cases– like named hooks, editable props, component search, and profiling- just to play around more with the Playwright API.

Relates to issue #22646
2021-12-21 11:58:04 -05:00
Brian Vaughn aa8f2bdbce
Refactored DevTools test shell for e2e (#22968)
Fixes a regression in the e2e target and makes things easier (hopefully) going forward when adding new e2e tests.
2021-12-15 11:42:59 -05:00
Brian Vaughn e59233aa85
react-devtools-inline README updates (#22967) 2021-12-15 10:44:14 -05:00
Brian Vaughn 5b69c94eed
React DevTools 4.22.0 -> 4.22.1 (#22962) 2021-12-14 23:52:50 -05:00
Brian Vaughn b10c378024
Revert changes to react-devtools-inline Webpack config from PR #22760 (#22961) 2021-12-14 23:45:46 -05:00
jstejada 0229baee21
React DevTools 4.21.0 -> 4.22.0 (#22951) 2021-12-14 14:19:21 -05:00
Brian Vaughn 911f92a44d
DevTools: Support mulitple DevTools instances per page (#22949)
This is being done so that we can embed DevTools within the new React (beta) docs.

The primary changes here are to `react-devtools-inline/backend`:
* Add a new `createBridge` API
* Add an option to the `activate` method to support passing in the custom bridge object.

The `react-devtools-inline` README has been updated to include these new methods.

To verify these changes, this commit also updates the test shell to add a new entry-point for multiple DevTools.

This commit also replaces two direct calls to `window.postMessage()` with `bridge.send()` (and adds the related Flow types).
2021-12-14 12:16:16 -05:00
Brian Vaughn aa19d569b2
Add test selectors to experimental build (#22760)
This change adds a new "react-dom/unstable_testing" entry point but I believe its contents will exactly match "react-dom/index" for the stable build. (The experimental build will have the added new selector APIs.)
2021-11-16 16:27:10 -05:00
Abhay Gupta ee8f146a61
Proof of Concept for E2E tests using playwright (#22754) 2021-11-15 16:44:45 -05:00
Mert Ciflikli 200415c91c
fix typos (#22288) 2021-11-15 10:59:35 -05:00
Brian Vaughn 13455d26d1
Cleaned up remaining "scheduling profiler" references in DevTools (#22696) 2021-11-04 11:40:45 -04:00
EzzAk 255221c869
[DevTools] Add open in editor for fb (#22649)
Co-authored-by: Brian Vaughn <bvaughn@fb.com>
2021-11-03 11:27:30 -04:00
Abhay Gupta 3fcd81dd1c
Improved workers filenames in devtools-inline (#22676) 2021-11-02 10:30:37 -04:00
Juan 6c7ef3fce5
React DevTools 4.20.2 -> 4.21.0 (#22661) 2021-10-31 19:19:02 -04:00
Juan c213030b49
React DevTools 4.20.1 -> 4.20.2 (#22605) 2021-10-20 16:00:13 -04:00
Juan b81de86332
React DevTools 4.20.0 -> 4.20.1 (#22583) 2021-10-19 10:55:39 -04:00
Juan e5f486b5a8
React DevTools 4.19.2 -> 4.20.2 (#22569) 2021-10-15 12:50:17 -04:00
Brian Vaughn 20ca9b565a React DevTools 4.19.1 -> 4.19.2 2021-10-08 13:51:25 -04:00
Brian Vaughn bdd6d5064d
React DevTools 4.19.0 -> 4.19.1 (#22480) 2021-10-01 11:50:05 -04:00
Luna Ruan 0883c4cd3a
React DevTools 4.18.0 -> 4.19.0 (#22461) 2021-09-29 12:06:13 -04:00