Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Upgrade babel and core-js
Browse files Browse the repository at this point in the history
This change also isolates the nested dependencies of the react-scripts package used in the builder, which were previously causing dependency conflicts, and fixes a flaky test
  • Loading branch information
FelixHenninger committed Jan 5, 2020
1 parent 3f391c4 commit ab6b8ef
Show file tree
Hide file tree
Showing 6 changed files with 231 additions and 468 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"lab.js/sinon",
"lab.js/sinon/**",
"lab.js.builder/bootstrap",
"lab.js.builder/react-scripts",
"lab.js.builder/react-scripts/**",
"lab.js.website/bootstrap"
]
}
Expand Down
19 changes: 9 additions & 10 deletions packages/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
"main": "dist/lab.js",
"module": "src/index.js",
"dependencies": {
"@babel/runtime": "^7.1.2",
"babel-polyfill": "^6.23.0",
"@babel/runtime": "^7.7.0",
"common-tags": "^1.8.0",
"core-js": "^2.5.6",
"core-js": "^3.6.1",
"cross-env": "^5.2.0",
"es2015-proxy": "^0.1.7",
"es6-promise": "^4.1.0",
Expand All @@ -30,15 +29,15 @@
"whatwg-fetch": "^2.0.4"
},
"devDependencies": {
"@babel/core": "^7.1.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/core": "^7.7.0",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@babel/plugin-proposal-object-rest-spread": "^7.7.0",
"@babel/plugin-transform-regenerator": "^7.7.0",
"@babel/plugin-transform-runtime": "^7.7.0",
"@babel/preset-env": "^7.7.0",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.0",
"babel-loader": "8.0.4",
"babel-plugin-istanbul": "^5.1.0",
"babel-plugin-lodash": "^3.2.6",
"babel-preset-minify": "^0.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/library/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Polyfill
import 'babel-polyfill'
// Load standard library polyfill
import 'core-js/stable'

// Components
import { Component, Dummy } from './core'
Expand Down
9 changes: 5 additions & 4 deletions packages/library/test/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,12 @@ describe('Flow control', () => {
const a = new lab.core.Dummy()
s.options.content = [a]

let error

return s.run().then(() => {
s.step().catch(err => (error = err))
}).then(() => {
// Step beyond last sequence content, resolve error
// TODO: Extracting the error message here is not nice --
// it would be nicer to use chai-as-promised and assert.isRejected
return new Promise(resolve => s.step().catch(resolve))
}).then(error => {
assert.equal(
error.message,
'Sequence ended, can\'t take any more steps'
Expand Down
2 changes: 2 additions & 0 deletions packages/library/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = (env, argv) => {
// Module generation is handled by webpack
modules: false,
useBuiltIns: 'usage',
corejs: 3,
}],
],
plugins: [
Expand Down Expand Up @@ -74,6 +75,7 @@ module.exports = (env, argv) => {
// Module generation is handled by webpack
modules: false,
useBuiltIns: 'usage',
corejs: 3,
}],
],
plugins: [
Expand Down
Loading

0 comments on commit ab6b8ef

Please sign in to comment.