Switch to React 16.8

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2019-08-01 15:31:33 +01:00
parent e577f30cb5
commit 06e7a48aaf
8 changed files with 14 additions and 32 deletions

View File

@ -68,6 +68,7 @@
"babel-runtime": "^6.26.0",
"bluebird": "^3.5.2",
"browser-request": "^0.3.3",
"create-react-class": "^15.6.0",
"draft-js": "^0.11.0-alpha",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"favico.js": "^0.3.10",
@ -78,9 +79,9 @@
"matrix-react-sdk": "1.4.0",
"modernizr": "^3.6.0",
"olm": "https://packages.matrix.org/npm/olm/olm-3.1.0.tgz",
"prop-types": "^15.6.2",
"react": "^15.6.0",
"react-dom": "^15.6.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"sanitize-html": "^1.19.1",
"ua-parser-js": "^0.7.19",
"url": "^0.11.0"
@ -144,8 +145,6 @@
"postcss-scss": "^1.0.6",
"postcss-simple-vars": "^4.1.0",
"postcss-strip-inline-comments": "^0.1.5",
"react-addons-perf": "^15.4.0",
"react-addons-test-utils": "^15.6.0",
"rimraf": "^2.4.3",
"source-map-loader": "^0.2.4",
"webpack": "^4.23.1",

View File

@ -15,14 +15,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
'use strict';
const React = require('react');
import React from 'react';
import createReactClass from 'create-react-class';
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
module.exports = React.createClass({
module.exports = createReactClass({
displayName: 'VectorAuthFooter',
statics: {
replaces: 'AuthFooter',

View File

@ -15,14 +15,15 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
const React = require("react");
import React from "react";
import createReactClass from 'create-react-class';
import { _t } from 'matrix-react-sdk/lib/languageHandler';
/**
* This is identical to `CustomServerDialog` except for replacing "this app"
* with "Riot".
*/
module.exports = React.createClass({
module.exports = createReactClass({
displayName: 'VectorCustomServerDialog',
statics: {
replaces: 'CustomServerDialog',

View File

@ -33,9 +33,6 @@ import React from 'react';
// add React and ReactPerf to the global namespace, to make them easier to
// access via the console
global.React = React;
if (process.env.NODE_ENV !== 'production') {
global.Perf = require('react-addons-perf');
}
import './modernizr';
import ReactDOM from 'react-dom';

View File

@ -34,7 +34,7 @@ const RoomView = sdk.getComponent('structures.RoomView');
const React = require('react');
const ReactDOM = require('react-dom');
const ReactTestUtils = require('react-addons-test-utils');
const ReactTestUtils = require('react-dom/test-utils');
const expect = require('expect');
import Promise from 'bluebird';
import {makeType} from "matrix-react-sdk/lib/utils/TypeUtils";

View File

@ -23,7 +23,7 @@ import 'skin-sdk';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactTestUtils from 'react-addons-test-utils';
import ReactTestUtils from 'react-dom/test-utils';
import expect from 'expect';
import Promise from 'bluebird';
import MatrixReactTestUtils from 'matrix-react-test-utils';

View File

@ -152,7 +152,6 @@ module.exports = {
// using `npm link` / `yarn link`.
"react": path.resolve('./node_modules/react'),
"react-dom": path.resolve('./node_modules/react-dom'),
"react-addons-perf": path.resolve('./node_modules/react-addons-perf'),
// same goes for js-sdk
"matrix-js-sdk": path.resolve('./node_modules/matrix-js-sdk'),

View File

@ -7396,19 +7396,6 @@ react-addons-css-transition-group@15.3.2:
resolved "https://registry.yarnpkg.com/react-addons-css-transition-group/-/react-addons-css-transition-group-15.3.2.tgz#d8fa52bec9bb61bdfde8b9e4652b80297cbff667"
integrity sha1-2PpSvsm7Yb396LnkZSuAKXy/9mc=
react-addons-perf@^15.4.0:
version "15.4.2"
resolved "https://registry.yarnpkg.com/react-addons-perf/-/react-addons-perf-15.4.2.tgz#110bdcf5c459c4f77cb85ed634bcd3397536383b"
integrity sha1-EQvc9cRZxPd8uF7WNLzTOXU2ODs=
dependencies:
fbjs "^0.8.4"
object-assign "^4.1.0"
react-addons-test-utils@^15.6.0:
version "15.6.2"
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.6.2.tgz#c12b6efdc2247c10da7b8770d185080a7b047156"
integrity sha1-wStu/cIkfBDae4dw0YUICnsEcVY=
react-beautiful-dnd@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-4.0.1.tgz#3b0a49bf6be75af351176c904f012611dd292b81"
@ -7435,7 +7422,7 @@ react-dom@^15.6.0, react-dom@^15.6.1:
object-assign "^4.1.0"
prop-types "^15.5.10"
react-dom@^16.4.2:
react-dom@^16.4.2, react-dom@^16.8.6:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==
@ -7499,7 +7486,7 @@ react@^15.6.0, react@^15.6.1:
object-assign "^4.1.0"
prop-types "^15.5.10"
react@^16.4.2:
react@^16.4.2, react@^16.8.6:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe"
integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw==