React 16 (#7174)
* Update packages to use React 16 * Rollback to react-router v3 * Use component instead of pure one * Remove warning about mobx * Make webpack load css from @parity/ui * Update enzyme to support react16 * Fix lint * Use @parity/ui v3 * Update refs of plugin-signer-* deps * Exclude plugin-signer-* from babel processing * Reupdate refs to old method * Update refs again
This commit is contained in:
parent
7663451116
commit
2a7b2c7e32
2493
js/package-lock.json
generated
2493
js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,7 @@
|
|||||||
"babel-register": "6.26.0",
|
"babel-register": "6.26.0",
|
||||||
"chai": "3.5.0",
|
"chai": "3.5.0",
|
||||||
"chai-as-promised": "6.0.0",
|
"chai-as-promised": "6.0.0",
|
||||||
"chai-enzyme": "0.6.1",
|
"chai-enzyme": "1.0.0-beta.0",
|
||||||
"chalk": "1.1.3",
|
"chalk": "1.1.3",
|
||||||
"copy-webpack-plugin": "4.0.1",
|
"copy-webpack-plugin": "4.0.1",
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
@ -87,7 +87,8 @@
|
|||||||
"ejsify": "1.0.0",
|
"ejsify": "1.0.0",
|
||||||
"electron": "1.7.5",
|
"electron": "1.7.5",
|
||||||
"empty-module": "0.0.2",
|
"empty-module": "0.0.2",
|
||||||
"enzyme": "2.9.1",
|
"enzyme": "3.2.0",
|
||||||
|
"enzyme-adapter-react-16": "1.1.0",
|
||||||
"eslint": "3.16.1",
|
"eslint": "3.16.1",
|
||||||
"eslint-config-semistandard": "7.0.0",
|
"eslint-config-semistandard": "7.0.0",
|
||||||
"eslint-config-standard": "6.2.1",
|
"eslint-config-standard": "6.2.1",
|
||||||
@ -120,8 +121,8 @@
|
|||||||
"progress": "1.1.8",
|
"progress": "1.1.8",
|
||||||
"raw-loader": "0.5.1",
|
"raw-loader": "0.5.1",
|
||||||
"react-addons-perf": "15.4.2",
|
"react-addons-perf": "15.4.2",
|
||||||
"react-addons-test-utils": "15.4.2",
|
"react-addons-test-utils": "15.6.2",
|
||||||
"react-hot-loader": "3.0.0-beta.6",
|
"react-hot-loader": "3.1.3",
|
||||||
"react-intl-aggregate-webpack-plugin": "0.0.1",
|
"react-intl-aggregate-webpack-plugin": "0.0.1",
|
||||||
"rimraf": "2.6.2",
|
"rimraf": "2.6.2",
|
||||||
"sinon": "1.17.7",
|
"sinon": "1.17.7",
|
||||||
@ -150,22 +151,27 @@
|
|||||||
"@parity/plugin-signer-hardware": "paritytech/plugin-signer-hardware",
|
"@parity/plugin-signer-hardware": "paritytech/plugin-signer-hardware",
|
||||||
"@parity/plugin-signer-qr": "paritytech/plugin-signer-qr",
|
"@parity/plugin-signer-qr": "paritytech/plugin-signer-qr",
|
||||||
"@parity/shared": "2.2.x",
|
"@parity/shared": "2.2.x",
|
||||||
"@parity/ui": "2.2.x",
|
"@parity/ui": "3.0.x",
|
||||||
"keythereum": "1.0.2",
|
"keythereum": "1.0.2",
|
||||||
"lodash.flatten": "4.4.0",
|
"lodash.flatten": "4.4.0",
|
||||||
"lodash.omitby": "4.6.0",
|
"lodash.omitby": "4.6.0",
|
||||||
"lodash.throttle": "4.1.1",
|
"lodash.throttle": "4.1.1",
|
||||||
"lodash.uniq": "4.5.0",
|
"lodash.uniq": "4.5.0",
|
||||||
"material-ui": "0.16.5",
|
"material-ui": "0.16.5",
|
||||||
|
"mobx": "3.3.2",
|
||||||
|
"mobx-react": "4.3.5",
|
||||||
"prop-types": "15.5.10",
|
"prop-types": "15.5.10",
|
||||||
"query-string": "5.0.1",
|
"query-string": "5.0.1",
|
||||||
"react": "15.6.1",
|
"react": "16.1.1",
|
||||||
"react-dom": "15.6.1",
|
"react-dom": "16.1.1",
|
||||||
"react-intl": "2.1.5",
|
"react-intl": "2.4.0",
|
||||||
"react-markdown": "2.5.0",
|
"react-markdown": "3.0.2",
|
||||||
"react-router": "3.0.0",
|
"react-redux": "^5.0.6",
|
||||||
"react-tap-event-plugin": "2.0.1",
|
"react-router": "3.2.0",
|
||||||
"redux": "3.6.0",
|
"react-router-redux": "4.0.8",
|
||||||
|
"react-tap-event-plugin": "3.0.2",
|
||||||
|
"react-transition-group": "2.2.1",
|
||||||
|
"redux": "3.7.2",
|
||||||
"solc": "ngotchac/solc-js",
|
"solc": "ngotchac/solc-js",
|
||||||
"store": "1.3.20",
|
"store": "1.3.20",
|
||||||
"web3": "0.17.0-beta"
|
"web3": "0.17.0-beta"
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.full {
|
.full {
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import { observer } from 'mobx-react';
|
import { observer } from 'mobx-react';
|
||||||
import React, { PureComponent } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import RequestGroups from './RequestGroups';
|
import RequestGroups from './RequestGroups';
|
||||||
import Store from './store';
|
import Store from './store';
|
||||||
import styles from './dappRequests.css';
|
import styles from './dappRequests.css';
|
||||||
|
|
||||||
class DappRequests extends PureComponent {
|
class DappRequests extends Component {
|
||||||
store = Store.get();
|
store = Store.get();
|
||||||
|
|
||||||
handleApproveRequestGroup = requestIds => {
|
handleApproveRequestGroup = requestIds => {
|
||||||
|
@ -40,12 +40,17 @@ injectTapEventPlugin();
|
|||||||
|
|
||||||
window.React = window.React || React;
|
window.React = window.React || React;
|
||||||
|
|
||||||
|
// FIXME
|
||||||
|
// Not working with React 16
|
||||||
|
// https://reactjs.org/docs/perf.html
|
||||||
|
/*
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// Expose the React Performance Tools on the`window` object
|
// Expose the React Performance Tools on the`window` object
|
||||||
const Perf = require('react-addons-perf');
|
const Perf = require('react-addons-perf');
|
||||||
|
|
||||||
window.Perf = Perf;
|
window.Perf = Perf;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
const AUTH_HASH = '#/auth?';
|
const AUTH_HASH = '#/auth?';
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import mobx from 'mobx';
|
import * as mobx from 'mobx';
|
||||||
import flatten from 'lodash.flatten';
|
import flatten from 'lodash.flatten';
|
||||||
|
|
||||||
import { sha3 } from '@parity/api/lib/util/sha3';
|
import { sha3 } from '@parity/api/lib/util/sha3';
|
||||||
|
@ -23,6 +23,8 @@ es6Promise.polyfill();
|
|||||||
import injectTapEventPlugin from 'react-tap-event-plugin';
|
import injectTapEventPlugin from 'react-tap-event-plugin';
|
||||||
injectTapEventPlugin();
|
injectTapEventPlugin();
|
||||||
|
|
||||||
|
import Enzyme from 'enzyme';
|
||||||
|
import Adapter from 'enzyme-adapter-react-16';
|
||||||
import chai from 'chai';
|
import chai from 'chai';
|
||||||
import chaiAsPromised from 'chai-as-promised';
|
import chaiAsPromised from 'chai-as-promised';
|
||||||
import chaiEnzyme from 'chai-enzyme';
|
import chaiEnzyme from 'chai-enzyme';
|
||||||
@ -31,6 +33,7 @@ import sinonChai from 'sinon-chai';
|
|||||||
import { WebSocket } from 'mock-socket';
|
import { WebSocket } from 'mock-socket';
|
||||||
import jsdom from 'jsdom';
|
import jsdom from 'jsdom';
|
||||||
|
|
||||||
|
Enzyme.configure({ adapter: new Adapter() });
|
||||||
chai.use(chaiAsPromised);
|
chai.use(chaiAsPromised);
|
||||||
chai.use(chaiEnzyme());
|
chai.use(chaiEnzyme());
|
||||||
chai.use(sinonChai);
|
chai.use(sinonChai);
|
||||||
@ -44,7 +47,7 @@ global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
|
|||||||
global.window = document.defaultView;
|
global.window = document.defaultView;
|
||||||
global.navigator = global.window.navigator;
|
global.navigator = global.window.navigator;
|
||||||
global.location = global.window.location;
|
global.location = global.window.location;
|
||||||
global.Blob = () => {};
|
global.Blob = () => { };
|
||||||
|
|
||||||
// attach mocked localStorage onto the window as exposed by jsdom
|
// attach mocked localStorage onto the window as exposed by jsdom
|
||||||
global.window.localStorage = global.localStorage;
|
global.window.localStorage = global.localStorage;
|
||||||
|
@ -69,12 +69,12 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: [ {
|
use: [{
|
||||||
loader: 'happypack/loader',
|
loader: 'happypack/loader',
|
||||||
options: {
|
options: {
|
||||||
id: 'babel'
|
id: 'babel'
|
||||||
}
|
}
|
||||||
} ]
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.json$/,
|
test: /\.json$/,
|
||||||
@ -90,7 +90,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
include: /semantic-ui-css/,
|
include: /semantic-ui-css|@parity\/ui/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: ExtractTextPlugin.extract({
|
||||||
fallback: 'style-loader',
|
fallback: 'style-loader',
|
||||||
use: [
|
use: [
|
||||||
@ -105,7 +105,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
exclude: /semantic-ui-css/,
|
exclude: /semantic-ui-css|@parity\/ui/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: ExtractTextPlugin.extract({
|
||||||
fallback: 'style-loader',
|
fallback: 'style-loader',
|
||||||
use: [
|
use: [
|
||||||
@ -231,17 +231,17 @@ module.exports = {
|
|||||||
isProd ? null : 'dist.css.map',
|
isProd ? null : 'dist.css.map',
|
||||||
isProd ? null : 'dist.js.map'
|
isProd ? null : 'dist.js.map'
|
||||||
]
|
]
|
||||||
.filter((file) => file)
|
.filter((file) => file)
|
||||||
.map((file) => path.join(dir, file))
|
.map((file) => path.join(dir, file))
|
||||||
.filter((from) => fs.existsSync(from))
|
.filter((from) => fs.existsSync(from))
|
||||||
.map((from) => ({
|
.map((from) => ({
|
||||||
from,
|
from,
|
||||||
to: `dapps/${destination}/`
|
to: `dapps/${destination}/`
|
||||||
}))
|
}))
|
||||||
.concat({
|
.concat({
|
||||||
from: path.join(dir, 'dist'),
|
from: path.join(dir, 'dist'),
|
||||||
to: `dapps/${destination}/dist/`
|
to: `dapps/${destination}/dist/`
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.filter((copy) => copy)
|
.filter((copy) => copy)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user