Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
(chore) Update dependencies
Browse files Browse the repository at this point in the history
- Update to latest major versions: `babel`, `jest`, `redux-saga`, `reselect` and `styled-components`
- Replace `babel-polyfill` with `core-js`
- Drop Node.js 8 support
- Disable styled components snapshot tests: `styled-components@4` doesn't support snapshot yet
- Update snapshots after updating React
- Don't support Node.js 12 yet due to `natives` module incompatibility (nodejs/node#27422)
  • Loading branch information
Nikolay Borzov committed Jun 11, 2019
1 parent 96158e4 commit 1ac31d5
Show file tree
Hide file tree
Showing 35 changed files with 18,272 additions and 17,121 deletions.
16 changes: 8 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"plugins": [
[ "styled-components", { "displayName": false, "ssr": true }],
"transform-class-properties",
"transform-object-rest-spread",
"syntax-dynamic-import",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-syntax-dynamic-import",
"react-loadable/babel"
],
"presets": [
["env", { "modules": false }],
"flow",
"react"
["@babel/preset-env", { "modules": false }],
"@babel/preset-flow",
"@babel/preset-react"
],
"retainLines": true,
"env": {
Expand All @@ -22,10 +22,10 @@
"test": {
"plugins": [
[ "styled-components", { "fileName": false }],
"transform-class-properties",
"@babel/plugin-proposal-class-properties",
"dynamic-import-node"
],
"presets": ["env", "react"]
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
}
}
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js

node_js:
- "8"
- "10"

cache:
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ module.exports = {
],
coverageReporters: ['lcov', 'text'],
transformIgnorePatterns: ['node_modules/(?!(lodash-es)/)'],
setupTestFrameworkScriptFile: '<rootDir>jest/setup.js'
setupFilesAfterEnv: ['<rootDir>jest/setup.js']
}
5 changes: 1 addition & 4 deletions jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import promiseFinally from 'promise.prototype.finally'
import 'regenerator-runtime/runtime'

import Enzyme, { shallow, render, mount } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'

// Bring '.finally' to Promise (only for Node 8). Will be available in Node 10
promiseFinally.shim()

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

// Make Enzyme functions available in all test files without importing
Expand Down
6 changes: 3 additions & 3 deletions jest/test-helpers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const runSaga = (saga, state = {}, arg1 = undefined) => {
},
saga,
arg1
).done.then(() => {
return dispatched
})
)
.toPromise()
.then(() => dispatched)
}
Loading

0 comments on commit 1ac31d5

Please sign in to comment.