Skip to content

Commit f9c75ac

Browse files
chore: update dependencies
1 parent 66d43fa commit f9c75ac

File tree

12 files changed

+5483
-4083
lines changed

12 files changed

+5483
-4083
lines changed

package-lock.json

Lines changed: 5427 additions & 4020 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,39 @@
4343
"webpack": "^4.4.0 || ^5.0.0"
4444
},
4545
"dependencies": {
46-
"loader-utils": "^1.1.0",
46+
"loader-utils": "^2.0.0",
4747
"normalize-url": "1.9.1",
48-
"schema-utils": "^1.0.0",
48+
"schema-utils": "^2.7.0",
4949
"webpack-sources": "^1.1.0"
5050
},
5151
"devDependencies": {
52-
"@babel/cli": "^7.7.5",
53-
"@babel/core": "^7.7.5",
54-
"@babel/preset-env": "^7.7.6",
55-
"@commitlint/cli": "^8.1.0",
56-
"@commitlint/config-conventional": "^8.1.0",
52+
"@babel/cli": "^7.10.5",
53+
"@babel/core": "^7.10.5",
54+
"@babel/preset-env": "^7.10.4",
55+
"@commitlint/cli": "^9.1.1",
56+
"@commitlint/config-conventional": "^9.1.1",
5757
"@webpack-contrib/defaults": "^6.3.0",
5858
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
5959
"babel-eslint": "^10.0.2",
60-
"babel-jest": "^24.8.0",
60+
"babel-jest": "^26.1.0",
6161
"commitlint-azure-pipelines-cli": "^1.0.3",
62-
"cross-env": "^5.2.0",
62+
"cross-env": "^7.0.2",
6363
"css-loader": "^3.3.2",
64-
"del": "^4.1.1",
65-
"del-cli": "^1.1.0",
64+
"del": "^5.1.0",
65+
"del-cli": "^3.0.1",
6666
"es-check": "^5.0.0",
67-
"eslint": "^6.7.2",
67+
"eslint": "^7.5.0",
6868
"eslint-config-prettier": "^6.0.0",
6969
"eslint-plugin-import": "^2.19.1",
70-
"file-loader": "^4.0.0",
71-
"husky": "^3.0.0",
72-
"jest": "^24.8.0",
70+
"file-loader": "^6.0.0",
71+
"husky": "^4.2.5",
72+
"jest": "^26.1.0",
7373
"jest-junit": "^11.0.1",
74-
"lint-staged": "^9.5.0",
74+
"lint-staged": "^10.2.11",
7575
"memfs": "^3.0.2",
7676
"npm-run-all": "^4.1.5",
77-
"prettier": "^1.19.1",
78-
"standard-version": "^7.0.1",
77+
"prettier": "^2.0.5",
78+
"standard-version": "^8.0.2",
7979
"webpack": "^4.41.4",
8080
"webpack-cli": "^3.3.6",
8181
"webpack-dev-server": "^3.7.2"

src/hmr/hotModuleReplacement.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const { forEach } = Array.prototype;
1616
function debounce(fn, time) {
1717
let timeout = 0;
1818

19-
return function() {
19+
return function () {
2020
const self = this;
2121
// eslint-disable-next-line prefer-rest-params
2222
const args = arguments;
@@ -50,7 +50,7 @@ function getCurrentScriptUrl(moduleId) {
5050
srcByModuleId[moduleId] = src;
5151
}
5252

53-
return function(fileMap) {
53+
return function (fileMap) {
5454
if (!src) {
5555
return null;
5656
}
@@ -195,7 +195,7 @@ function isUrlRequest(url) {
195195
return true;
196196
}
197197

198-
module.exports = function(moduleId, options) {
198+
module.exports = function (moduleId, options) {
199199
if (noDocument) {
200200
console.log('no window.document found, will not HMR CSS');
201201

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ class CssModuleFactory {
100100

101101
class MiniCssExtractPlugin {
102102
constructor(options = {}) {
103-
validateOptions(schema, options, 'Mini CSS Extract Plugin');
103+
validateOptions(schema, options, {
104+
name: 'Mini CSS Extract Plugin',
105+
baseDataPath: 'options',
106+
});
104107

105108
this.options = Object.assign(
106109
{

src/loader.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ function findModuleById(modules, id) {
6060
export function pitch(request) {
6161
const options = loaderUtils.getOptions(this) || {};
6262

63-
validateOptions(schema, options, 'Mini CSS Extract Plugin Loader');
63+
validateOptions(schema, options, {
64+
name: 'Mini CSS Extract Plugin Loader',
65+
baseDataPath: 'options',
66+
});
6467

6568
const loaders = this.loaders.slice(this.loaderIndex + 1);
6669

@@ -223,4 +226,5 @@ export function pitch(request) {
223226
});
224227
}
225228

226-
export default function() {}
229+
// eslint-disable-next-line func-names
230+
export default function () {}
Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,25 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`validate options should throw an error on the "esModule" option with "1" value 1`] = `
4-
"Mini CSS Extract Plugin Loader Invalid Options
5-
6-
options.esModule should be boolean
7-
"
4+
"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema.
5+
- options.esModule should be a boolean."
86
`;
97

108
exports[`validate options should throw an error on the "hmr" option with "1" value 1`] = `
11-
"Mini CSS Extract Plugin Loader Invalid Options
12-
13-
options.hmr should be boolean
14-
"
9+
"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema.
10+
- options.hmr should be a boolean."
1511
`;
1612

1713
exports[`validate options should throw an error on the "publicPath" option with "true" value 1`] = `
18-
"Mini CSS Extract Plugin Loader Invalid Options
19-
20-
options.publicPath should be string
21-
options.publicPath should pass \\"instanceof\\" keyword validation
22-
options.publicPath should match some schema in anyOf
23-
"
14+
"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema.
15+
- options.publicPath should be one of these:
16+
string | function
17+
Details:
18+
* options.publicPath should be a string.
19+
* options.publicPath should be an instance of function."
2420
`;
2521

2622
exports[`validate options should throw an error on the "reloadAll" option with "1" value 1`] = `
27-
"Mini CSS Extract Plugin Loader Invalid Options
28-
29-
options.reloadAll should be boolean
30-
"
23+
"Invalid options object. Mini CSS Extract Plugin Loader has been initialized using an options object that does not match the API schema.
24+
- options.reloadAll should be a boolean."
3125
`;
Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`validate options should throw an error on the "chunkFilename" option with "true" value 1`] = `
4-
"Mini CSS Extract Plugin Invalid Options
5-
6-
options.chunkFilename should be string
7-
"
4+
"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema.
5+
- options.chunkFilename should be a string."
86
`;
97

108
exports[`validate options should throw an error on the "filename" option with "true" value 1`] = `
11-
"Mini CSS Extract Plugin Invalid Options
12-
13-
options.filename should be string
14-
"
9+
"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema.
10+
- options.filename should be a string."
1511
`;
1612

1713
exports[`validate options should throw an error on the "ignoreOrder" option with "1" value 1`] = `
18-
"Mini CSS Extract Plugin Invalid Options
19-
20-
options.ignoreOrder should be boolean
21-
"
14+
"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema.
15+
- options.ignoreOrder should be a boolean."
2216
`;
2317

2418
exports[`validate options should throw an error on the "moduleFilename" option with "true" value 1`] = `
25-
"Mini CSS Extract Plugin Invalid Options
26-
27-
options.moduleFilename should pass \\"instanceof\\" keyword validation
28-
"
19+
"Invalid options object. Mini CSS Extract Plugin has been initialized using an options object that does not match the API schema.
20+
- options.moduleFilename should be an instance of function."
2921
`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: red;
3-
background-image: url(cd0bb358c45b584743d8ce4991777c42.svg);
3+
background-image: url(c9e192c015437a21dea1faa1d30f4941.svg);
44
}
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: green;
3-
background-image: url(../../cd0bb358c45b584743d8ce4991777c42.svg);
3+
background-image: url(../../c9e192c015437a21dea1faa1d30f4941.svg);
44
}
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: red;
3-
background-image: url(../cd0bb358c45b584743d8ce4991777c42.svg);
3+
background-image: url(../c9e192c015437a21dea1faa1d30f4941.svg);
44
}
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: red;
3-
background-image: url(/static/img/cd0bb358c45b584743d8ce4991777c42.svg);
3+
background-image: url(/static/img/c9e192c015437a21dea1faa1d30f4941.svg);
44
}
55

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
body {
22
background: red;
3-
background-image: url(/static/img/cd0bb358c45b584743d8ce4991777c42.svg);
3+
background-image: url(/static/img/c9e192c015437a21dea1faa1d30f4941.svg);
44
}
55

0 commit comments

Comments
 (0)