Skip to content

Commit ca61eea

Browse files
committed
minor #754 Upgrade dependencies (stof)
This PR was squashed before being merged into the master branch. Discussion ---------- Upgrade dependencies This upgrades a bunch of dependencies to their latest version. Things I intentionally kept out of this PR: - test frameworks (mocha, sinon and chai), as upgrading them is more risky (when I don't touch them, I can rely on the existing testsuite to check the upgrade). These should be handled separately (especially given that they are massively outdated, requiring many major version bumps and so potentially many changes in the tests). See #753 - webpack loaders and plugins, as such upgrades can create BC breaks for Encore itself (and so they deserve separate PRs to test them and make them visible). See #751, #749, #742 for some of them Commits ------- dddad18 Upgrade http-server 6704dd0 Upgrade fs-extra b08417d Upgrade tmp 847e9c7 Upgrade semver 27fc03a Upgrade pkg-up 7dfd592 Upgrade loader-utils 410c7fc Upgrade chalk packages
2 parents b06d1bd + dddad18 commit ca61eea

12 files changed

+127
-77
lines changed

bin/encore.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
const parseRuntime = require('../lib/config/parse-runtime');
1414
const context = require('../lib/context');
15-
const chalk = require('chalk').default;
15+
const chalk = require('chalk');
1616
const logger = require('../lib/logger');
1717

1818
const runtimeConfig = parseRuntime(

lib/EncoreProxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313
const levenshtein = require('fast-levenshtein');
1414
const prettyError = require('./utils/pretty-error');
1515

lib/config/parse-runtime.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.exports = function(argv, cwd) {
6464

6565
runtimeConfig.context = argv.context;
6666
if (typeof runtimeConfig.context === 'undefined') {
67-
const packagesPath = pkgUp.sync(cwd);
67+
const packagesPath = pkgUp.sync({ cwd });
6868

6969
if (null === packagesPath) {
7070
throw new Error('Cannot determine webpack context. (Are you executing webpack from a directory outside of your project?). Try passing the --context option.');

lib/friendly-errors/asset-output-display-plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313

1414
function AssetOutputDisplayPlugin(outputPath, friendlyErrorsPlugin) {
1515
this.outputPath = outputPath;

lib/friendly-errors/formatters/missing-css-file.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313

1414
function formatErrors(errors) {
1515
if (errors.length === 0) {

lib/friendly-errors/formatters/missing-loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313
const loaderFeatures = require('../../features');
1414

1515
function formatErrors(errors) {

lib/friendly-errors/formatters/missing-postcss-config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313

1414
function formatErrors(errors) {
1515
if (errors.length === 0) {

lib/loaders/eslint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ module.exports = {
4545
}
4646
} catch (e) {
4747
if (isMissingConfigError(e)) {
48-
const chalk = require('chalk').default;
48+
const chalk = require('chalk');
4949
const packageHelper = require('../package-helper');
5050

5151
const message = `No ESLint configration has been found.

lib/logger.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313

1414
const messagesKeys = [
1515
'debug',

lib/package-helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
const chalk = require('chalk').default;
12+
const chalk = require('chalk');
1313
const fs = require('fs');
1414
const logger = require('./logger');
1515
const semver = require('semver');

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@
3030
"@babel/preset-env": "^7.4.0",
3131
"assets-webpack-plugin": "^3.9.7",
3232
"babel-loader": "^8.0.0",
33-
"chalk": "^2.4.1",
33+
"chalk": "^4.0.0",
3434
"clean-webpack-plugin": "^0.1.19",
3535
"css-loader": "^3.5.2",
3636
"fast-levenshtein": "^2.0.6",
3737
"file-loader": "^6.0.0",
3838
"friendly-errors-webpack-plugin": "^2.0.0-beta.1",
39-
"loader-utils": "^1.1.0",
39+
"loader-utils": "^2.0.0",
4040
"mini-css-extract-plugin": ">=0.4.0 <0.4.3",
4141
"optimize-css-assets-webpack-plugin": "^5.0.1",
42-
"pkg-up": "^1.0.0",
42+
"pkg-up": "^3.1.0",
4343
"pretty-error": "^2.1.1",
4444
"resolve-url-loader": "^3.0.1",
45-
"semver": "^5.5.0",
45+
"semver": "^7.3.2",
4646
"style-loader": "^1.1.3",
4747
"terser-webpack-plugin": "^1.1.0",
48-
"tmp": "^0.0.33",
48+
"tmp": "^0.2.1",
4949
"webpack": "^4.20.0",
5050
"webpack-cli": "^3.0.0",
5151
"webpack-dev-server": "^3.1.14",
@@ -72,10 +72,10 @@
7272
"eslint-plugin-import": "^2.8.0",
7373
"eslint-plugin-node": "^8.0.1",
7474
"fork-ts-checker-webpack-plugin": "^0.4.1",
75-
"fs-extra": "^8.1.0",
75+
"fs-extra": "^9.0.0",
7676
"handlebars": "^4.0.11",
7777
"handlebars-loader": "^1.7.0",
78-
"http-server": "^0.11.1",
78+
"http-server": "^0.12.3",
7979
"less": "^3.9.0",
8080
"less-loader": "^4.1.0",
8181
"mocha": "^6.0.2",
@@ -86,7 +86,7 @@
8686
"sass": "^1.17.0",
8787
"sass-loader": "^7.0.1",
8888
"sinon": "^2.3.4",
89-
"strip-ansi": "^5.0.0",
89+
"strip-ansi": "^6.0.0",
9090
"stylus": "^0.54.5",
9191
"stylus-loader": "^3.0.2",
9292
"ts-loader": "^5.3.0",

0 commit comments

Comments
 (0)