From d92631eab16ceb1b08727dd24b78432e504e41e4 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 26 Mar 2020 09:31:36 -0700 Subject: [PATCH] Remove "es6-symbol" package from DevTools (#18397) --- packages/react-devtools-core/package.json | 1 - packages/react-devtools-inline/package.json | 4 +--- .../src/devtools/views/Components/HooksTree.js | 2 +- packages/react-devtools-shared/src/hydration.js | 1 - packages/react-devtools-shared/src/utils.js | 1 - yarn.lock | 2 +- 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/react-devtools-core/package.json b/packages/react-devtools-core/package.json index 9ee06203cfbbb..e6e1d18f224fa 100644 --- a/packages/react-devtools-core/package.json +++ b/packages/react-devtools-core/package.json @@ -24,7 +24,6 @@ "start:standalone": "cross-env NODE_ENV=development webpack --config webpack.standalone.js --watch" }, "dependencies": { - "es6-symbol": "^3", "shell-quote": "^1.6.1", "ws": "^7" }, diff --git a/packages/react-devtools-inline/package.json b/packages/react-devtools-inline/package.json index c11e470927b79..570f3190268bf 100644 --- a/packages/react-devtools-inline/package.json +++ b/packages/react-devtools-inline/package.json @@ -20,9 +20,7 @@ "prepublish": "yarn run build", "start": "cross-env NODE_ENV=development webpack --config webpack.config.js --watch" }, - "dependencies": { - "es6-symbol": "^3" - }, + "dependencies": {}, "devDependencies": { "@babel/core": "^7.1.6", "@babel/plugin-proposal-class-properties": "^7.1.0", diff --git a/packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js b/packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js index c4ff5a8765ffc..9374f4a637e06 100644 --- a/packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js +++ b/packages/react-devtools-shared/src/devtools/views/Components/HooksTree.js @@ -124,7 +124,7 @@ function HookView({canEditHooks, hook, id, inspectPath, path}: HookViewProps) { hook !== null && typeof hook === 'object' && hook.hasOwnProperty(meta.type) - ? hook[meta.type] + ? hook[(meta.type: any)] : typeof value, }, id: 'SelectedElement', diff --git a/packages/react-devtools-shared/src/hydration.js b/packages/react-devtools-shared/src/hydration.js index 01e0432d2a5d3..e7d7630cdea15 100644 --- a/packages/react-devtools-shared/src/hydration.js +++ b/packages/react-devtools-shared/src/hydration.js @@ -7,7 +7,6 @@ * @flow */ -import Symbol from 'es6-symbol'; import { getDataType, getDisplayNameForReactElement, diff --git a/packages/react-devtools-shared/src/utils.js b/packages/react-devtools-shared/src/utils.js index c40e94f32537e..c412a0f562bcb 100644 --- a/packages/react-devtools-shared/src/utils.js +++ b/packages/react-devtools-shared/src/utils.js @@ -7,7 +7,6 @@ * @flow */ -import Symbol from 'es6-symbol'; import LRU from 'lru-cache'; import { isElement, diff --git a/yarn.lock b/yarn.lock index c841bcb45dd37..604eaf12ed964 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4969,7 +4969,7 @@ es6-set@~0.1.5: es6-symbol "3.1.1" event-emitter "~0.3.5" -es6-symbol@3.1.1, es6-symbol@^3, es6-symbol@^3.1.1, es6-symbol@~3.1.1: +es6-symbol@3.1.1, es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" integrity sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=