diff --git a/fixtures/devtools/standalone/index.html b/fixtures/devtools/standalone/index.html
index 17e133bae891b..28255cb67ee6c 100644
--- a/fixtures/devtools/standalone/index.html
+++ b/fixtures/devtools/standalone/index.html
@@ -9,6 +9,7 @@
+
@@ -255,6 +256,33 @@
List
);
}
+ const set = new Set(['abc', 123]);
+ const map = new Map([['name', 'Brian'], ['food', 'sushi']]);
+ const setOfSets = new Set([new Set(['a', 'b', 'c']), new Set([1, 2, 3])]);
+ const mapOfMaps = new Map([['first', map], ['second', map]]);
+ const typedArray = Int8Array.from([100, -100, 0]);
+ const immutable = Immutable.fromJS({
+ a: [{ hello: 'there' }, 'fixed', true],
+ b: 123,
+ c: {
+ '1': 'xyz',
+ xyz: 1,
+ },
+ });
+
+ function UnserializableProps() {
+ return (
+
+ );
+ }
+
function ChildComponent(props: any) {
return null;
}
@@ -264,6 +292,7 @@ List
+
);
diff --git a/packages/react-devtools-core/package.json b/packages/react-devtools-core/package.json
index f34c8ea23092f..49611b51a02c6 100644
--- a/packages/react-devtools-core/package.json
+++ b/packages/react-devtools-core/package.json
@@ -1,12 +1,13 @@
{
"name": "react-devtools-core",
- "version": "4.0.0-alpha.9",
+ "version": "4.0.5",
"description": "Use react-devtools outside of the browser",
"license": "MIT",
"main": "./dist/backend.js",
"repository": {
- "url": "https://github.com/bvaughn/react-devtools-experimental.git",
- "type": "git"
+ "type": "git",
+ "url": "https://github.com/facebook/react.git",
+ "directory": "packages/react-devtools-core"
},
"files": [
"dist",
diff --git a/packages/react-devtools-core/src/standalone.js b/packages/react-devtools-core/src/standalone.js
index 8b8e33adcb396..e286de9660a6b 100644
--- a/packages/react-devtools-core/src/standalone.js
+++ b/packages/react-devtools-core/src/standalone.js
@@ -14,7 +14,8 @@ import {
getAppendComponentStack,
} from 'react-devtools-shared/src/utils';
import {Server} from 'ws';
-import {existsSync, readFileSync} from 'fs';
+import {join} from 'path';
+import {readFileSync} from 'fs';
import {installHook} from 'react-devtools-shared/src/hook';
import DevTools from 'react-devtools-shared/src/devtools/views/DevTools';
import {doesFilePathExist, launchEditor} from './editor';
@@ -259,14 +260,8 @@ function startServer(port?: number = 8097) {
});
httpServer.on('request', (request, response) => {
- // NPM installs should read from node_modules,
- // But local dev mode needs to use a relative path.
- const basePath = existsSync('./node_modules/react-devtools-core')
- ? 'node_modules/react-devtools-core'
- : '../react-devtools-core';
-
// Serve a file that immediately sets up the connection.
- const backendFile = readFileSync(`${basePath}/dist/backend.js`);
+ const backendFile = readFileSync(join(__dirname, 'backend.js'));
// The renderer interface doesn't read saved component filters directly,
// because they are generally stored in localStorage within the context of the extension.
diff --git a/packages/react-devtools-core/webpack.standalone.js b/packages/react-devtools-core/webpack.standalone.js
index d6b41ced0b1f7..d14e6514ba934 100644
--- a/packages/react-devtools-core/webpack.standalone.js
+++ b/packages/react-devtools-core/webpack.standalone.js
@@ -40,6 +40,12 @@ module.exports = {
scheduler: resolve(builtModulesDir, 'scheduler'),
},
},
+ node: {
+ // Don't replace __dirname!
+ // This would break the standalone DevTools ability to load the backend.
+ // see https://github.com/facebook/react-devtools/issues/1269
+ __dirname: false,
+ },
plugins: [
new DefinePlugin({
__DEV__: false,
diff --git a/packages/react-devtools-extensions/build.js b/packages/react-devtools-extensions/build.js
index eb90e7e2af281..a38e909dd4630 100644
--- a/packages/react-devtools-extensions/build.js
+++ b/packages/react-devtools-extensions/build.js
@@ -61,14 +61,13 @@ const build = async (tempPath, manifestPath) => {
);
const commit = getGitCommit();
- const versionDateString = `${commit} (${new Date().toLocaleDateString()})`;
-
+ const dateString = new Date().toLocaleDateString();
const manifest = JSON.parse(readFileSync(copiedManifestPath).toString());
+ const versionDateString = `${manifest.version} (${dateString})`;
if (manifest.version_name) {
manifest.version_name = versionDateString;
- } else {
- manifest.description += `\n\nCreated from revision ${versionDateString}`;
}
+ manifest.description += `\n\nCreated from revision ${commit} on ${dateString}.`;
writeFileSync(copiedManifestPath, JSON.stringify(manifest, null, 2));
diff --git a/packages/react-devtools-extensions/chrome/manifest.json b/packages/react-devtools-extensions/chrome/manifest.json
index 3a1dfb1db4bdf..a915ccc18cdfe 100644
--- a/packages/react-devtools-extensions/chrome/manifest.json
+++ b/packages/react-devtools-extensions/chrome/manifest.json
@@ -2,8 +2,8 @@
"manifest_version": 2,
"name": "React Developer Tools",
"description": "Adds React debugging tools to the Chrome Developer Tools.",
- "version": "4.0.0",
- "version_name": "4.0.0",
+ "version": "4.0.5",
+ "version_name": "4.0.5",
"minimum_chrome_version": "49",
@@ -40,15 +40,7 @@
"persistent": false
},
- "permissions": [
- "",
- "background",
- "tabs",
- "webNavigation",
- "file:///*",
- "http://*/*",
- "https://*/*"
- ],
+ "permissions": ["file:///*", "http://*/*", "https://*/*"],
"content_scripts": [
{
diff --git a/packages/react-devtools-extensions/deploy.html b/packages/react-devtools-extensions/deploy.html
index 34b908f30101d..f6fa5b2de8938 100644
--- a/packages/react-devtools-extensions/deploy.html
+++ b/packages/react-devtools-extensions/deploy.html
@@ -18,12 +18,11 @@
- This is a preview build of an unreleased DevTools extension.
- It has no developer support.
+ This is a preview build of the React DevTools extension.
Installation instructions
@@ -37,10 +36,5 @@ Bug reports
Please report bugs as GitHub issues.
Please include all of the info required to reproduce the bug (e.g. links, code, instructions).
-
- Feature requests
-
- Feature requests are not being accepted at this time.
-