Skip to content

Commit

Permalink
Remove is-react dep (apache#5478)
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored and mistercrunch committed Jul 25, 2018
1 parent 33d07e2 commit 67f588c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 22 deletions.
1 change: 0 additions & 1 deletion superset/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions superset/assets/src/explore/store.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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;
}
Expand Down
17 changes: 1 addition & 16 deletions superset/assets/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 67f588c

Please sign in to comment.