Run npm audit --fix and fix tests

This commit is contained in:
Jerko Steiner 2019-07-07 10:10:19 +08:00
parent 8a236f9630
commit d9fee4eeec
6 changed files with 2978 additions and 9191 deletions

1
jest.setup.js Normal file
View File

@ -0,0 +1 @@
import '@babel/polyfill'

4662
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -72,14 +72,15 @@
"uuid": "^3.3.2" "uuid": "^3.3.2"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.2.0", "@babel/core": "^7.5.0",
"@babel/plugin-proposal-class-properties": "^7.2.1", "@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/plugin-proposal-object-rest-spread": "^7.2.0", "@babel/plugin-proposal-object-rest-spread": "^7.5.1",
"@babel/preset-env": "^7.2.0", "@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.5.0",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1", "babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0", "babel-jest": "^24.8.0",
"babelify": "^10.0.0", "babelify": "^10.0.0",
"chastifol": "^4.1.0", "chastifol": "^4.1.0",
"eslint": "^5.10.0", "eslint": "^5.10.0",
@ -90,18 +91,21 @@
"eslint-plugin-promise": "^4.0.1", "eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.0.1", "eslint-plugin-react": "^7.0.1",
"eslint-plugin-standard": "^4.0.0", "eslint-plugin-standard": "^4.0.0",
"jest-cli": "^23.6.0", "jest-cli": "^24.8.0",
"node-sass": "^4.11.0", "node-sass": "^4.11.0",
"nodemon": "^1.18.8", "nodemon": "^1.18.8",
"redux-mock-store": "^1.2.3", "redux-mock-store": "^1.2.3",
"supertest": "^3.0.0", "supertest": "^3.0.0",
"uglify-js": "^3.4.9", "uglify-js": "^3.4.9",
"watchify": "^3.9.0" "watchify": "^3.11.1"
}, },
"jest": { "jest": {
"transform": { "transform": {
".*": "<rootDir>/node_modules/babel-jest" "^.+\\.[t|j]sx?$": "<rootDir>/node_modules/babel-jest"
}, },
"setupFiles": [
"./jest.setup.js"
],
"modulePathIgnorePatterns": [ "modulePathIgnorePatterns": [
"<rootDir>/node_modules/" "<rootDir>/node_modules/"
] ]

View File

@ -27,6 +27,8 @@ export default class App extends React.PureComponent {
this.state = { this.state = {
videos: {} videos: {}
} }
this.chatRef = React.createRef()
this.toolbarRef = React.createRef()
} }
componentDidMount () { componentDidMount () {
const { init } = this.props const { init } = this.props
@ -54,11 +56,11 @@ export default class App extends React.PureComponent {
chatRef={this.chatRef} chatRef={this.chatRef}
messages={messages} messages={messages}
stream={streams[constants.ME]} stream={streams[constants.ME]}
ref={node => { this.toolbarRef = node }} ref={this.toolbarRef}
/> />
<Alerts alerts={alerts} dismiss={dismissAlert} /> <Alerts alerts={alerts} dismiss={dismissAlert} />
<Notifications notifications={notifications} /> <Notifications notifications={notifications} />
<div className="chat-container" ref={node => { this.chatRef = node }}> <div className="chat-container" ref={this.chatRef}>
<Chat <Chat
messages={messages} messages={messages}
videos={videos} videos={videos}

View File

@ -1,4 +1,5 @@
'use strict' 'use strict'
import '@babel/polyfill'
import App from './containers/App.js' import App from './containers/App.js'
import React from 'react' import React from 'react'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'

7479
yarn.lock

File diff suppressed because it is too large Load Diff