You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/07/25 18:02:52 UTC

[GitHub] mistercrunch closed pull request #5478: Remove is-react dependency

mistercrunch closed pull request #5478: Remove is-react dependency
URL: https://github.com/apache/incubator-superset/pull/5478
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/package.json b/superset/assets/package.json
index da5405624f..e266293961 100644
--- a/superset/assets/package.json
+++ b/superset/assets/package.json
@@ -69,7 +69,6 @@
     "geojson-extent": "^0.3.2",
     "geolib": "^2.0.24",
     "immutable": "^3.8.2",
-    "is-react": "^1.1.1",
     "jed": "^1.1.1",
     "jquery": "3.1.1",
     "lodash.throttle": "^4.1.1",
diff --git a/superset/assets/src/explore/components/ControlPanelsContainer.jsx b/superset/assets/src/explore/components/ControlPanelsContainer.jsx
index af74324911..ff9754b030 100644
--- a/superset/assets/src/explore/components/ControlPanelsContainer.jsx
+++ b/superset/assets/src/explore/components/ControlPanelsContainer.jsx
@@ -1,6 +1,5 @@
 /* eslint camelcase: 0 */
 import React from 'react';
-import isReact from 'is-react';
 import PropTypes from 'prop-types';
 import { bindActionCreators } from 'redux';
 import { connect } from 'react-redux';
@@ -30,7 +29,7 @@ class ControlPanelsContainer extends React.Component {
     this.renderControlPanelSection = this.renderControlPanelSection.bind(this);
   }
   getControlData(controlName) {
-    if (isReact.element(controlName)) {
+    if (React.isValidElement(controlName)) {
       return controlName;
     }
 
@@ -77,7 +76,7 @@ class ControlPanelsContainer extends React.Component {
             controls={controlSets.map((controlName) => {
               if (!controlName) {
                 return null;
-              } else if (isReact.element(controlName)) {
+              } else if (React.isValidElement(controlName)) {
                 return controlName;
               } else if (ctrls[controlName]) {
                 return (<Control
diff --git a/superset/assets/src/explore/store.js b/superset/assets/src/explore/store.js
index 4ef773588b..59f2cb7249 100644
--- a/superset/assets/src/explore/store.js
+++ b/superset/assets/src/explore/store.js
@@ -1,5 +1,5 @@
 /* eslint camelcase: 0 */
-import isReact from 'is-react';
+import React from 'react';
 import controls from './controls';
 import visTypes, { sectionsToRender } from './visTypes';
 
@@ -51,7 +51,7 @@ export function getControlsState(state, form_data) {
   const controlOverrides = viz.controlOverrides || {};
   const controlsState = {};
   controlNames.forEach((k) => {
-    if (isReact.element(k)) {
+    if (React.isValidElement(k)) {
       // no state
       return;
     }
diff --git a/superset/assets/yarn.lock b/superset/assets/yarn.lock
index eb8a6aab27..11e645613f 100644
--- a/superset/assets/yarn.lock
+++ b/superset/assets/yarn.lock
@@ -4125,7 +4125,7 @@ fault@^1.0.2:
   dependencies:
     format "^0.2.2"
 
-fbjs@^0.8.1, fbjs@^0.8.16, fbjs@^0.8.4, fbjs@^0.8.9:
+fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.9:
   version "0.8.17"
   resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
   dependencies:
@@ -5652,12 +5652,6 @@ is-property@^1.0.0:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
 
-is-react@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/is-react/-/is-react-1.1.1.tgz#304d5541e191190f2389bd588a33da0756bfa0c7"
-  dependencies:
-    react "^16.0.0"
-
 is-redirect@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
@@ -9089,15 +9083,6 @@ react@^15.6.2:
     object-assign "^4.1.0"
     prop-types "^15.5.10"
 
-react@^16.0.0:
-  version "16.4.1"
-  resolved "https://registry.yarnpkg.com/react/-/react-16.4.1.tgz#de51ba5764b5dbcd1f9079037b862bd26b82fe32"
-  dependencies:
-    fbjs "^0.8.16"
-    loose-envify "^1.1.0"
-    object-assign "^4.1.1"
-    prop-types "^15.6.0"
-
 reactable@1.0.2:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/reactable/-/reactable-1.0.2.tgz#67a579fee3af68b991b5f04df921a4a40ece0b72"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org