Skip to content

Commit fdb5e85

Browse files
chore(deps): update (#1253)
1 parent db3911b commit fdb5e85

10 files changed

+1277
-1807
lines changed

package-lock.json

+1,244-1,751
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -45,46 +45,46 @@
4545
"dependencies": {
4646
"camelcase": "^6.2.0",
4747
"cssesc": "^3.0.0",
48-
"icss-utils": "^5.0.0",
48+
"icss-utils": "^5.1.0",
4949
"loader-utils": "^2.0.0",
50-
"postcss": "^8.1.7",
50+
"postcss": "^8.2.4",
5151
"postcss-modules-extract-imports": "^3.0.0",
5252
"postcss-modules-local-by-default": "^4.0.0",
5353
"postcss-modules-scope": "^3.0.0",
5454
"postcss-modules-values": "^4.0.0",
5555
"postcss-value-parser": "^4.1.0",
5656
"schema-utils": "^3.0.0",
57-
"semver": "^7.3.2"
57+
"semver": "^7.3.4"
5858
},
5959
"devDependencies": {
60-
"@babel/cli": "^7.12.1",
61-
"@babel/core": "^7.12.3",
62-
"@babel/preset-env": "^7.12.1",
60+
"@babel/cli": "^7.12.13",
61+
"@babel/core": "^7.12.13",
62+
"@babel/preset-env": "^7.12.13",
6363
"@commitlint/cli": "^11.0.0",
6464
"@commitlint/config-conventional": "^11.0.0",
6565
"@webpack-contrib/defaults": "^6.3.0",
6666
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
6767
"babel-jest": "^26.6.3",
68-
"cross-env": "^7.0.2",
68+
"cross-env": "^7.0.3",
6969
"del": "^6.0.0",
7070
"del-cli": "^3.0.1",
71-
"es-check": "^5.1.2",
72-
"eslint": "^7.13.0",
73-
"eslint-config-prettier": "^6.15.0",
71+
"es-check": "^5.2.0",
72+
"eslint": "^7.19.0",
73+
"eslint-config-prettier": "^7.2.0",
7474
"eslint-plugin-import": "^2.22.1",
7575
"file-loader": "^6.2.0",
76-
"husky": "^4.3.0",
76+
"husky": "^4.3.8",
7777
"jest": "^26.6.3",
78-
"less": "^3.12.2",
78+
"less": "^4.1.1",
7979
"less-loader": "^7.1.0",
80-
"lint-staged": "^10.5.1",
80+
"lint-staged": "^10.5.3",
8181
"memfs": "^3.2.0",
82-
"mini-css-extract-plugin": "^1.3.1",
82+
"mini-css-extract-plugin": "^1.3.5",
8383
"npm-run-all": "^4.1.5",
8484
"postcss-loader": "^4.0.4",
8585
"postcss-preset-env": "^6.7.0",
8686
"prettier": "^2.1.2",
87-
"sass": "^1.29.0",
87+
"sass": "^1.32.6",
8888
"sass-loader": "^10.1.0",
8989
"standard-version": "^9.0.0",
9090
"strip-ansi": "^6.0.0",

src/utils.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,7 @@ function getExportCode(exports, replacements, options) {
662662

663663
async function resolveRequests(resolve, context, possibleRequests) {
664664
return resolve(context, possibleRequests[0])
665-
.then((result) => {
666-
return result;
667-
})
665+
.then((result) => result)
668666
.catch((error) => {
669667
const [, ...tailPossibleRequests] = possibleRequests;
670668

test/helpers/compile.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export default (compiler) => {
2-
return new Promise((resolve, reject) => {
1+
export default (compiler) =>
2+
new Promise((resolve, reject) => {
33
compiler.run((error, stats) => {
44
if (error) {
55
return reject(error);
@@ -8,4 +8,3 @@ export default (compiler) => {
88
return resolve(stats);
99
});
1010
});
11-
};

test/helpers/getErrors.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import normalizeErrors from "./normalizeErrors";
22

3-
export default (stats, shortError, type) => {
4-
return normalizeErrors(stats.compilation.errors, shortError, type).sort();
5-
};
3+
export default (stats, shortError, type) =>
4+
normalizeErrors(stats.compilation.errors, shortError, type).sort();

test/helpers/getWarnings.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
import normalizeErrors from "./normalizeErrors";
22

3-
export default (stats) => {
4-
return normalizeErrors(stats.compilation.warnings).sort();
5-
};
3+
export default (stats) => normalizeErrors(stats.compilation.warnings).sort();

test/helpers/normalizeErrors.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ function removeCWD(str) {
2727
.replace(new RegExp(cwd, "g"), "");
2828
}
2929

30-
export default (errors, shortError, type) => {
31-
return errors.map((error) => {
30+
export default (errors, shortError, type) =>
31+
errors.map((error) => {
3232
let errorMessage = error.toString();
3333

3434
if (shortError) {
@@ -50,4 +50,3 @@ export default (errors, shortError, type) => {
5050

5151
return removeCWD(errorMessage.split("\n").slice(0, 12).join("\n"));
5252
});
53-
};

test/modules-option.test.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -676,9 +676,7 @@ describe('"modules" option', () => {
676676
it("issue #1063 throw error", async () => {
677677
const compiler = getCompiler("./modules/issue-1063/issue-1063.js", {
678678
modules: {
679-
mode: () => {
680-
return "not local, global or pure";
681-
},
679+
mode: () => "not local, global or pure",
682680
},
683681
});
684682
const stats = await compile(compiler);

test/runtime/api.test.js

+7-21
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ describe("api", () => {
2727
});
2828

2929
it("should toString a single module", () => {
30-
const m = api(function (i) {
31-
return i[1];
32-
});
30+
const m = api((i) => i[1]);
3331

3432
m.push([1, "body { a: 1; }", ""]);
3533

3634
expect(m.toString()).toMatchSnapshot();
3735
});
3836

3937
it("should toString multiple modules", () => {
40-
const m = api(function (i) {
41-
return i[1];
42-
});
38+
const m = api((i) => i[1]);
4339

4440
m.push([2, "body { b: 2; }", ""]);
4541
m.push([1, "body { a: 1; }", ""]);
@@ -48,9 +44,7 @@ describe("api", () => {
4844
});
4945

5046
it("should toString with media query", () => {
51-
const m = api(function (i) {
52-
return i[1];
53-
});
47+
const m = api((i) => i[1]);
5448

5549
const m1 = [1, "body { a: 1; }", "screen"];
5650
const m2 = [2, "body { b: 2; }", ""];
@@ -66,9 +60,7 @@ describe("api", () => {
6660
});
6761

6862
it("should import modules", () => {
69-
const m = api(function (i) {
70-
return i[1];
71-
});
63+
const m = api((i) => i[1]);
7264
const m1 = [1, "body { a: 1; }", "(orientation:landscape)"];
7365
const m2 = [2, "body { b: 2; }", ""];
7466
const m3 = [3, "body { c: 3; }", ""];
@@ -84,9 +76,7 @@ describe("api", () => {
8476
});
8577

8678
it("should import named modules", () => {
87-
const m = api(function (i) {
88-
return i[1];
89-
});
79+
const m = api((i) => i[1]);
9080
const m1 = ["./module1", "body { a: 1; }", "screen"];
9181
const m2 = ["./module2", "body { b: 2; }", ""];
9282
const m3 = ["./module3", "body { c: 3; }", ""];
@@ -156,9 +146,7 @@ describe("api", () => {
156146
});
157147

158148
it("should import modules with dedupe", () => {
159-
const m = api(function (i) {
160-
return i[1];
161-
});
149+
const m = api((i) => i[1]);
162150

163151
const m1 = [null, "body { b: 1; }", ""];
164152
const m2 = ["./module2", "body { b: 2; }", ""];
@@ -175,9 +163,7 @@ describe("api", () => {
175163
});
176164

177165
it("should import modules when module string", () => {
178-
const m = api(function (i) {
179-
return i[1];
180-
});
166+
const m = api((i) => i[1]);
181167

182168
m.i(".button { b: 2; }");
183169
m.i("");

test/sourceMap-option.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ describe('"sourceMap" option', () => {
501501

502502
expect(chunkName).toBe(
503503
webpack.version[0] === "5"
504-
? "main.c3447e78abcd04637737.bundle.js"
504+
? "main.bac0eaf8cd232e2ae9a6.bundle.js"
505505
: "main.19efc497c5c37fc5e355.bundle.js"
506506
);
507507
expect(
@@ -609,7 +609,7 @@ describe('"sourceMap" option', () => {
609609

610610
expect(chunkName).toBe(
611611
// TODO still buggy on webpack@4
612-
webpack.version[0] === "5" ? "main.0c4134a13ce273487b87.css" : chunkName
612+
webpack.version[0] === "5" ? "main.695010bdb768b7260e76.css" : chunkName
613613
);
614614

615615
expect(

0 commit comments

Comments
 (0)