2018-11-05 10:02:59 -08:00
|
|
|
{
|
2018-11-06 17:37:30 -08:00
|
|
|
"private": true,
|
2018-11-05 10:02:59 -08:00
|
|
|
"name": "react-debug-tools",
|
|
|
|
|
"description": "React package for debugging React trees.",
|
|
|
|
|
"version": "0.16.0",
|
|
|
|
|
"keywords": [
|
|
|
|
|
"react"
|
|
|
|
|
],
|
2024-03-01 14:35:18 -05:00
|
|
|
"homepage": "https://react.dev/",
|
2018-11-05 10:02:59 -08:00
|
|
|
"bugs": "https://github.com/facebook/react/issues",
|
|
|
|
|
"license": "MIT",
|
|
|
|
|
"files": [
|
|
|
|
|
"LICENSE",
|
|
|
|
|
"README.md",
|
|
|
|
|
"index.js",
|
|
|
|
|
"cjs/"
|
|
|
|
|
],
|
|
|
|
|
"main": "index.js",
|
2019-01-18 20:21:12 +00:00
|
|
|
"repository": {
|
|
|
|
|
"type" : "git",
|
|
|
|
|
"url" : "https://github.com/facebook/react.git",
|
|
|
|
|
"directory": "packages/react-debug-tools"
|
|
|
|
|
},
|
2018-11-05 10:02:59 -08:00
|
|
|
"engines": {
|
|
|
|
|
"node": ">=0.10.0"
|
|
|
|
|
},
|
|
|
|
|
"peerDependencies": {
|
2020-10-20 21:41:18 +01:00
|
|
|
"react": "^17.0.0"
|
2018-11-05 10:02:59 -08:00
|
|
|
},
|
|
|
|
|
"dependencies": {
|
feat[devtools]: symbolicate source for inspected element (#28471)
Stacked on https://github.com/facebook/react/pull/28351, please review
only the last commit.
Top-level description of the approach:
1. Once user selects an element from the tree, frontend asks backend to
return the inspected element, this is where we simulate an error
happening in `render` function of the component and then we parse the
error stack. As an improvement, we should probably migrate from custom
implementation of error stack parser to `error-stack-parser` from npm.
2. When frontend receives the inspected element and this object is being
propagated, we create a Promise for symbolicated source, which is then
passed down to all components, which are using `source`.
3. These components use `use` hook for this promise and are wrapped in
Suspense.
Caching:
1. For browser extension, we cache Promises based on requested resource
+ key + column, also added use of
`chrome.devtools.inspectedWindow.getResource` API.
2. For standalone case (RN), we cache based on requested resource url,
we cache the content of it.
2024-03-05 12:32:11 +00:00
|
|
|
"error-stack-parser": "^2.1.4"
|
2018-11-05 10:02:59 -08:00
|
|
|
}
|
|
|
|
|
}
|