Skip to content

Commit 4e91333

Browse files
chore(deps): update (#399)
1 parent 3d1abb7 commit 4e91333

8 files changed

+597
-765
lines changed

package-lock.json

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

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,31 @@
4747
"schema-utils": "^3.0.0"
4848
},
4949
"devDependencies": {
50-
"@babel/cli": "^7.12.1",
51-
"@babel/core": "^7.12.3",
52-
"@babel/preset-env": "^7.12.1",
50+
"@babel/cli": "^7.12.10",
51+
"@babel/core": "^7.12.10",
52+
"@babel/preset-env": "^7.12.11",
5353
"@commitlint/cli": "^11.0.0",
5454
"@commitlint/config-conventional": "^11.0.0",
5555
"@webpack-contrib/defaults": "^6.3.0",
5656
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
57-
"babel-jest": "^26.5.2",
58-
"cross-env": "^7.0.2",
57+
"babel-jest": "^26.6.3",
58+
"cross-env": "^7.0.3",
5959
"del": "^6.0.0",
6060
"del-cli": "^3.0.1",
61-
"eslint": "^7.13.0",
62-
"eslint-config-prettier": "^6.15.0",
61+
"eslint": "^7.16.0",
62+
"eslint-config-prettier": "^7.1.0",
6363
"eslint-plugin-import": "^2.22.1",
64-
"eslint-plugin-prettier": "^3.1.4",
65-
"husky": "^4.3.0",
64+
"eslint-plugin-prettier": "^3.3.0",
65+
"husky": "^4.3.6",
6666
"jest": "^26.6.3",
6767
"less": "^4.0.0",
68-
"lint-staged": "^10.5.1",
68+
"lint-staged": "^10.5.3",
6969
"memfs": "^3.2.0",
7070
"npm-run-all": "^4.1.5",
71-
"prettier": "^2.1.2",
71+
"prettier": "^2.2.1",
7272
"standard-version": "^9.0.0",
7373
"strip-ansi": "^6.0.0",
74-
"webpack": "^5.4.0"
74+
"webpack": "^5.11.0"
7575
},
7676
"keywords": [
7777
"webpack",

src/utils.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ function createWebpackLessPlugin(loaderContext) {
7171
}
7272

7373
return resolve(context, possibleRequests[0])
74-
.then((result) => {
75-
return result;
76-
})
74+
.then((result) => result)
7775
.catch((error) => {
7876
const [, ...tailPossibleRequests] = possibleRequests;
7977

@@ -198,9 +196,7 @@ function normalizeSourceMap(map) {
198196

199197
// `less` returns POSIX paths, that's why we need to transform them back to native paths.
200198
// eslint-disable-next-line no-param-reassign
201-
newMap.sources = newMap.sources.map((source) => {
202-
return path.normalize(source);
203-
});
199+
newMap.sources = newMap.sources.map((source) => path.normalize(source));
204200

205201
return newMap;
206202
}

test/helpers/compile.js

Lines changed: 2 additions & 3 deletions
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

Lines changed: 1 addition & 3 deletions
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.errors.sort());
5-
};
3+
export default (stats) => normalizeErrors(stats.compilation.errors.sort());

test/helpers/getWarnings.js

Lines changed: 1 addition & 3 deletions
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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ function removeCWD(str) {
1414
.replace(new RegExp(cwd, "g"), "");
1515
}
1616

17-
export default (errors) => {
18-
return errors.map((error) =>
17+
export default (errors) =>
18+
errors.map((error) =>
1919
removeCWD(error.toString().split("\n").slice(0, 2).join("\n"))
2020
);
21-
};

test/validate-options.test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ describe("validate options", () => {
55
lessOptions: {
66
success: [
77
{ strictMath: true },
8-
() => ({
9-
strictMath: true,
10-
}),
8+
() => {
9+
return {
10+
strictMath: true,
11+
};
12+
},
1113
],
1214
failure: [1, true, false, "test", []],
1315
},

0 commit comments

Comments
 (0)