Skip to content

Commit

Permalink
Bump to react 16
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Edwards authored and Aaron Carlino committed Nov 19, 2018
1 parent ad96b04 commit 240e8f6
Show file tree
Hide file tree
Showing 32 changed files with 2,044 additions and 2,353 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -7,7 +7,7 @@ before_install:
env:
global:
- COMPOSER_ROOT_VERSION=4.x-dev
- TRAVIS_NODE_VERSION="6"
- TRAVIS_NODE_VERSION="10"
- DISPLAY=":99"
- XVFBARGS=":99 -ac -screen 0 1024x768x16"
- SS_BASE_URL="http://localhost:8080/"
Expand Down
6 changes: 5 additions & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/src/components/ElementActions/AbstractAction.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import { PropTypes } from 'prop-types';
import classNames from 'classnames';
import { DropdownItem } from 'reactstrap';

Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import AbstractAction from '../AbstractAction';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16/build/index';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as ArchiveAction } from '../ArchiveAction';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as PublishAction } from '../PublishAction';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as UnpublishAction } from '../UnpublishAction';
import Enzyme, { mount } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/AddElementPopover.js
@@ -1,6 +1,7 @@
/* global window */

import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import classNames from 'classnames';
import { inject } from 'lib/Injector';
import { elementTypeType } from 'types/elementTypeType';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/AddNewButton.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { Button } from 'reactstrap';
import i18n from 'i18n';
import { elementTypeType } from 'types/elementTypeType';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/Content.js
@@ -1,4 +1,5 @@
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import { PropTypes } from 'prop-types';
import { inject } from 'lib/Injector';

class Content extends PureComponent {
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/Element.js
@@ -1,6 +1,7 @@
/* global window */

import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { elementType } from 'types/elementType';
import { compose } from 'redux';
import { inject } from 'lib/Injector';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/ElementActions.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { compose } from 'redux';
import { DropdownItem } from 'reactstrap';
import { inject } from 'lib/Injector';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/ElementDragPreview.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import Header from 'components/ElementEditor/Header';
import { DragLayer } from 'react-dnd';
import { elementType } from 'types/elementType';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/ElementEditor.js
@@ -1,4 +1,5 @@
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import { PropTypes } from 'prop-types';
import { inject } from 'lib/Injector';
import { compose } from 'redux';
import { elementTypeType } from 'types/elementTypeType';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/ElementList.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { elementType } from 'types/elementType';
import { compose } from 'redux';
import { inject } from 'lib/Injector';
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/ElementEditor/Header.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { Tooltip } from 'reactstrap';
import { elementType } from 'types/elementType';
import { compose } from 'redux';
Expand Down Expand Up @@ -146,7 +147,7 @@ class Header extends Component {
Header.propTypes = {
element: elementType.isRequired,
simple: PropTypes.bool,
ElementActionsComponent: React.PropTypes.oneOfType([React.PropTypes.node, React.PropTypes.func]),
ElementActionsComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
previewExpanded: PropTypes.bool,
disableTooltip: PropTypes.bool,
};
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/HoverBar.js
@@ -1,5 +1,6 @@
/* global window */
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import classNames from 'classnames';
import { inject } from 'lib/Injector';
import { elementTypeType } from 'types/elementTypeType';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/InlineEditForm.js
@@ -1,5 +1,6 @@
/* global window */
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import { PropTypes } from 'prop-types';
import classnames from 'classnames';
import FormBuilderLoader from 'containers/FormBuilderLoader/FormBuilderLoader';
import { loadElementSchemaValue } from 'state/editor/loadElementSchemaValue';
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/Summary.js
@@ -1,4 +1,5 @@
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import { PropTypes } from 'prop-types';
import i18n from 'i18n';

class Summary extends PureComponent {
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/ElementEditor/Toolbar.js
@@ -1,4 +1,5 @@
import React, { PureComponent, PropTypes } from 'react';
import React, { PureComponent } from 'react';
import { PropTypes } from 'prop-types';
import { inject } from 'lib/Injector';
import { elementTypeType } from 'types/elementTypeType';
import { DropTarget } from 'react-dnd';
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ElementEditor/tests/Content-test.js
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as Content } from '../Content';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ElementEditor/tests/Element-test.js
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as Element } from '../Element';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as ElementActions } from '../ElementActions';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';
import AbstractAction from 'components/ElementActions/AbstractAction';

Enzyme.configure({ adapter: new Adapter() });
Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as ElementEditor } from '../ElementEditor';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as ElementList } from '../ElementList';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ElementEditor/tests/Header-test.js
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import { Component as Header } from '../Header';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ElementEditor/tests/Summary-test.js
Expand Up @@ -4,7 +4,7 @@
import React from 'react';
import Summary from '../Summary';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-15.4/build/index';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });

Expand Down
@@ -1,7 +1,7 @@
/* global jest, describe, beforeEach, it, expect */

import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import ReactTestUtils from 'react-dom/test-utils';
import ElementalAreaHistoryFactory from '../HistoricElementView';

describe('HistoricElementView', () => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/types/elementType.js
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import { PropTypes } from 'prop-types';

// Describes the structure of an element coming in via GraphQL
const elementType = PropTypes.shape({
Expand Down
2 changes: 1 addition & 1 deletion client/src/types/elementTypeType.js
@@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';

// Describes the structure of an element coming in via GraphQL
const elementTypeType = PropTypes.shape({
Expand Down
40 changes: 23 additions & 17 deletions package.json
Expand Up @@ -32,30 +32,36 @@
},
"homepage": "https://github.com/dnadesign/silverstripe-elemental#readme",
"dependencies": {
"bootstrap": "4.1.2",
"apollo-client": "^2.3.1",
"bootstrap": "4.1.3",
"classnames": "^2.2.5",
"graphql-tag": "^0.1.17",
"graphql": "^14.0.0",
"graphql-tag": "^2.10.0",
"jquery": "^3.2.1",
"react": "15.3.1",
"react-addons-test-utils": "15.3.1",
"react-apollo": "^0.7.1",
"react-dom": "15.3.1",
"react-dnd": "^2.2.3",
"react-dnd-html5-backend": "^2.2.3",
"react-redux": "^4.4.1",
"reactstrap": "^5.0.0-beta",
"redux": "^3.3.1"
"popper.js": "^1.14.4",
"prop-types": "^15.6.2",
"react": "16.6.1",
"react-apollo": "^2.1.0",
"react-dom": "16.6.1",
"react-dnd": "^5.0.0",
"react-dnd-html5-backend": "^5.0.1",
"react-redux": "^5.0.7",
"reactstrap": "^6.4.0",
"redux": "^4.0.0"
},
"devDependencies": {
"@silverstripe/eslint-config": "^0.0.2",
"@silverstripe/webpack-config": "^0.14.0",
"babel-jest": "^20.0.3",
"babel-core": "^6.26.3",
"babel-jest": "^23.6.0",
"babel-loader": "^7.0.0",
"enzyme": "^3.3.0",
"enzyme-adapter-react-15.4": "^1.0.5",
"enzyme": "^3.6.0",
"enzyme-adapter-react-16": "^1.5.0",
"expose-loader": "^0.7.4",
"jest-cli": "^19.0.2",
"sass-loader": "^6.0.7"
"jest-cli": "^23.6.0",
"node-sass": "^4.5.3",
"sass-loader": "^6.0.7",
"webpack": "^2"
},
"jest": {
"roots": [
Expand Down Expand Up @@ -87,6 +93,6 @@
]
},
"engines": {
"node": "^6.x"
"node": "^10.x"
}
}

0 comments on commit 240e8f6

Please sign in to comment.