GeezerVison is showing github.com — Merged changes from 4.0.0 -> 4.0.5 from DevTools fork · react/react@4da836a
File treeExpand file treeCollapse file tree Open diff view settings fixtures/devtools/standalone react-devtools-extensions react-devtools-shared/src
Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: fixtures/devtools/standalone/index.html +29Lines changed: 29 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 |
| 10 | 10 | <script src="https://unpkg.com/react@16/umd/react.development.js"></script> | 11 | 11 | <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | | 12 | + | 12 | 13 |
| 13 | 14 | <!-- Don't use this in production: --> | 14 | 15 | | @@ -255,6 +256,33 @@ <h1>List</h1> | 255 | 256 | ); | 256 | 257 | } | 257 | 258 |
| | 259 | + const set = new Set(['abc', 123]); | | 260 | + const map = new Map([['name', 'Brian'], ['food', 'sushi']]); | | 261 | + const setOfSets = new Set([new Set(['a', 'b', 'c']), new Set([1, 2, 3])]); | | 262 | + const mapOfMaps = new Map([['first', map], ['second', map]]); | | 263 | + const typedArray = Int8Array.from([100, -100, 0]); | | 264 | + const immutable = Immutable.fromJS({ | | 265 | + a: [{ hello: 'there' }, 'fixed', true], | | 266 | + b: 123, | | 267 | + c: { | | 268 | + '1': 'xyz', | | 269 | + xyz: 1, | | 270 | + }, | | 271 | + }); | | 272 | + | | 273 | + function UnserializableProps() { | | 274 | + return ( | | 275 | + <ChildComponent | | 276 | + map={map} | | 277 | + set={set} | | 278 | + mapOfMaps={mapOfMaps} | | 279 | + setOfSets={setOfSets} | | 280 | + typedArray={typedArray} | | 281 | + immutable={immutable} | | 282 | + /> | | 283 | + ); | | 284 | + } | | 285 | + | 258 | 286 | function ChildComponent(props: any) { | 259 | 287 | return null; | 260 | 288 | } | @@ -264,6 +292,7 @@ <h1>List</h1> | 264 | 292 | <Fragment> | 265 | 293 | <SimpleValues /> | 266 | 294 | <ObjectProps /> | | 295 | + <UnserializableProps /> | 267 | 296 | <CustomObject /> | 268 | 297 | </Fragment> | 269 | 298 | ); | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-core/package.json +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "react-devtools-core", | 3 | | - "version": "4.0.0-alpha.9", | | 3 | + "version": "4.0.5", | 4 | 4 | "description": "Use react-devtools outside of the browser", | 5 | 5 | "license": "MIT", | 6 | 6 | "main": "./dist/backend.js", | 7 | 7 | "repository": { | 8 | | - "url": "https://github.com/bvaughn/react-devtools-experimental.git", | 9 | | - "type": "git" | | 8 | + "type": "git", | | 9 | + "url": "https://github.com/facebook/react.git", | | 10 | + "directory": "packages/react-devtools-core" | 10 | 11 | }, | 11 | 12 | "files": [ | 12 | 13 | "dist", | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-core/src/standalone.js +3-8Lines changed: 3 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,8 @@ import { | 14 | 14 | getAppendComponentStack, | 15 | 15 | } from 'react-devtools-shared/src/utils'; | 16 | 16 | import {Server} from 'ws'; | 17 | | -import {existsSync, readFileSync} from 'fs'; | | 17 | +import {join} from 'path'; | | 18 | +import {readFileSync} from 'fs'; | 18 | 19 | import {installHook} from 'react-devtools-shared/src/hook'; | 19 | 20 | import DevTools from 'react-devtools-shared/src/devtools/views/DevTools'; | 20 | 21 | import {doesFilePathExist, launchEditor} from './editor'; | @@ -259,14 +260,8 @@ function startServer(port?: number = 8097) { | 259 | 260 | }); | 260 | 261 |
| 261 | 262 | httpServer.on('request', (request, response) => { | 262 | | - // NPM installs should read from node_modules, | 263 | | - // But local dev mode needs to use a relative path. | 264 | | - const basePath = existsSync('./node_modules/react-devtools-core') | 265 | | - ? 'node_modules/react-devtools-core' | 266 | | - : '../react-devtools-core'; | 267 | | - | 268 | 263 | // Serve a file that immediately sets up the connection. | 269 | | - const backendFile = readFileSync(`${basePath}/dist/backend.js`); | | 264 | + const backendFile = readFileSync(join(__dirname, 'backend.js')); | 270 | 265 |
| 271 | 266 | // The renderer interface doesn't read saved component filters directly, | 272 | 267 | // because they are generally stored in localStorage within the context of the extension. | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-core/webpack.standalone.js +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -40,6 +40,12 @@ module.exports = { | 40 | 40 | scheduler: resolve(builtModulesDir, 'scheduler'), | 41 | 41 | }, | 42 | 42 | }, | | 43 | + node: { | | 44 | + // Don't replace __dirname! | | 45 | + // This would break the standalone DevTools ability to load the backend. | | 46 | + // see https://github.com/facebook/react-devtools/issues/1269 | | 47 | + __dirname: false, | | 48 | + }, | 43 | 49 | plugins: [ | 44 | 50 | new DefinePlugin({ | 45 | 51 | __DEV__: false, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/build.js +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -61,14 +61,13 @@ const build = async (tempPath, manifestPath) => { | 61 | 61 | ); | 62 | 62 |
| 63 | 63 | const commit = getGitCommit(); | 64 | | - const versionDateString = `${commit} (${new Date().toLocaleDateString()})`; | 65 | | - | | 64 | + const dateString = new Date().toLocaleDateString(); | 66 | 65 | const manifest = JSON.parse(readFileSync(copiedManifestPath).toString()); | | 66 | + const versionDateString = `${manifest.version} (${dateString})`; | 67 | 67 | if (manifest.version_name) { | 68 | 68 | manifest.version_name = versionDateString; | 69 | | - } else { | 70 | | - manifest.description += `\n\nCreated from revision ${versionDateString}`; | 71 | 69 | } | | 70 | + manifest.description += `\n\nCreated from revision ${commit} on ${dateString}.`; | 72 | 71 |
| 73 | 72 | writeFileSync(copiedManifestPath, JSON.stringify(manifest, null, 2)); | 74 | 73 |
| |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/chrome/manifest.json +3-11Lines changed: 3 additions & 11 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | "manifest_version": 2, | 3 | 3 | "name": "React Developer Tools", | 4 | 4 | "description": "Adds React debugging tools to the Chrome Developer Tools.", | 5 | | - "version": "4.0.0", | 6 | | - "version_name": "4.0.0", | | 5 | + "version": "4.0.5", | | 6 | + "version_name": "4.0.5", | 7 | 7 |
| 8 | 8 | "minimum_chrome_version": "49", | 9 | 9 |
| | 40 | 40 | "persistent": false | 41 | 41 | }, | 42 | 42 |
| 43 | | - "permissions": [ | 44 | | - "<all_urls>", | 45 | | - "background", | 46 | | - "tabs", | 47 | | - "webNavigation", | 48 | | - "file:///*", | 49 | | - "http://*/*", | 50 | | - "https://*/*" | 51 | | - ], | | 43 | + "permissions": ["file:///*", "http://*/*", "https://*/*"], | 52 | 44 |
| 53 | 45 | "content_scripts": [ | 54 | 46 | { | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/deploy.html +2-8Lines changed: 2 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 18 | 18 |
| 19 | 19 | <h3> | 20 | 20 | Created on <strong>%date%</strong> from | 21 | | - <a href="http://github.com/bvaughn/react-devtools-experimental/commit/%commit%"><code>%commit%</code></a> | | 21 | + <a href="http://github.com/facebook/react/commit/%commit%"><code>%commit%</code></a> | 22 | 22 | </h3> | 23 | 23 |
| 24 | 24 | <p> | 25 | | - This is a preview build of an <a href="https://github.com/facebook/react/tree/master/packages/react-devtools-extensions">unreleased DevTools extension</a>. | 26 | | - It has no developer support. | | 25 | + This is a preview build of the <a href="https://github.com/facebook/react">React DevTools extension</a>. | 27 | 26 | </p> | 28 | 27 |
| 29 | 28 | <h2>Installation instructions</h2> | @@ -37,10 +36,5 @@ <h2>Bug reports</h2> | 37 | 36 | Please report bugs as <a href="https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools">GitHub issues</a>. | 38 | 37 | Please include all of the info required to reproduce the bug (e.g. links, code, instructions). | 39 | 38 | </p> | 40 | | - | 41 | | - <h2>Feature requests</h2> | 42 | | - <p> | 43 | | - Feature requests are not being accepted at this time. | 44 | | - </p> | 45 | 39 | </body> | 46 | 40 | </html> |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/firefox/manifest.json +2-10Lines changed: 2 additions & 10 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | "manifest_version": 2, | 3 | 3 | "name": "React Developer Tools", | 4 | 4 | "description": "Adds React debugging tools to the Firefox Developer Tools.", | 5 | | - "version": "4.0.0", | | 5 | + "version": "4.0.5", | 6 | 6 |
| 7 | 7 | "applications": { | 8 | 8 | "gecko": { | | 44 | 44 | "scripts": ["build/background.js"] | 45 | 45 | }, | 46 | 46 |
| 47 | | - "permissions": [ | 48 | | - "<all_urls>", | 49 | | - "activeTab", | 50 | | - "tabs", | 51 | | - "webNavigation", | 52 | | - "file:///*", | 53 | | - "http://*/*", | 54 | | - "https://*/*" | 55 | | - ], | | 47 | + "permissions": ["file:///*", "http://*/*", "https://*/*"], | 56 | 48 |
| 57 | 49 | "content_scripts": [ | 58 | 50 | { | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-extensions/src/main.js +4-15Lines changed: 4 additions & 15 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -120,6 +120,10 @@ function createPanelIfReactLoaded() { | 120 | 120 | localStorageRemoveItem(LOCAL_STORAGE_SUPPORTS_PROFILING_KEY); | 121 | 121 | } | 122 | 122 |
| | 123 | + if (store !== null) { | | 124 | + profilingData = store.profilerStore.profilingData; | | 125 | + } | | 126 | + | 123 | 127 | store = new Store(bridge, { | 124 | 128 | isProfiling, | 125 | 129 | supportsReloadAndProfile: getBrowserName() === 'Chrome', | @@ -281,21 +285,6 @@ function createPanelIfReactLoaded() { | 281 | 285 |
| 282 | 286 | chrome.devtools.network.onNavigated.removeListener(checkPageForReact); | 283 | 287 |
| 284 | | - // Shutdown bridge before a new page is loaded. | 285 | | - chrome.webNavigation.onBeforeNavigate.addListener( | 286 | | - function onBeforeNavigate(details) { | 287 | | - // Ignore navigation events from other tabs (or from within frames). | 288 | | - if (details.tabId !== tabId || details.frameId !== 0) { | 289 | | - return; | 290 | | - } | 291 | | - | 292 | | - // `bridge.shutdown()` will remove all listeners we added, so we don't have to. | 293 | | - bridge.shutdown(); | 294 | | - | 295 | | - profilingData = store.profilerStore.profilingData; | 296 | | - }, | 297 | | - ); | 298 | | - | 299 | 288 | // Re-initialize DevTools panel when a new page is loaded. | 300 | 289 | chrome.devtools.network.onNavigated.addListener(function onNavigated() { | 301 | 290 | // Re-initialize saved filters on navigation, | |
Collapse file Copy file name to clipboardExpand all lines: packages/react-devtools-inline/package.json +4-3Lines changed: 4 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "name": "react-devtools-inline", | 3 | | - "version": "4.0.0-alpha.9", | | 3 | + "version": "4.0.5", | 4 | 4 | "description": "Embed react-devtools within a website", | 5 | 5 | "license": "MIT", | 6 | 6 | "main": "./dist/backend.js", | 7 | 7 | "repository": { | 8 | | - "url": "https://github.com/bvaughn/react-devtools-experimental.git", | 9 | | - "type": "git" | | 8 | + "type": "git", | | 9 | + "url": "https://github.com/facebook/react.git", | | 10 | + "directory": "packages/react-devtools-inline" | 10 | 11 | }, | 11 | 12 | "files": [ | 12 | 13 | "dist", | |
|