Unverified Commit 047d3ea6 authored by Daniel's avatar Daniel Committed by GitHub

Revert "Updated various dependencies to resolve security issues (#343)" (#344)

This reverts commit a73f0e1d.
parent a73f0e1d
...@@ -34,6 +34,7 @@ module.exports = { ...@@ -34,6 +34,7 @@ module.exports = {
transform: { transform: {
'^.+\\.tsx?$': 'ts-jest', '^.+\\.tsx?$': 'ts-jest',
'^.+\\.js$': 'babel-jest', '^.+\\.js$': 'babel-jest',
'^.+\\.(css|scss)$': '<rootDir>/node_modules/jest-css-modules',
}, },
testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.(j|t)sx?$', testRegex: '(/tests/.*|(\\.|/)(test|spec))\\.(j|t)sx?$',
moduleDirectories: ['node_modules', 'js'], moduleDirectories: ['node_modules', 'js'],
...@@ -44,9 +45,6 @@ module.exports = { ...@@ -44,9 +45,6 @@ module.exports = {
'jsx', 'jsx',
'json', 'json',
], ],
moduleNameMapper: {
'^.+\\.(css|scss)$': '<rootDir>/node_modules/jest-css-modules',
},
globals: { globals: {
'ts-jest': { 'ts-jest': {
diagnostics: false, diagnostics: false,
......
...@@ -2,7 +2,7 @@ import * as React from 'react'; ...@@ -2,7 +2,7 @@ import * as React from 'react';
import * as DocumentTitle from 'react-document-title'; import * as DocumentTitle from 'react-document-title';
import SanitizedHTML from 'react-sanitized-html'; import SanitizedHTML from 'react-sanitized-html';
import { shallow } from 'enzyme'; import { mount, shallow } from 'enzyme';
import { AnnouncementPage, AnnouncementPageProps, mapDispatchToProps, mapStateToProps } from '../'; import { AnnouncementPage, AnnouncementPageProps, mapDispatchToProps, mapStateToProps } from '../';
...@@ -26,7 +26,7 @@ describe('AnnouncementPage', () => { ...@@ -26,7 +26,7 @@ describe('AnnouncementPage', () => {
html_content: '<div>Just kidding</div>', html_content: '<div>Just kidding</div>',
}], }],
}; };
subject = shallow(<AnnouncementPage {...props} />); subject = mount(<AnnouncementPage {...props} />);
}); });
describe('componentDidMount', () => { describe('componentDidMount', () => {
......
...@@ -42,7 +42,7 @@ class WatermarkLabel extends React.Component<WatermarkLabelProps> { ...@@ -42,7 +42,7 @@ class WatermarkLabel extends React.Component<WatermarkLabelProps> {
} }
return ( return (
<div> <>
<div className="range-labels body-2"> <div className="range-labels body-2">
{ LOW_WATERMARK_LABEL } { LOW_WATERMARK_LABEL }
<br/> <br/>
...@@ -53,7 +53,7 @@ class WatermarkLabel extends React.Component<WatermarkLabelProps> { ...@@ -53,7 +53,7 @@ class WatermarkLabel extends React.Component<WatermarkLabelProps> {
<br/> <br/>
{ high && this.formatWatermarkDate(high) } { high && this.formatWatermarkDate(high) }
</div> </div>
</div> </>
); );
}; };
......
import * as React from 'react'; import * as React from 'react';
import { shallow } from 'enzyme'; import { shallow, mount } from 'enzyme';
import WatermarkLabel, { WatermarkLabelProps } from '../'; import WatermarkLabel, { WatermarkLabelProps } from '../';
import { import {
NO_WATERMARK_LINE_1, NO_WATERMARK_LINE_1,
...@@ -76,7 +76,7 @@ describe('WatermarkLabel', () => { ...@@ -76,7 +76,7 @@ describe('WatermarkLabel', () => {
it('renders the date when present', () => { it('renders the date when present', () => {
const watermarkInfo = instance.renderWatermarkInfo('2018-08-03', '2019-10-15'); const watermarkInfo = instance.renderWatermarkInfo('2018-08-03', '2019-10-15');
expect(shallow(watermarkInfo).find('.range-dates').text()).toBe('Aug 03, 2018Oct 15, 2019') expect(mount(watermarkInfo).find('.range-dates').text()).toBe('Aug 03, 2018Oct 15, 2019')
}); });
}); });
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@types/enzyme": "^3.10.3", "@types/enzyme": "^3.1.14",
"@types/jasmine-matchers": "^0.2.31", "@types/jasmine-matchers": "^0.2.31",
"@types/jest": "^24.0.23", "@types/jest": "^23.3.9",
"@types/node": "^10.12.10", "@types/node": "^10.12.10",
"@types/react-redux": "^6.0.0", "@types/react-redux": "^6.0.0",
"@types/react-router": "^4.0.25", "@types/react-router": "^4.0.25",
...@@ -35,18 +35,18 @@ ...@@ -35,18 +35,18 @@
"@types/webpack": "^4.4.19", "@types/webpack": "^4.4.19",
"babel-cli": "^6.26.0", "babel-cli": "^6.26.0",
"babel-core": "^6.26.0", "babel-core": "^6.26.0",
"babel-jest": "^24.9.0", "babel-jest": "^23.6.0",
"babel-loader": "^7.1.4", "babel-loader": "^7.1.4",
"babel-polyfill": "^6.0.16", "babel-polyfill": "^6.0.16",
"babel-preset-env": "^1.7.0", "babel-preset-env": "^1.7.0",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1", "babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.0.15", "babel-preset-stage-0": "^6.0.15",
"bootstrap-sass": "^3.4.1", "bootstrap-sass": "^3.3.7",
"clean-webpack-plugin": "^0.1.19", "clean-webpack-plugin": "^0.1.19",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"css-loader": "^3.2.0", "css-loader": "^0.28.11",
"enzyme": "^3.10.0", "enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0", "enzyme-adapter-react-16": "^1.6.0",
"enzyme-to-json": "^3.3.4", "enzyme-to-json": "^3.3.4",
"eslint": "^4.9.0", "eslint": "^4.9.0",
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
"eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.4.0", "eslint-plugin-react": "^7.4.0",
"html-webpack-plugin": "^3.2.0", "html-webpack-plugin": "^3.2.0",
"jest": "^24.9.0", "jest": "^24.0.0",
"jest-css-modules": "^2.1.0", "jest-css-modules": "^1.1.0",
"mini-css-extract-plugin": "^0.4.5", "mini-css-extract-plugin": "^0.4.5",
"node-sass": "^4.10.0", "node-sass": "^4.10.0",
"postcss": "^7.0.6", "postcss": "^7.0.6",
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"style-loader": "^0.20.3", "style-loader": "^0.20.3",
"terser-webpack-plugin": "^1.1.0", "terser-webpack-plugin": "^1.1.0",
"ts-jest": "^24.1.0", "ts-jest": "^24.0.0",
"ts-loader": "^6.2.1", "ts-loader": "4.0.0",
"ts-node": "^8.5.2", "ts-node": "^7.0.1",
"tsconfig-paths": "^3.9.0", "tsconfig-paths": "^3.7.0",
"tslint": "^5.20.1", "tslint": "^5.10.0",
"tslint-config-airbnb": "^5.8.0", "tslint-config-airbnb": "^5.8.0",
"tslint-config-prettier": "^1.12.0", "tslint-config-prettier": "^1.12.0",
"tslint-eslint-rules": "^5.2.0", "tslint-eslint-rules": "^5.2.0",
...@@ -88,13 +88,13 @@ ...@@ -88,13 +88,13 @@
"autosize": "^4.0.2", "autosize": "^4.0.2",
"axios": "0.19.0", "axios": "0.19.0",
"form-serialize": "^0.7.2", "form-serialize": "^0.7.2",
"jquery": "^3.4.0", "jquery": "^3.3.1",
"moment-timezone": "^0.5.21", "moment-timezone": "^0.5.21",
"react": "^16.3.1", "react": "^16.3.1",
"react-avatar": "^2.5.1", "react-avatar": "^2.5.1",
"react-bootstrap": "^0.32.1", "react-bootstrap": "^0.32.1",
"react-document-title": "^2.0.3", "react-document-title": "^2.0.3",
"react-dom": "^16.3.3", "react-dom": "^16.3.1",
"react-js-pagination": "^3.0.2", "react-js-pagination": "^3.0.2",
"react-linkify": "^0.2.2", "react-linkify": "^0.2.2",
"react-markdown": "^4.2.2", "react-markdown": "^4.2.2",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment