Commit Graph

201 Commits

Author SHA1 Message Date
Ruslan Lesiutin
783e7fcfa3 React DevTools 4.27.6 -> 4.27.7 (#26780)
List of changes:
* DevTools: fix backend activation ([hoxyq](https://github.com/hoxyq) in
[#26779](https://github.com/facebook/react/pull/26779))
* fix[dynamic-scripts-injection]: unregister content scripts before
registration ([hoxyq](https://github.com/hoxyq) in
[#26765](https://github.com/facebook/react/pull/26765))
2023-05-04 18:22:47 +01:00
Ruslan Lesiutin
7f8c501f68 React DevTools 4.27.5 -> 4.27.6 (#26684)
Full list of changes:
* Use .slice() for all substring-ing
([sophiebits](https://github.com/sophiebits) in
[#26677](https://github.com/facebook/react/pull/26677))
* cleanup[devtools]: remove named hooks & profiler changed hook indices
feature flags ([hoxyq](https://github.com/hoxyq) in
[#26635](https://github.com/facebook/react/pull/26635))
* chore[devtools/release-scripts]: update messages / fixed npm view com…
([hoxyq](https://github.com/hoxyq) in
[#26660](https://github.com/facebook/react/pull/26660))
* (patch)[DevTools] bug fix: backend injection logic not working for
undocked devtools window ([mondaychen](https://github.com/mondaychen) in
[#26665](https://github.com/facebook/react/pull/26665))
* use backend manager to support multiple backends in extension
([mondaychen](https://github.com/mondaychen) in
[#26615](https://github.com/facebook/react/pull/26615))
2023-04-20 13:34:25 +01:00
Ruslan Lesiutin
77d3b02e5c React DevTools 4.27.4 -> 4.27.5 (#26637)
Full list of changes (not everything included in changelog):
* refactor[devtools]: copy to clipboard only on frontend side
([hoxyq](https://github.com/hoxyq) in
[#26604](https://github.com/facebook/react/pull/26604))
* Provide icon to edge devtools.
([harrygz889](https://github.com/harrygz889) in
[#26543](https://github.com/facebook/react/pull/26543))
* [BE] move shared types & constants to consolidated locations
([mondaychen](https://github.com/mondaychen) in
[#26572](https://github.com/facebook/react/pull/26572))
* remove backend dependency from the global hook
([mondaychen](https://github.com/mondaychen) in
[#26563](https://github.com/facebook/react/pull/26563))
* Replace deprecated `new-window` with
`webContents.setWindowOpenHandler()`
([Willie-Boy](https://github.com/Willie-Boy) in
[#26559](https://github.com/facebook/react/pull/26559))
* DevTools: Inline references to fiber flags
([acdlite](https://github.com/acdlite) in
[#26542](https://github.com/facebook/react/pull/26542))
* refactor[devtools]: forbid editing class instances in props
([hoxyq](https://github.com/hoxyq) in
[#26522](https://github.com/facebook/react/pull/26522))
* Move update scheduling to microtask
([acdlite](https://github.com/acdlite) in
[#26512](https://github.com/facebook/react/pull/26512))
* Remove unnecessary CIRCLE_CI_API_TOKEN checks
([mondaychen](https://github.com/mondaychen) in
[#26499](https://github.com/facebook/react/pull/26499))
* browser extension: improve script injection logic
([mondaychen](https://github.com/mondaychen) in
[#26492](https://github.com/facebook/react/pull/26492))
* [flow] make Flow suppressions explicit on the error
([kassens](https://github.com/kassens) in
[#26487](https://github.com/facebook/react/pull/26487))
2023-04-17 17:42:02 +01:00
Willie-Boy
60cfeeebe3 [DevTools] Replace deprecated new-window with webContents.setWindowOpenHandler() (#26559)
## Summary

The electron package was recently upgraded from ^11.1.0 to ^23.1.2
(#26337). However, the WebContents `new-window` event – that is used in
the react-devtools project – was deprecated in
[v12.0.0](https://releases.electronjs.org/release/v12.0.0) and removed
in [v22.2.0](https://releases.electronjs.org/release/v22.2.0). The event
was replaced by `webContents.setWindowOpenHandler()`. This PR replaces
the `new-window` event with `webContents.setWindowOpenHandler()`.

## How did you test this change?

I created a simple electron application with similar functionality:

```
const { app, BrowserWindow, shell } = require('electron')

const createWindow = () => {
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600
  })

  mainWindow.webContents.setWindowOpenHandler(({ url }) => {
    shell.openExternal(url)
    return { action: 'deny' }
  })

  mainWindow.loadFile('index.html')
}

app.whenReady().then(() => {
  createWindow()
})
```

---------

Co-authored-by: root <root@DESKTOP-KCGHLB8.localdomain>
2023-04-06 10:02:23 -04:00
Mengdi Chen
3fcf209ea4 React DevTools 4.27.3 -> 4.27.4 (#26470) 2023-03-24 15:45:26 -04:00
Mengdi Chen
bde974ae40 [DevTools] missing file name in package.json (#26469)
resolves
https://github.com/facebook/react/pull/26337#issuecomment-1483004732
2023-03-24 14:45:27 -04:00
Mengdi Chen
8bdf162bcc React DevTools 4.27.2 -> 4.27.3 (#26459)
bump version
2023-03-22 11:20:10 -04:00
Mengdi Chen
aef930314f [DevTools] upgrade electron to latest version & security improvements (#26337)
## Summary

resolves #25667
This PR also resolves several security issues in the standalone app

## How did you test this change?

Tested locally `yarn start` in react-devtools package. Everything works
normal

---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1204123419819195
2023-03-07 22:31:54 -05:00
Mengdi Chen
b073104c26 [DevTools] improve troubleshooting in README (#26235)
## Summary

Improve the README when the elements are not loaded due to Chrome
service worker malfunction
2023-03-03 14:02:21 -05:00
Mengdi Chen
1a49e2d833 remove flow check in electron app.js (#26184)
When we were upgrading flow in
6ddcbd4f96
we added `$FlowFixMe` for some parameters in this file. However, this
file is not compiled at all, and the `:` syntax breaks the code.

This PR removes the flow check in this file
2023-02-17 11:54:43 -05:00
Mengdi Chen
42106558ed React DevTools 4.27.1 -> 4.27.2 (#26185) 2023-02-16 16:46:23 -05:00
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
Mengdi Chen
827cbdbcc6 React DevTools 4.27.0 -> 4.27.1 (#25835)
patch for devtools bug
2022-12-07 12:23:52 -05:00
lushevol
7db45b9a38 fix invalid link to react-devtools-extensions/src/__tests__ (#25816) 2022-12-06 21:21:01 +01:00
Mengdi Chen
f197ca997b React DevTools 4.26.1 -> 4.27.0 (#25753) 2022-11-30 19:14:11 -05:00
Mengdi Chen
6dbccb9249 [DevTools] upgrade to Manifest V3 (#25145)
## Summary

resolves #24522

To upgrade to Manifest V3, one of the biggest issue is that we are no
longer allowed to add a script element with code in textContent so that
it would run synchronously. It's necessary for us because we need to
inject a global hook for react reconciler to detect whether devtools
exist.
To do that, we'll leverage a new API
`chrome.scripting.registerContentScripts` in V3. Particularly, we rely
on the "world" option (added in Chrome v102
[commit](e5ad3451c1))
to run it in the "main world" on the page.

This PR also renames a few content script files so that it's easier to
tell them apart from other extension scripts and understand the purpose
of each of them.

Manifest V3 is not yet ready for Firefox, so we need to keep some code
for compatibility.

## How did you test this change?

`yarn build:chrome && yarn test:chrome`
`yarn build:edge && yarn test:edge`
`yarn build:firefox && yarn test:firefox`
2022-10-21 22:52:18 -04:00
Andrew Clark
9cdf8a99ed [Codemod] Update copyright header to Meta (#25315)
* Facebook -> Meta in copyright

rg --files | xargs sed -i 's#Copyright (c) Facebook, Inc. and its affiliates.#Copyright (c) Meta Platforms, Inc. and affiliates.#g'

* Manual tweaks
2022-10-18 11:19:24 -04:00
Tianyu Yao
44e2ca393e React DevTools 4.26.0 -> 4.26.1 (#25478) 2022-10-14 10:36:52 -07:00
Jan Kassens
64fe791be8 Flow upgrade to 0.146
This upgrade made more expressions invalidate refinements. In some
places this lead to a large number of suppressions that I automatically
suppressed and should be followed up on when the code is touched.
I think most of them might require either manual annotations or moving
a value into a const to allow refinement.

ghstack-source-id: a45b40abf0
Pull Request resolved: https://github.com/facebook/react/pull/25410
2022-10-04 11:01:50 -04:00
Alexandru Tasica
21a851e035 Fix devtools typos and grammar (#24587)
Closes #24587
2022-10-03 10:11:40 -04:00
Sreecharan
8ee4f52989 Fix: Documentation typos (#24471)
* fix: typo

Co-authored-by: Jan Kassens <jkassens@meta.com>
2022-09-29 12:46:53 -04:00
Brandon Chan
b2748907c3 Updated the URL link for serve (#25296) 2022-09-19 13:13:38 -04:00
Tianyu Yao
e099e1dc0e React DevTools 4.25.0 -> 4.26.0 (#25283) 2022-09-16 12:35:00 -07:00
Robert Balicki
4e60dbd905 [easy] Clarify folders in react devtools readme #25077
Clarify the folder from which we run various commands in the react-devtools readme
2022-08-11 19:47:02 -04:00
Mengdi Chen
d54880d424 React DevTools 4.24.7 -> 4.25.0 (#24919) 2022-07-13 15:57:50 -04:00
Luna Ruan
25837acfee React DevTools 4.24.6 -> 4.24.7 (#24646) 2022-05-31 16:16:07 -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
Mengdi "Monday" Chen
adb8ebc927 React DevTools 4.24.2 -> 4.24.3 (#24198) 2022-03-29 14:44:32 -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
Brian Vaughn
d9677e3492 Update CHANGELOG.md 2022-03-15 14:21:21 -04:00
Luna Ruan
ac574d6883 React DevTools 4.24.0 -> 4.24.1 (#24100) 2022-03-15 14:13:00 -04:00
Brian Vaughn
82762bea55 React DevTools 4.23.0 -> 4.24.0 (#24066)
* Revert "React DevTools 4.23.0 -> 4.24.0 (#23400)"

This reverts commit f6c130f614.

* React DevTools 4.23.0 -> 4.24.0

* Added additional, pending bugfixes to CHANGELOG

* Updated DevTools build and release script to fix header format
2022-03-10 13:37:01 -05: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
Brian Vaughn
0e0b1a45fa Show DevTools backend and frontend versions in UI (#23399)
This information can help with bug investigation for renderers (like React Native) that embed the DevTools backend into their source (separately from the DevTools frontend, which gets run by the user).

If the DevTools backend is too old to report a version, or if the version reported is the same as the frontend (as will be the case with the browser extension) then only a single version string will be shown, as before. If a different version is reported, then both will be shown separately.
2022-03-02 12:26:48 -05:00
Brian Vaughn
e28a0db224 React DevTools 4.22.1 -> 4.23.0 2022-01-24 09:29:18 -05:00
Brian Vaughn
5b69c94eed React DevTools 4.22.0 -> 4.22.1 (#22962) 2021-12-14 23:52:50 -05:00
Brian Vaughn
3f45b68141 Re-added deleted files array to react-devtools package.json (#22960) 2021-12-14 23:28:57 -05:00
Brian Vaughn
75d34aa083 Updated DevTools changelog 2021-12-14 16:50:17 -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
3b3daf5573 Advocate for StrictMode usage within Components tree (#22886)
Adds the concept of subtree modes to DevTools to bridge protocol as follows:
1. Add-root messages get two new attributes: one specifying whether the root is running in strict mode and another specifying whether the root (really the root's renderer) supports the concept of strict mode.
2. A new backend message type (TREE_OPERATION_SET_SUBTREE_MODE). This type specifies a subtree root (id) and a mode (bitmask). For now, the only mode this message deals with is strict mode.

The DevTools frontend has been updated as well to highlight non-StrictMode compliant components.

The changes to the bridge protocol require incrementing the bridge protocol version number, which will also require updating the version of react-devtools-core backend that is shipped with React Native.
2021-12-10 11:05:18 -05:00
Mert Ciflikli
200415c91c fix typos (#22288) 2021-11-15 10:59:35 -05: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