diff --git a/.babelrc b/.babelrc index ce9a546..e1fbe44 100644 --- a/.babelrc +++ b/.babelrc @@ -1,19 +1,34 @@ { - "presets": ["babel-preset-es2015"], + "presets": [ + [ + "babel-preset-env", + { + "exclude": [ + "transform-async-to-generator", + "transform-regenerator" + ] + } + ] + ], "plugins": [ "babel-plugin-transform-flow-strip-types", "babel-plugin-transform-decorators-legacy", "babel-plugin-transform-class-properties", "babel-plugin-transform-object-rest-spread", - ["fast-async", { - "useRuntimeModule": true - }], + [ + "fast-async", + { + "useRuntimeModule": true + } + ], "babel-plugin-lodash", "babel-plugin-transform-runtime" ], "env": { "coverage": { - "plugins": ["babel-plugin-istanbul"] + "plugins": [ + "babel-plugin-istanbul" + ] } } } diff --git a/package.json b/package.json index 2e9f73d..91dc066 100644 --- a/package.json +++ b/package.json @@ -50,24 +50,25 @@ "devDependencies": { "anymatch": "^1.3.0", "babel-cli": "^6.5.1", - "babel-eslint": "^6.1.2", + "babel-core": "^6.26.0", + "babel-eslint": "^7.2.3", "babel-loader": "~7.1.0", - "babel-plugin-istanbul": "^3.0.0", + "babel-plugin-istanbul": "^4.1.5", "babel-plugin-lodash": "^3.2.10", "babel-plugin-transform-class-properties": "^6.5.2", "babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-flow-strip-types": "^6.18.0", "babel-plugin-transform-object-rest-spread": "^6.19.0", "babel-plugin-transform-runtime": "^6.15.0", - "babel-preset-es2015": "^6.5.0", + "babel-preset-env": "^1.6.1", "babel-register": "^6.5.2", "bdd-lazy-var": "^1.3.1", "chai": "^4.1.0", "coffee-script": "^1.11.1", - "cross-env": "^3.1.3", - "css-loader": "~0.26.1", - "del": "^2.2.0", - "del-cli": "^0.2.0", + "cross-env": "^5.1.0", + "css-loader": "~0.28.7", + "del": "^3.0.0", + "del-cli": "^1.1.0", "eslint": "^3.1.0", "eslint-config-airbnb-base": "^4.0.2", "eslint-plugin-flowtype": "^2.29.1", @@ -75,33 +76,34 @@ "eslint-plugin-import": "^1.11.0", "fast-async": "^6.1.2", "flow-bin": "^0.36.0", - "fs-extra": "^0.30.0", - "gh-pages": "^0.12.0", + "fs-extra": "^4.0.2", + "gh-pages": "^1.0.0", "gitbook-cli": "^2.3.0", - "glob": "7.0.5", + "glob": "7.1.2", "mocha": "^4.0.1", - "node-sass": "~4.1.1", + "node-sass": "~4.5.3", "np": "^2.9.0", - "nyc": "^10.0.0", + "nyc": "^11.3.0", "sass-loader": "~6.0.0", - "sinon": "^1.17.3", + "sinon": "^4.0.1", "webpack": "^3.7.1" }, "dependencies": { "babel-runtime": "^6.18.0", - "chalk": "^1.1.3", + "chalk": "^2.3.0", "chokidar": "^1.6.1", - "glob-parent": "^2.0.0", + "glob-parent": "^3.1.0", "globby": "^6.1.0", "interpret": "^1.0.1", - "is-glob": "^2.0.1", + "is-glob": "^4.0.0", "loader-utils": "^1.1.0", "lodash": "^4.3.0", "memory-fs": "^0.4.1", "nodent-runtime": "^3.0.3", "normalize-path": "^2.0.1", - "progress": "^1.1.8", - "source-map-support": "^0.4.6", + "progress": "^2.0.0", + "source-map-support": "^0.5.0", + "strip-ansi": "^4.0.0", "toposort": "^1.0.0", "yargs": "^4.8.0" }, diff --git a/test/integration/statsFormatter/statsFormatter.test.js b/test/integration/statsFormatter/statsFormatter.test.js index 3aa98b8..6b9b517 100644 --- a/test/integration/statsFormatter/statsFormatter.test.js +++ b/test/integration/statsFormatter/statsFormatter.test.js @@ -4,7 +4,7 @@ import fs from 'fs-extra'; import path from 'path'; import _ from 'lodash'; -import chalk from 'chalk'; +import stripAnsi from 'strip-ansi'; import webpack from 'webpack'; import { version as WEBPACK_VERSION } from 'webpack/package.json'; import MemoryFileSystem from 'memory-fs'; @@ -27,7 +27,7 @@ const webpackConfig = { test: /.js$/, loader: 'babel-loader', query: { - presets: ['babel-preset-es2015'], + presets: ['babel-preset-env'], }, }, { @@ -59,7 +59,7 @@ describe('statFormatter', function () { // make os & location independent messages without colors const ensureConsistentCompare = _.flow([ - chalk.stripColor, + stripAnsi, (message) => message.replace(/\r?\n/g, '\n'), (message) => message.replace(testDirPath, `Xdir/${testName}`), ]);