Justin Dhillon
034130c02f
Fix Broken Links In Documentation ( #28321 )
...
## Summary
I used [link-inspector](https://github.com/justindhillon/link-inspector )
to find a bunch of broken links in this projects documentation. Here is
what I fixed:
https://www.html5rocks.com/en/tutorials/canvas/hidpi/ -->
https://web.dev/articles/canvas-hidipi
https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
--> https://www.w3.org/TR/custom-elements/
https://github.com/facebookarchive/fixed-data-table/blob/main/src/vendor_upstream/dom/normalizeWheel.js
-->
https://github.com/facebookarchive/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js
https://upload.wikimedia.org/wikipedia/commons/e/ee/Atom_%282%29.png -->
https://upload.wikimedia.org/wikipedia/commons/1/1b/Atom.png
## Support my work
I used [link-inspector](https://github.com/justindhillon/link-inspector )
to find and fix this issue. If you find this PR useful, give the repo a
⭐
2024-03-03 17:44:27 -05:00
Ruslan Lesiutin
288cf747c9
React DevTools 5.0.0 -> 5.0.1 ( #28418 )
...
Full list of changes (not a public CHANGELOG):
* feature[REMOVED][devtools]: turn off / hide location based component
filters ([hoxyq](https://github.com/hoxyq ) in
[#28417 ](https://github.com/facebook/react/pull/28417 ))
* Add useSyncExternalStore and useTransition to getPrimitiveStackCache
([jamesbvaughan](https://github.com/jamesbvaughan ) in
[#28399 ](https://github.com/facebook/react/pull/28399 ))
* chore[devtools]: use react-window from npm and bump
react-virtualized-auto-sizer to ^1.0.23
([hoxyq](https://github.com/hoxyq ) in
[#28408 ](https://github.com/facebook/react/pull/28408 ))
* Pass ref as normal prop ([acdlite](https://github.com/acdlite ) in
[#28348 ](https://github.com/facebook/react/pull/28348 ))
* Combine createElement and JSX modules
([acdlite](https://github.com/acdlite ) in
[#28320 ](https://github.com/facebook/react/pull/28320 ))
* [Debug Tools] Always use includeHooksSource option
([sebmarkbage](https://github.com/sebmarkbage ) in
[#28309 ](https://github.com/facebook/react/pull/28309 ))
* Revert "[Tests] Reset modules by default"
([acdlite](https://github.com/acdlite ) in
[#28318 ](https://github.com/facebook/react/pull/28318 ))
* Switch <Context> to mean <Context.Provider>
([gaearon](https://github.com/gaearon ) in
[#28226 ](https://github.com/facebook/react/pull/28226 ))
* [Debug Tools] Introspect Promises in use()
([sebmarkbage](https://github.com/sebmarkbage ) in
[#28297 ](https://github.com/facebook/react/pull/28297 ))
* fix[devtools/useModalDismissSignal]: use getRootNode for shadow root
case support ([hoxyq](https://github.com/hoxyq ) in
[#28145 ](https://github.com/facebook/react/pull/28145 ))
* fix: define IS_ACT_ENVIRONMENT global for tests with concurrent mode
and synchronous act ([hoxyq](https://github.com/hoxyq ) in
[#28296 ](https://github.com/facebook/react/pull/28296 ))
* chore: gate legacy apis for react-devtools-shell
([hoxyq](https://github.com/hoxyq ) in
[#28273 ](https://github.com/facebook/react/pull/28273 ))
* DevTools: Add support for use(Context)
([eps1lon](https://github.com/eps1lon ) in
[#28233 ](https://github.com/facebook/react/pull/28233 ))
* Remove __self and __source location from elements
([sebmarkbage](https://github.com/sebmarkbage ) in
[#28265 ](https://github.com/facebook/react/pull/28265 ))
* chore: use versioned render in inspectedElement test
([hoxyq](https://github.com/hoxyq ) in
[#28246 ](https://github.com/facebook/react/pull/28246 ))
* chore: use versioned render in TimelineProfiler test and gate some for
legacy rendering ([hoxyq](https://github.com/hoxyq ) in
[#28218 ](https://github.com/facebook/react/pull/28218 ))
* [Tests] Reset modules by default
([rickhanlonii](https://github.com/rickhanlonii ) in
[#28254 ](https://github.com/facebook/react/pull/28254 ))
* chore: use versioned render in preprocessData test and gate some for …
([hoxyq](https://github.com/hoxyq ) in
[#28219 ](https://github.com/facebook/react/pull/28219 ))
* chore: use versioned render in storeStressSync test and gate them for
legacy rendering ([hoxyq](https://github.com/hoxyq ) in
[#28216 ](https://github.com/facebook/react/pull/28216 ))
* Patch devtools before running useMemo function in strict mode
([gsathya](https://github.com/gsathya ) in
[#28249 ](https://github.com/facebook/react/pull/28249 ))
* chore: use versioned render in storeComponentFilters test
([hoxyq](https://github.com/hoxyq ) in
[#28241 ](https://github.com/facebook/react/pull/28241 ))
* chore: use versioned render in profilerContext test
([hoxyq](https://github.com/hoxyq ) in
[#28243 ](https://github.com/facebook/react/pull/28243 ))
* chore: use versioned render in profilingCommitTreeBuilder test and
gate some for legacy rendering ([hoxyq](https://github.com/hoxyq ) in
[#28236 ](https://github.com/facebook/react/pull/28236 ))
* chore: use versioned render in profilingHostRoot test and gate some
for legacy rendering ([hoxyq](https://github.com/hoxyq ) in
[#28237 ](https://github.com/facebook/react/pull/28237 ))
* chore: use versioned render in profilingCache test
([hoxyq](https://github.com/hoxyq ) in
[#28242 ](https://github.com/facebook/react/pull/28242 ))
* chore: use versioned render in ownersListContext test
([hoxyq](https://github.com/hoxyq ) in
[#28240 ](https://github.com/facebook/react/pull/28240 ))
* chore: use versioned render in editing test
([hoxyq](https://github.com/hoxyq ) in
[#28239 ](https://github.com/facebook/react/pull/28239 ))
* chore: use versioned render in treeContext test
([hoxyq](https://github.com/hoxyq ) in
[#28245 ](https://github.com/facebook/react/pull/28245 ))
* chore: use versioned render in store test
([hoxyq](https://github.com/hoxyq ) in
[#28244 ](https://github.com/facebook/react/pull/28244 ))
* chore: use versioned render in profilerStore test
([hoxyq](https://github.com/hoxyq ) in
[#28238 ](https://github.com/facebook/react/pull/28238 ))
* chore: use versioned render in profilingCharts test
([hoxyq](https://github.com/hoxyq ) in
[#28235 ](https://github.com/facebook/react/pull/28235 ))
* chore: use versioned render in profilerChangeDescriptions test
([hoxyq](https://github.com/hoxyq ) in
[#28221 ](https://github.com/facebook/react/pull/28221 ))
* chore: use versioned render in storeOwners test
([hoxyq](https://github.com/hoxyq ) in
[#28215 ](https://github.com/facebook/react/pull/28215 ))
* chore: use versioned render in componentStacks test
([hoxyq](https://github.com/hoxyq ) in
[#28214 ](https://github.com/facebook/react/pull/28214 ))
* chore: use versioned render in console test
([hoxyq](https://github.com/hoxyq ) in
[#28213 ](https://github.com/facebook/react/pull/28213 ))
* chore: use versioned render in useEditableValue test
([hoxyq](https://github.com/hoxyq ) in
[#28212 ](https://github.com/facebook/react/pull/28212 ))
* chore: use versioned render in FastRefreshDevToolsIntegration test
([hoxyq](https://github.com/hoxyq ) in
[#28211 ](https://github.com/facebook/react/pull/28211 ))
* chore: add versioned render implementation for DevTools tests
([hoxyq](https://github.com/hoxyq ) in
[#28210 ](https://github.com/facebook/react/pull/28210 ))
* chore: add single versioned implementation of act for DevTools tests
([hoxyq](https://github.com/hoxyq ) in
[#28186 ](https://github.com/facebook/react/pull/28186 ))
* DevTools: Add support for useFormState
([eps1lon](https://github.com/eps1lon ) in
[#28232 ](https://github.com/facebook/react/pull/28232 ))
* DevTools: Add support for useOptimistic Hook
([eps1lon](https://github.com/eps1lon ) in
[#27982 ](https://github.com/facebook/react/pull/27982 ))
* Add stable React.act export ([acdlite](https://github.com/acdlite ) in
[#28160 ](https://github.com/facebook/react/pull/28160 ))
* [flow] upgrade to 0.225.1 ([kassens](https://github.com/kassens ) in
[#27871 ](https://github.com/facebook/react/pull/27871 ))
* fix[devtools/e2e]: add fallback for act in integration tests
([hoxyq](https://github.com/hoxyq ) in
[#27842 ](https://github.com/facebook/react/pull/27842 ))
* Add stable concurrent option to react-test-renderer
([jackpope](https://github.com/jackpope ) in
[#27804 ](https://github.com/facebook/react/pull/27804 ))
* Update act references in tests ([gnoff](https://github.com/gnoff ) in
[#27805 ](https://github.com/facebook/react/pull/27805 ))
* Flow: make more objects exact ([kassens](https://github.com/kassens )
in [#27790 ](https://github.com/facebook/react/pull/27790 ))
2024-02-22 19:45:55 +00:00
Ruslan Lesiutin
404ed92658
chore[devtools]: use react-window from npm and bump react-virtualized-auto-sizer to ^1.0.23 ( #28408 )
...
1. Bumps `react-virtualized-auto-sizer` to 1.0.23, which has a fix for
cases with multiple realms -
https://github.com/bvaughn/react-virtualized-auto-sizer/pull/82
2. Removes `react-window` from react-devtools-shared/src/node_modules,
now listed as dependency in `package.json` and bumped to 1.8.10
Tested:
- Chrome extension
- Standalone shell with RN
2024-02-22 11:31:10 +00:00
Ruslan Lesiutin
87cb0bf182
React DevTools 4.28.5 -> 5.0.0 ( #27759 )
...
### Breaking
* refactor[devtools]: highlight an array of elements for native
([hoxyq](https://github.com/hoxyq ) in
[#27734 ](https://github.com/facebook/react/pull/27734 ))
### Features
* feat[devtools]: display Forget badge for the relevant components
([hoxyq](https://github.com/hoxyq ) in
[#27709 ](https://github.com/facebook/react/pull/27709 ))
### Other
* Added windows powershell syntax to build scripts
([PrathamLalwani](https://github.com/PrathamLalwani ) in
[#27692 ](https://github.com/facebook/react/pull/27692 ))
* refactor[react-devtools-shared]: minor parsing improvements and
modifications ([hoxyq](https://github.com/hoxyq ) in
[#27661 ](https://github.com/facebook/react/pull/27661 ))
2023-11-29 18:27:53 +00:00
Ruslan Lesiutin
20c91b6534
React DevTools 4.28.4 -> 4.28.5 ( #27538 )
...
Changes:
* fix[devtools/useMemoCache]: add stub for useMemoCache in
ReactDebugHook ([hoxyq](https://github.com/hoxyq ) in
[#27472 ](https://github.com/facebook/react/pull/27472 ))
* useDeferredValue should skip initialValue if it suspends
([acdlite](https://github.com/acdlite ) in
[#27509 ](https://github.com/facebook/react/pull/27509 ))
* feat[react-devtools-extensions/logging]: initialize session id on the
client for logging ([hoxyq](https://github.com/hoxyq ) in
[#27517 ](https://github.com/facebook/react/pull/27517 ))
* refactor[react-devtools-extensions]: use globals to eliminate dead
code ([hoxyq](https://github.com/hoxyq ) in
[#27516 ](https://github.com/facebook/react/pull/27516 ))
* fix[devtools/inspectElement]: dont pause initial inspectElement call
when user switches tabs ([hoxyq](https://github.com/hoxyq ) in
[#27488 ](https://github.com/facebook/react/pull/27488 ))
2023-10-18 14:08:23 +01:00
Ruslan Lesiutin
94d5b5b2bf
React DevTools 4.28.3 -> 4.28.4 ( #27419 )
...
* refactor[devtools/extension]: refactored messaging logic across
different parts of the extension ([hoxyq](https://github.com/hoxyq ) in
[#27417 ](https://github.com/facebook/react/pull/27417 ))
* fix[devtools/extension]: added a workaround for proxy content script
injection in firefox ([hoxyq](https://github.com/hoxyq ) in
[#27375 ](https://github.com/facebook/react/pull/27375 ))
* fix[devtools/useTransition]: don't check for dispatch property when
determining if hook is stateful ([hoxyq](https://github.com/hoxyq ) in
[#27365 ](https://github.com/facebook/react/pull/27365 ))
* feat[devtools/extension]: show disclaimer when page doesnt run react
and refactor react polling logic ([hoxyq](https://github.com/hoxyq ) in
[#27373 ](https://github.com/facebook/react/pull/27373 ))
* feat:-Added a delete all filters action and added title to the add
filter a… ([Biki-das](https://github.com/Biki-das ) in
[#27332 ](https://github.com/facebook/react/pull/27332 ))
* fix[devtools/extension]: unregister dynamically injected content
scripts instead of filtering ([hoxyq](https://github.com/hoxyq ) in
[#27369 ](https://github.com/facebook/react/pull/27369 ))
* refactor[devtools/extension]: more stable element updates polling to
avoid timed out errors ([hoxyq](https://github.com/hoxyq ) in
[#27357 ](https://github.com/facebook/react/pull/27357 ))
* feat[devtools/extension]: add dark theme for popup
([rakleed](https://github.com/rakleed ) in
[#27330 ](https://github.com/facebook/react/pull/27330 ))
2023-09-25 13:24:52 -04:00
Ruslan Lesiutin
a374287fea
React DevTools 4.28.2 -> 4.28.3 ( #27337 )
...
This is a patch version to fix some bugs in a previous internal release.
I am expecting this one also to be internal-only, need to make sure that
extension is stable in Chrome. Some changes and improvements are
expected for Firefox, though, before going public.
* refactor[devtools/extension]: handle ports disconnection, instead of
frequent reconnection ([hoxyq](https://github.com/hoxyq ) in
[#27336 ](https://github.com/facebook/react/pull/27336 ))
* refactor[devtools/extension]: migrate from using setInterval for
polling if react is loaded ([hoxyq](https://github.com/hoxyq ) in
[#27323 ](https://github.com/facebook/react/pull/27323 ))
* fix[devtools/extension]: fixed duplicating panels in firefox
([hoxyq](https://github.com/hoxyq ) in
[#27320 ](https://github.com/facebook/react/pull/27320 ))
2023-09-05 18:58:27 +01:00
Ruslan Lesiutin
3808b01b3a
React DevTools 4.28.1 -> 4.28.2 ( #27318 )
...
List of changes:
* fix[devtools/extension]: handle tab navigation events before react is
loaded ([hoxyq](https://github.com/hoxyq ) in
[#27316 ](https://github.com/facebook/react/pull/27316 ))
2023-08-30 19:47:08 +01:00
Ruslan Lesiutin
2f368725fb
React DevTools 4.28.0 -> 4.28.1 ( #27305 )
...
List of changes:
* refactor: refactored devtools browser extension scripts to improve
port management and service worker lifetime
([hoxyq](https://github.com/hoxyq ) in
[#27215 ](https://github.com/facebook/react/pull/27215 ))
* refactor[devtools/extension]: minify production builds to strip
comments ([hoxyq](https://github.com/hoxyq ) in
[#27304 ](https://github.com/facebook/react/pull/27304 ))
* fix[devtools]: allow element updates polling only if bridge is alive
([hoxyq](https://github.com/hoxyq ) in
[#27067 ](https://github.com/facebook/react/pull/27067 ))
* refactor: resolve browser via env variables based on build rather than
user agent ([hoxyq](https://github.com/hoxyq ) in
[#27179 ](https://github.com/facebook/react/pull/27179 ))
* fix[devtools/updateFiberRecursively]: mount suspense fallback set in
timed out case ([hoxyq](https://github.com/hoxyq ) in
[#27147 ](https://github.com/facebook/react/pull/27147 ))
* Feat:-Added open in editor to appear by default
([Biki-das](https://github.com/Biki-das ) in
[#26949 ](https://github.com/facebook/react/pull/26949 ))
* fix[devtools/inspect]: null check memoized props before trying to call
hasOwnProperty ([hoxyq](https://github.com/hoxyq ) in
[#27057 ](https://github.com/facebook/react/pull/27057 ))
* rename SuspenseList export to unstable_SuspenseList
([noahlemen](https://github.com/noahlemen ) in
[#27061 ](https://github.com/facebook/react/pull/27061 ))
2023-08-29 13:37:35 +01:00
Ruslan Lesiutin
035a41c4e2
React DevTools 4.27.8 -> 4.28.0 ( #27051 )
...
List of changes:
* Devtools:-Removed unused CSS ([Biki-das](https://github.com/Biki-das )
in [#27032 ](https://github.com/facebook/react/pull/27032 ))
* fix[devtools/profilingCache-test]: specify correct version gate for
test ([hoxyq](https://github.com/hoxyq ) in
[#27008 ](https://github.com/facebook/react/pull/27008 ))
* fix[devtools/ci]: fixed incorrect condition calculation for
@reactVersion annotation ([hoxyq](https://github.com/hoxyq ) in
[#26997 ](https://github.com/facebook/react/pull/26997 ))
* fix[ci]: fixed jest configuration not to skip too many devtools tests
([hoxyq](https://github.com/hoxyq ) in
[#26955 ](https://github.com/facebook/react/pull/26955 ))
* fix[devtools/standalone]: update webpack configurations
([hoxyq](https://github.com/hoxyq ) in
[#26963 ](https://github.com/facebook/react/pull/26963 ))
* fix[devtools]: check if fiber is unmounted before trying to highlight
([hoxyq](https://github.com/hoxyq ) in
[#26983 ](https://github.com/facebook/react/pull/26983 ))
* feat[devtools]: support x_google_ignoreList source maps extension
([hoxyq](https://github.com/hoxyq ) in
[#26951 ](https://github.com/facebook/react/pull/26951 ))
* chore[devtools]: upgrade to webpack v5
([hoxyq](https://github.com/hoxyq ) in
[#26887 ](https://github.com/facebook/react/pull/26887 ))
* fix[devtools]: display NaN as string in values
([hoxyq](https://github.com/hoxyq ) in
[#26947 ](https://github.com/facebook/react/pull/26947 ))
* fix: devtools cannot be closed correctly
([Jack-Works](https://github.com/Jack-Works ) in
[#25510 ](https://github.com/facebook/react/pull/25510 ))
* Fix:- Fixed dev tools inspect mode on Shadow dom
([Biki-das](https://github.com/Biki-das ) in
[#26888 ](https://github.com/facebook/react/pull/26888 ))
* Updated copyright text to Copyright (c) Meta Platforms, Inc. and its …
([denmo530](https://github.com/denmo530 ) in
[#26830 ](https://github.com/facebook/react/pull/26830 ))
* Fix strict mode badge URL ([ibrahemid](https://github.com/ibrahemid )
in [#26825 ](https://github.com/facebook/react/pull/26825 ))
2023-07-04 09:11:14 +01:00
BIKI DAS
53ac219378
Devtools:-Removed unused CSS ( #27032 )
...
I tried to check out for the CSS bundle using the
[eslint-plugin-css-modules](https://www.npmjs.com/package/eslint-plugin-css-modules ),
and ran it locally , seems like There are lot of unused styles and
classes present .
I have attached the output below after running the lint command.
https://gist.github.com/Biki-das/647ceb7383b43cca9c8619e1dc33fe0d
All the shared.css files should not be touched i feel as they are being
used randomly by some file
Thoughts @hoxyq
2023-07-03 12:16:04 +01:00
Ruslan Lesiutin
4ddc019aca
chore[devtools]: upgrade to webpack v5 ( #26887 )
...
## Summary
- Updated `webpack` (and all related packages) to v5 in
`react-devtools-*` packages.
- I haven't touched any `TODO (Webpack 5)`. Tried to poke it, but each
my attempt failed and parsing hook names feature stopped working. I will
work on this in a separate PR.
- This work is one of prerequisites for updating Firefox extension to
manifests v3
related PRs:
https://github.com/facebook/react/pull/22267
https://github.com/facebook/react/pull/26506
## How did you test this change?
Tested on all surfaces, explicitly checked that parsing hook names
feature still works.
2023-06-14 13:15:52 +01:00
Ruslan Lesiutin
2468a87358
React DevTools 4.27.7 -> 4.27.8 ( #26823 )
...
Closes https://github.com/facebook/react/issues/26787 ,
https://github.com/facebook/react/issues/26793
Includes these changes:
* fix[devtools]: fixed duplicated backend activation with multiple
renderers ([hoxyq](https://github.com/hoxyq ) in
[#26807 ](https://github.com/facebook/react/pull/26807 ))
2023-05-17 11:40:50 +01:00
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
Sophie Alpert
767f52237c
Use .slice() for all substring-ing ( #26677 )
...
- substr is Annex B
- substring silently flips its arguments if they're in the "wrong order", which is confusing
- slice is better than sliced bread (no pun intended) and also it works the same way on Arrays so there's less to remember
---
> I'd be down to just lint and enforce a single form just for the potential compression savings by using a repeated string.
_Originally posted by @sebmarkbage in https://github.com/facebook/react/pull/26663#discussion_r1170455401_
2023-04-19 14:26:01 -07: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
Mengdi Chen
451736b557
[DevTools][BE] move shared types & constants to consolidated locations ( #26572 )
...
## Summary
This pull request aims to improve the maintainability of the codebase by
consolidating types and constants that are shared between the backend
and frontend. This consolidation will allow us to maintain backwards
compatibility in the frontend in the future.
To achieve this, we have moved the shared types and constants to the
following blessed files:
- react-devtools-shared/src/constants
- react-devtools-shared/src/types
- react-devtools-shared/src/backend/types
- react-devtools-shared/src/backend/NativeStyleEditor/types
Please note that the inclusion of NativeStyleEditor in this list is
temporary, and we plan to remove it once we have a better plugin system
in place.
## How did you test this change?
I have tested it by running `yarn flow dom-node`, which reports no
errors.
2023-04-10 17:07:05 -04:00
Jan Kassens
afea1d0c53
[flow] make Flow suppressions explicit on the error ( #26487 )
...
Added an explicit type to all $FlowFixMe suppressions to reduce
over-suppressions of new errors that might be caused on the same lines.
Also removes suppressions that aren't used (e.g. in a `@noflow` file as
they're purely misleading)
Test Plan:
yarn flow-ci
2023-03-27 13:43:04 +02:00
Mengdi Chen
3fcf209ea4
React DevTools 4.27.3 -> 4.27.4 ( #26470 )
2023-03-24 15:45:26 -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
42106558ed
React DevTools 4.27.1 -> 4.27.2 ( #26185 )
2023-02-16 16:46:23 -05:00
Ming Ye
55542bc73d
Update jest printBasicPrototype config ( #26142 )
2023-02-10 09:58:57 +01: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
Jan Kassens
e2424f33b3
[flow] enable exact_empty_objects ( #25973 )
...
This enables the "exact_empty_objects" setting for Flow which makes
empty objects exact instead of building up the type as properties are
added in code below. This is in preparation to Flow 191 which makes this
the default and removes the config.
More about the change in the Flow blog
[here](https://medium.com/flow-type/improved-handling-of-the-empty-object-in-flow-ead91887e40c ).
2023-01-09 17:00:36 -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
Jan Kassens
2b1fb91a55
ESLint upgrade to use hermes-eslint ( #25915 )
...
Hermes parser is the preferred parser for Flow code going forward. We
need to upgrade to this parser to support new Flow syntax like function
`this` context type annotations or `ObjectType['prop']` syntax.
Unfortunately, there's quite a few upgrades here to make it work somehow
(dependencies between the changes)
- ~Upgrade `eslint` to `8.*`~ reverted this as the React eslint plugin
tests depend on the older version and there's a [yarn
bug](https://github.com/yarnpkg/yarn/issues/6285 ) that prevents
`devDependencies` and `peerDependencies` to different versions.
- Remove `eslint-config-fbjs` preset dependency and inline the rules,
imho this makes it a lot clearer what the rules are.
- Remove the turned off `jsx-a11y/*` rules and it's dependency instead
of inlining those from the `fbjs` config.
- Update parser and dependency from `babel-eslint` to `hermes-eslint`.
- `ft-flow/no-unused-expressions` rule replaces `no-unused-expressions`
which now allows standalone type asserts, e.g. `(foo: number);`
- Bunch of globals added to the eslint config
- Disabled `no-redeclare`, seems like the eslint upgrade started making
this more precise and warn against re-defined globals like
`__EXPERIMENTAL__` (in rollup scripts) or `fetch` (when importing fetch
from node-fetch).
- Minor lint fixes like duplicate keys in objects.
2022-12-20 14:27:01 -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
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
c0dedance
9fb581c7cc
Refactor: merge duplicate imports ( #25489 )
...
Co-authored-by: Jan Kassens <jan@kassens.net >
2022-10-16 21:58:58 -04:00
Tianyu Yao
44e2ca393e
React DevTools 4.26.0 -> 4.26.1 ( #25478 )
2022-10-14 10:36:52 -07:00
Jan Kassens
ea04a486a7
Flow: remove unused suppressions ( #25424 )
...
Removes $FlowFixMe's that are no longer needed.
Used flow/tool from the Flow repo:
```
~/Developer/flow/tool update-suppressions .
```
2022-10-04 16:18:12 -04:00
Jan Kassens
3b6826ed9e
Flow: inference_mode=constrain_writes
...
This mode is going to be the new default in Flow going forward.
There was an unfortuante large number of suppressions in this update.
More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190 ).
Added some of the required annotations using the provided codemod:
```sh
node_modules/.bin/flow codemod annotate-declarations --write .
```
ghstack-source-id: 0b168e1b23
Pull Request resolved: https://github.com/facebook/react/pull/25422
2022-10-04 15:49:48 -04:00
Jan Kassens
1089faf0d8
Flow: run codemod to remove existential type
...
The existential type `*` was deprecated and a codemod provided to replace it. Ran that and did some manual fixups:
```sh
node_modules/.bin/flow codemod replace-existentials --write .
```
ghstack-source-id: 4c98b8db6a
Pull Request resolved: https://github.com/facebook/react/pull/25416
2022-10-04 13:37:58 -04:00
Jan Kassens
9f8a98a390
Flow upgrade to 0.153
...
- method unbinding is no longer supported in Flow for soundness, this added a bunch of suppressions
- Flow now prevents objects to be supertypes of interfaces/classes
ghstack-source-id: d7749cbad8
Pull Request resolved: https://github.com/facebook/react/pull/25412
2022-10-04 11:30:06 -04:00
Tianyu Yao
e099e1dc0e
React DevTools 4.25.0 -> 4.26.0 ( #25283 )
2022-09-16 12:35:00 -07:00
Jan Kassens
fc16293f3f
Flow: well_formed_exports for devtools ( #25266 )
2022-09-15 16:45:29 -04:00
Jan Kassens
e6a062bd2a
Flow: add simple explicit export types to Devtools ( #25251 )
2022-09-13 12:03:20 -04:00
Jan Kassens
8003ab9cf5
Flow: remove explicit object syntax ( #25223 )
2022-09-09 16:03:48 -04:00
Jan Kassens
8a9e7b6cef
Flow: implicit-inexact-object=error ( #25210 )
...
* implicit-inexact-object=error
* default everything ambiguous to exact object
* inexact where exact causes errors
2022-09-09 10:13:58 -04:00
Mengdi Chen
d54880d424
React DevTools 4.24.7 -> 4.25.0 ( #24919 )
2022-07-13 15:57:50 -04:00
Luna Ruan
4e1fcfa771
[DevTools] Resign Timeline Profiler Sidebar ( #24816 )
...
This PR:
* Redesigned the sidebar to resemble the flamegraph profiler sidebar and added title and timestamp to the sidebar
* Added ability to copy the component stack (for places where you're unable to link to source)
https://user-images.githubusercontent.com/2735514/176564897-5301d6d4-429a-4ea3-86cd-74427cff4ce6.mov
2022-06-29 17:54:06 -07:00
Luna Ruan
1974d08c93
[DevTools] Fix Bugs With Component Stacks ( #24815 )
...
This PR:
* Simplifies the code in `SidebarEventInfo` by passing it the actual clicked event rather than an index.
* Lightly refactored the `SidebarEventInfo` code so that it can be used for more than just `schedulingEvents`
* Fixes bug. Previously, whenever a state update event was clicked, we updated the `selectedCommitIndex` in the `ProfilerContext`. However, this index is used for the selected commit in the Flamegraph profiler, which caused a bug where if you would change the contents of the event sidebar, the commit sidebar in the Flamegraph profiler would change too. This PR replaces this with the actual event info instead
2022-06-29 16:00:48 -07:00
Blake Friedman
2e1c8841e9
[DevTools] front-end for profiling event stack ( #24805 )
...
* [DevTools] front-end for profiling event stack
Adds a side-bar to the profiling tab. Users can now select an update event, and are
shown the callstack from the originating component. When a source path is available
there is now UI to jump to source.
Add FB enabled feature flag: enableProfilerComponentTree for the side-bar.
resolves #24170
2022-06-28 22:15:24 +01:00
Luna Ruan
9abe745aa7
[DevTools][Timeline Profiler] Component Stacks Backend ( #24776 )
...
This PR adds a component stack field to the `schedule-state-update` event. The algorithm is as follows:
* During profiling, whenever a state update happens collect the parents of the fiber that caused the state update and store it in a map
* After profiling finishes, post process the `schedule-state-update` event and using the parent fibers, generate the component stack by using`describeFiber`, a function that uses error throwing to get the location of the component by calling the component without props.
---
Co-authored-by: Blake Friedman <blake.friedman@gmail.com >
2022-06-23 11:19:23 -07: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