Skip to content

Commit 8f9ea7d

Browse files
chore(release): 6.0.0 (#37)
1 parent 2be57e4 commit 8f9ea7d

File tree

11 files changed

+1098
-846
lines changed

11 files changed

+1098
-846
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ matrix:
3030
- node_js: "10"
3131
script: npm run $JOB_PART
3232
env: JOB_PART=test:only
33+
- node_js: "10"
34+
script:
35+
- npm i webpack@next
36+
- npm run $JOB_PART
37+
env: JOB_PART=test:only
3338

3439
before_install:
3540
- npm i -g npm@latest

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
This project adheres to [Semantic Versioning](http://semver.org).
66

7+
## 6.0.0 - 2019-12-19
8+
9+
- Fixed: support webpack@5
10+
- Changed: minimum require `execa` version is `4.0.0`.
11+
712
## 5.0.0 - 2019-10-24
813

914
- Changed: minimum require `execa` version is `3.2.0`.

__tests__/__snapshots__/index.test.js.snap

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Array [
8282
"ExecaPlugin",
8383
"error",
8484
Array [
85-
[Error: Command "not-found" return "Command failed with ENOENT: not-found"],
85+
"Error: Command \\"not-found\\" return \\"Command failed with ENOENT: not-found\\"",
8686
],
8787
],
8888
Array [
@@ -119,7 +119,7 @@ Array [
119119
"ExecaPlugin",
120120
"error",
121121
Array [
122-
[Error: Command "not-found" return "Command failed with ENOENT: not-found"],
122+
"Error: Command \\"not-found\\" return \\"Command failed with ENOENT: not-found\\"",
123123
],
124124
],
125125
Array [
@@ -194,7 +194,7 @@ Array [
194194
"ExecaPlugin",
195195
"error",
196196
Array [
197-
[Error: Command "not-found" return "Command failed with ENOENT: not-found"],
197+
"Error: Command \\"not-found\\" return \\"Command failed with ENOENT: not-found\\"",
198198
],
199199
],
200200
Array [
@@ -229,7 +229,7 @@ Array [
229229
"ExecaPlugin",
230230
"error",
231231
Array [
232-
[Error: Command "not-found" return "Command failed with ENOENT: not-found"],
232+
"Error: Command \\"not-found\\" return \\"Command failed with ENOENT: not-found\\"",
233233
],
234234
],
235235
Array [
@@ -359,7 +359,8 @@ Array [
359359
"ExecaPlugin",
360360
"error",
361361
Array [
362-
[Error: Command "del " return "Command failed with exit code 1: del "],
362+
"Error: Command \\"del \\" return \\"Command failed with exit code 1: del
363+
TypeError: Expected a non-empty string",
363364
],
364365
],
365366
Array [
@@ -403,7 +404,8 @@ Array [
403404
"ExecaPlugin",
404405
"error",
405406
Array [
406-
[Error: Command "del " return "Command failed with exit code 1: del "],
407+
"Error: Command \\"del \\" return \\"Command failed with exit code 1: del
408+
TypeError: Expected a non-empty string",
407409
],
408410
],
409411
Array [

__tests__/helpers/get-errors.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
const normalizeErrors = require("./normalize-errors");
4+
5+
module.exports = stats => normalizeErrors(stats.compilation.errors);

__tests__/helpers/get-warnings.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"use strict";
2+
3+
const normalizeErrors = require("./normalize-errors");
4+
5+
module.exports = stats => normalizeErrors(stats.compilation.warnings);

__tests__/helpers/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
"use strict";
2+
3+
const getErrors = require("./get-errors");
4+
const getWarnings = require("./get-warnings");
5+
const normalizeErrors = require("./normalize-errors");
6+
7+
module.exports = {
8+
getErrors,
9+
getWarnings,
10+
normalizeErrors
11+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"use strict";
2+
3+
function removeCWD(str) {
4+
const isWin = process.platform === "win32";
5+
let cwd = process.cwd();
6+
7+
if (isWin) {
8+
// eslint-disable-next-line no-param-reassign
9+
str = str.replace(/\\/g, "/");
10+
cwd = cwd.replace(/\\/g, "/");
11+
}
12+
13+
return str.replace(new RegExp(cwd, "g"), "");
14+
}
15+
16+
module.exports = errors =>
17+
errors.map(error =>
18+
removeCWD(
19+
error
20+
.toString()
21+
.split("\n")
22+
.slice(0, 2)
23+
.join("\n")
24+
)
25+
);

0 commit comments

Comments
 (0)