Commit Graph
119 Commits
Author SHA1 Message Date
Brian VaughnandGitHub d26467e643 DevTool: hook names cache no longer loses entries between selection (#21831)
Made several changes to the hooks name cache to avoid losing cached data between selected elements:
1. No longer use React-managed cache. This had the unfortunate side effect of the inspected element cache also clearing the hook names cache. For now, instead, a module-level WeakMap cache is used. This isn't great but we can revisit it later.
2. Hooks are no longer the cache keys (since hook objects get recreated between element inspections). Instead a hook key string made of fileName + line number + column number is used.
3. If hook names have already been loaded for a component, skip showing the load button and just show the hook names by default when selecting the component.
2021-07-08 13:54:16 -04:00
Brian VaughnandGitHub 359bd67ea2 DevTools named hooks: Support FLow syntax (#21815)
Detect Flow pragma (@flow) and use Flow plug-in instead of TypeScript (default)
2021-07-07 14:29:41 -04:00
Brian VaughnandGitHub 91e90d06a1 DevTooks: Don't dehydrate hook source fileNames (#21814) 2021-07-07 14:24:17 -04:00
64cc858d3b [WIP] DevTools: Support named hooks for >1 module in a bundle (#21790)
* Add named hooks test case built with Rollup

* Fix prepareStackTrace unpatching, remove sourceURL

* Prettier

* Resolve source map URL/path relative to the script

* Add failing tests for multi-module bundle

* Parse hook names from multiple modules in a bundle

* Create a HookSourceData per location key (file, line, column).
* Cache the source map per runtime URL ( = file part of location key).
* Don't store sourceMapContents - only store a consumer instance.
* Look up original source URLs in the source map correctly.
* Cache the code + AST per original URL.
* Fix off-by-one column number lookup.
* Some naming and typing tweaks related to the above.
* Stop storing the consumer outside the with() callback, which is a bug.

* Lint fix for 8d8dd25

* Added devDependencies to react-devtools-extensions package.json

* Added some debug logging and TODO comments

* Added additional DEBUG logging to hook names cache

Co-authored-by: Brian Vaughn <[email protected]>
2021-07-07 13:07:58 -04:00
34902f78af DevTools: Show hook names based on variable usage (#21641)
Co-authored-by: Brian Vaughn <[email protected]>
Co-authored-by: Saphal Patro <[email protected]>
Co-authored-by: VibhorCodecianGupta <[email protected]>
2021-07-01 14:39:18 -04:00
Brian VaughnandGitHub 78f9773c62 Updated scripts and config to replace "master" with "main" branch (#21768) 2021-06-29 14:26:24 -04:00
Brian Vaughn 8ea654acd9 DevTools 4.13.4 -> 4.13.5 2021-05-25 15:18:47 -04:00
Brian Vaughn 79b229fbc8 DevTools 4.13.3 -> 4.13.4 2021-05-20 11:24:30 -04:00
Brian Vaughn 8fdba3b1be Preparing DevTools 4.13.2 -> 4.13.3 for release 2021-05-18 13:23:06 -04:00
Brian VaughnandGitHub b86ad519ba Update entry point exports (#21488)
The following APIs have been added to the `react` stable entry point:
* `SuspenseList`
* `startTransition`
* `unstable_createMutableSource`
* `unstable_useMutableSource`
* `useDeferredValue`
* `useTransition`

The following APIs have been added or removed from the `react-dom` stable entry point:
* `createRoot`
* `unstable_createPortal` (removed)

The following APIs have been added to the `react-is` stable entry point:
* `SuspenseList`
* `isSuspenseList`

The following feature flags have been changed from experimental to true:
* `enableLazyElements`
* `enableSelectiveHydration`
* `enableSuspenseServerRenderer`
2021-05-12 11:28:14 -04:00
Brian Vaughn e5aeab0276 DevTools 4.13.1 -> 4.13.2 2021-05-07 08:52:02 -04:00
Brian VaughnandGitHub 2ff1c3964e Added new GitHub issue form for React DevTools bug reports (#21450)
Added a new bug report template built with GitHub issue forms:
https://gh-community.github.io/issue-template-feedback/structured/

And updated DevTools bug report link to send information formatted for this new template.
2021-05-07 08:46:58 -04:00
Brian Vaughn 4bfee83725 Prepare DevTools 4.13.1 release 2021-05-04 22:35:30 -04:00
Brian VaughnandGitHub f4b88cd77b Preparing DevTools 4.12.4 -> 4.13.0 release (#21378) 2021-04-28 12:36:24 -04:00
Brian Vaughn 1bc9f797fe DevTools version bump 4.12.3 -> 4.12.4 2021-04-19 21:23:01 -04:00
Brian Vaughn 72120d66ef DevTools version bump 4.12.2 -> 4.12.3 2021-04-19 13:09:07 -04:00
Brian Vaughn d987e536a3 DevTools version bump 4.12.1 -> 4.12.2 2021-04-16 12:35:29 -04:00
Brian VaughnandGitHub f4d011491f Fixed bug in react-detools-inline frontend init method (#21265) 2021-04-14 13:27:21 -04:00
Brian VaughnandGitHub 0f43470e40 Add createBridge and createStore exports to react-devtools-inline (for Replay integration) (#21032) 2021-04-12 17:07:14 -04:00
Brian VaughnandGitHub e4a3c060c3 Prepare DevTools CHANGELOG and versions for 4.11.0 release (#21221) 2021-04-09 19:12:13 -04:00
Brian VaughnandGitHub 3fb4538054 Bumped DevTools Chrome and Firefox versions in Babel config (#21185)
We have been building DevTools to target Chrome 49 and Firefox 54. These are super old browser versions and they did not have full ES6 support, so the generated build is more bloated than it needs to be.

DevTools uses most modern language features. Off the top of my head, we it uses basically everything but async and generator functions.

Based on CanIUse charts– I believe that in order to avoid unnecessary polyfill/wrapper code being generated, we'd need to target Chrome 60+ (released 2017-07-25) and Firefox 55+ (released 2017-04-18). This seems like a reasonable set of browsers to target.

Note that we can't remove the IE 11 target from the react-devtools-core backend yet due to Hermes (React Native) ES6 support but that should be doable by the end of the year given current engineering targets. But we could update the frontend target, as well as the targets for the extensions and the react-devtools-inline package.

This commit increases the browser targets then for Chrome (from 49 to 60) and Firefox (from 54 to 55)
2021-04-06 11:18:46 -04:00
Brian VaughnandGitHub 5894f18aa3 [FB-only] Show which hooks (indices) changed when profiling (#20998) 2021-03-17 12:28:21 -04:00
Sebastian SilbermannandGitHub 5820ae4302 Document prerequisites for download-experimental-build (#21005) 2021-03-15 09:48:44 -04:00
43e68fefe2 Update devtools-extensions build script to reflect changes in local b… (#21004)
Co-authored-by: Brian Vaughn <[email protected]>
2021-03-15 09:46:46 -04:00
91e2ddbda9 Expose DEV-mode warnings in devtools UI (#20463)
Co-authored-by: Brian Vaughn <[email protected]>
2020-12-22 11:09:29 -05:00
Brian Vaughn 3abe21b49c React DevTools 4.10.0 -> 4.10.1 2020-12-04 16:43:13 -05:00
Brian Vaughn 5fef98a1c0 DevTools 4.9.0 -> 4.10.0 2020-11-12 09:07:10 -05:00
Sy Tran DungandGitHub 7d4f9ada95 Fix error loading source maps for devtools extension (#20079) 2020-10-22 11:26:24 -04:00
Brian Vaughn b96158b049 DevTools 4.8.2 -> 4.9.0 bump 2020-10-19 11:20:54 -04:00
Saikat GuhaandGitHub 098d4ecc68 DevTools: Handle restricted browser pages properly like new tab page, extensions page etc(only chrome and edge for now) (#20023) 2020-10-14 13:59:05 -04:00
c766f6c82d [DevTools] Add DevTools forked Feature flags (#18994)
Also resolve an uncaught error in extension build (#18843).

Co-authored-by: Brian Vaughn <[email protected]>
Co-authored-by: Brian Vaughn <[email protected]>
2020-10-12 13:07:10 -04:00
Saikat GuhaandGitHub 7e360ca2c2 Update outdated links and fix two broken links (#19985)
* update all facebook.github.io links

* facebookincubator links : update some outdated links and fix two other broken links where they are actually the latest updated ones
2020-10-09 02:56:30 +01:00
Brian VaughnandGitHub ac3a932add Revert "DevTools: Improve browser extension iframe support (#19854)" (#19959)
This reverts commit dbc0833791.
2020-10-05 09:44:08 -04:00
Saikat GuhaandGitHub 10d7a4905d DevTools: Remove ReactJS.org version check "cheat" (#19939)
Remove dead code as facebook.github.io/react always redirects to reactjs.org, which has prod version of react. so removing the "cheat" (#19939)
2020-10-01 10:16:50 -04:00
dbc0833791 DevTools: Improve browser extension iframe support (#19854)
Co-authored-by: Joel DSouza <[email protected]>
Co-authored-by: Damien Maillard <[email protected]>
Co-authored-by: Brian Vaughn <[email protected]>
2020-09-23 16:56:13 -04:00
b9e6297d93 Enable source maps for DevTools production builds (#19773)
Co-authored-by: Brian Vaughn <[email protected]>
2020-09-18 10:07:22 -04:00
Brian VaughnandGitHub 9b5275b9a3 Revert "DevTools: Improve browser extension iframe support (#19827)" (#19852)
This reverts commit 216081fb1c.
2020-09-17 14:57:44 -04:00
216081fb1c DevTools: Improve browser extension iframe support (#19827)
Co-authored-by: Joel DSouza <[email protected]>
Co-authored-by: Damien Maillard <[email protected]>
Co-authored-by: Brian Vaughn <[email protected]>
2020-09-14 10:04:46 -04:00
e388fe3fd8 Scheduling Profiler: Redesign with DevTools styling (#19707)
Co-authored-by: Brian Vaughn <[email protected]>
2020-09-03 12:08:40 -04:00
E-Liang TanandGitHub dec4a9e37e Upgrade all @babel/* packages to fix DevTools builds on newer Node versions (#19647) 2020-08-20 11:47:16 -04:00
ᴜɴвʏтᴇandGitHub 5fcd0a7b81 fix: open two same tabs on firefox (#19632)
close #19629
2020-08-18 10:17:00 -04:00
Brian VaughnandGitHub 7b32e7cdfc Fix emoji character displayed in Chrome extension (#19603) 2020-08-13 11:16:35 -04:00
Pascal Fong KyeandGitHub 8fa4975389 DevTools bug fix: Proxied methods should be safely dehydrated for display 2020-08-12 12:15:53 -04:00
Brian Vaughn b37cc32bad DevTools 4.8.1 -> 4.8.2 (and CHANGELOG) 2020-07-15 12:37:08 -04:00
Brian VaughnandGitHub f02d3c2d2c Disable DevTools minification (#19369)
DevTools isn't being downloaded like typical JavaScript, so bundle size concerns don't apply. Parsing is still a consideration (so I'm open for discussion here) but I think this change would provide a couple of benefits:
* People are more likely to *actually read* non-minified source code when e.g. a breakpoint is hit (as with the recent debugger statement)
* Component stacks will be easier to parse on bug reports
2020-07-15 10:38:30 -04:00
Dan Abramov 270e46cfcd React DevTools 4.8.1 2020-07-10 14:11:55 +01:00
Brian VaughnandGitHub 1a46464a0e DevTools 4.7.0 -> 4.8.0 (#19297) 2020-07-09 10:49:44 -04:00
Vetrivel ChinnasamyandGitHub f247ad56ad make link https (#19147) 2020-06-30 12:43:52 +01:00
Brian VaughnandGitHub bb6dff5b51 Updates the DevTools test script to make it easier to test other URLs. (#19179) 2020-06-23 11:48:35 -04:00
RickyandGitHub 7c9c5ff51c Fix spelling errors and typos (#19138) 2020-06-15 19:59:44 -04:00