Skip to content

Commit f67179c

Browse files
chore(deps-dev): bump webpack-cli from 4.7.2 to 4.8.0 (#3649)
1 parent dc2759c commit f67179c

File tree

26 files changed

+142
-69
lines changed

26 files changed

+142
-69
lines changed

package-lock.json

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

test/cli/__snapshots__/basic.test.js.snap.webpack4

+16
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`basic basic should accept the promise function of webpack.config.js: stderr 1`] = `
4+
"<i> [webpack-dev-server] Project is running at:
5+
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
6+
<i> [webpack-dev-server] On Your Network (IPv4): http://<ip-v4>:<port>/
7+
<i> [webpack-dev-server] On Your Network (IPv6): http://[<ip-v6>]:<port>/
8+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
9+
`;
10+
311
exports[`basic basic should work using "--host localhost --port <port>": stderr 1`] = `
412
"<i> [webpack-dev-server] Project is running at:
513
<i> [webpack-dev-server] Loopback: http://localhost:<port>/, http://<ip-v4>:<port>/
614
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
715
`;
816

17+
exports[`basic basic should work using multi compiler mode: stderr 1`] = `
18+
"<i> [webpack-dev-server] Project is running at:
19+
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
20+
<i> [webpack-dev-server] On Your Network (IPv4): http://<ip-v4>:<port>/
21+
<i> [webpack-dev-server] On Your Network (IPv6): http://[<ip-v6>]:<port>/
22+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
23+
`;
24+
925
exports[`basic basic should work: stderr 1`] = `
1026
"<i> [webpack-dev-server] Project is running at:
1127
<i> [webpack-dev-server] Loopback: http://localhost:<port>/

test/cli/__snapshots__/basic.test.js.snap.webpack5

+16
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3+
exports[`basic basic should accept the promise function of webpack.config.js: stderr 1`] = `
4+
"<i> [webpack-dev-server] Project is running at:
5+
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
6+
<i> [webpack-dev-server] On Your Network (IPv4): http://<ip-v4>:<port>/
7+
<i> [webpack-dev-server] On Your Network (IPv6): http://[<ip-v6>]:<port>/
8+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
9+
`;
10+
311
exports[`basic basic should work using "--host localhost --port <port>": stderr 1`] = `
412
"<i> [webpack-dev-server] Project is running at:
513
<i> [webpack-dev-server] Loopback: http://localhost:<port>/, http://<ip-v4>:<port>/
614
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
715
`;
816

17+
exports[`basic basic should work using multi compiler mode: stderr 1`] = `
18+
"<i> [webpack-dev-server] Project is running at:
19+
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
20+
<i> [webpack-dev-server] On Your Network (IPv4): http://<ip-v4>:<port>/
21+
<i> [webpack-dev-server] On Your Network (IPv6): http://[<ip-v6>]:<port>/
22+
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
23+
`;
24+
925
exports[`basic basic should work: stderr 1`] = `
1026
"<i> [webpack-dev-server] Project is running at:
1127
<i> [webpack-dev-server] Loopback: http://localhost:<port>/

test/cli/basic.test.js

+32-20
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,33 @@ describe("basic", () => {
6666
});
6767

6868
it("should accept the promise function of webpack.config.js", async () => {
69-
try {
70-
const { exitCode } = await testBin([
71-
"--config",
72-
path.resolve(
73-
__dirname,
74-
"../fixtures/promise-config/webpack.config.js"
75-
),
76-
"--port",
77-
port,
78-
]);
79-
expect(exitCode).toEqual(0);
80-
} catch (err) {
81-
// for windows
82-
expect(err.stdout).toContain("main.js");
83-
}
69+
const { exitCode, stderr } = await testBin([
70+
"--config",
71+
path.resolve(
72+
__dirname,
73+
"../fixtures/cli-promise-config/webpack.config.js"
74+
),
75+
"--port",
76+
port,
77+
]);
78+
79+
expect(exitCode).toEqual(0);
80+
expect(normalizeStderr(stderr, { ipv6: true })).toMatchSnapshot("stderr");
81+
});
82+
83+
it("should work using multi compiler mode", async () => {
84+
const { exitCode, stderr } = await testBin([
85+
"--config",
86+
path.resolve(
87+
__dirname,
88+
"../fixtures/cli-universal-compiler-config/webpack.config.js"
89+
),
90+
"--port",
91+
port,
92+
]);
93+
94+
expect(exitCode).toEqual(0);
95+
expect(normalizeStderr(stderr, { ipv6: true })).toMatchSnapshot("stderr");
8496
});
8597

8698
it("should exit the process when SIGINT is detected", (done) => {
@@ -210,7 +222,7 @@ describe("basic", () => {
210222
"--port",
211223
port,
212224
"--config",
213-
"./test/fixtures/dev-server/default-config.js",
225+
"./test/fixtures/cli-single-entry/webpack.config.js",
214226
]);
215227

216228
expect(exitCode).toEqual(0);
@@ -224,7 +236,7 @@ describe("basic", () => {
224236
"--port",
225237
port,
226238
"--config",
227-
"./test/fixtures/dev-server/multi-entry.js",
239+
"./test/fixtures/cli-multi-entry/webpack.config.js",
228240
"--stats",
229241
"verbose",
230242
]);
@@ -242,7 +254,7 @@ describe("basic", () => {
242254
"--port",
243255
port,
244256
"--config",
245-
"./test/fixtures/dev-server/empty-entry.js",
257+
"./test/fixtures/cli-empty-entry/webpack.config.js",
246258
]);
247259

248260
expect(exitCode).toEqual(0);
@@ -255,7 +267,7 @@ describe("basic", () => {
255267
"--port",
256268
port,
257269
"--config",
258-
"./test/fixtures/entry-as-descriptor/webpack.config",
270+
"./test/fixtures/cli-entry-as-descriptor/webpack.config",
259271
"--stats",
260272
"detailed",
261273
]);
@@ -310,7 +322,7 @@ describe("basic", () => {
310322
"--port",
311323
port,
312324
"--config",
313-
"./test/fixtures/dev-server/target-config.js",
325+
"./test/fixtures/cli-target-config/webpack.config.js",
314326
]);
315327

316328
expect(exitCode).toEqual(0);

test/fixtures/cli-colors-default-stats/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ module.exports = {
66
mode: "development",
77
context: __dirname,
88
entry: "./foo.js",
9-
plugins: [ExitOnDonePlugin],
9+
plugins: [new ExitOnDonePlugin()],
1010
};

test/fixtures/cli-colors-disabled/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ module.exports = {
99
},
1010
context: __dirname,
1111
entry: "./foo.js",
12-
plugins: [ExitOnDonePlugin],
12+
plugins: [new ExitOnDonePlugin()],
1313
};

test/fixtures/cli-colors-enabled/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ module.exports = {
99
},
1010
context: __dirname,
1111
entry: "./foo.js",
12-
plugins: [ExitOnDonePlugin],
12+
plugins: [new ExitOnDonePlugin()],
1313
};

test/fixtures/dev-server/empty-entry.js renamed to test/fixtures/cli-empty-entry/webpack.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@ module.exports = {
66
mode: "development",
77
stats: { orphanModules: true, preset: "detailed" },
88
entry: {},
9-
devServer: {
10-
webSocketServer: "ws",
11-
},
12-
plugins: [ExitOnDonePlugin],
9+
plugins: [new ExitOnDonePlugin()],
1310
};

test/fixtures/entry-as-descriptor/webpack.config.js renamed to test/fixtures/cli-entry-as-descriptor/webpack.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,5 @@ module.exports = {
1010
import: "./foo.js",
1111
},
1212
},
13-
plugins: [ExitOnDonePlugin],
14-
infrastructureLogging: {
15-
level: "warn",
16-
},
13+
plugins: [new ExitOnDonePlugin()],
1714
};

test/fixtures/cli-multi-entry/bar.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
3+
console.log("I am bar");

test/fixtures/cli-multi-entry/foo.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
3+
console.log("I am foo");

test/fixtures/dev-server/multi-entry.js renamed to test/fixtures/cli-multi-entry/webpack.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@ module.exports = {
1111
foo: resolve(__dirname, "./foo.js"),
1212
bar: resolve(__dirname, "./bar.js"),
1313
},
14-
devServer: {
15-
webSocketServer: "ws",
16-
},
17-
plugins: [ExitOnDonePlugin],
14+
plugins: [new ExitOnDonePlugin()],
1815
};
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
"use strict";
22

33
const { join } = require("path");
4+
const ExitOnDonePlugin = require("../../helpers/ExitOnDonePlugin");
45

56
module.exports = () =>
67
new Promise((resolve) => {
78
resolve({
89
mode: "development",
910
entry: join(__dirname, "foo.js"),
11+
plugins: [new ExitOnDonePlugin()],
1012
});
1113
});

test/fixtures/cli-single-entry/foo.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
3+
console.log("I am foo");

test/fixtures/dev-server/default-config.js renamed to test/fixtures/cli-single-entry/webpack.config.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,5 @@ module.exports = {
77
mode: "development",
88
stats: "detailed",
99
entry: resolve(__dirname, "./foo.js"),
10-
devServer: {
11-
webSocketServer: "ws",
12-
},
13-
plugins: [ExitOnDonePlugin],
10+
plugins: [new ExitOnDonePlugin()],
1411
};
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
3+
console.log("I am foo");

test/fixtures/dev-server/target-config.js renamed to test/fixtures/cli-target-config/webpack.config.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,5 @@ module.exports = {
88
stats: "detailed",
99
entry: resolve(__dirname, "./foo.js"),
1010
target: ["web"],
11-
output: {
12-
chunkLoading: false,
13-
wasmLoading: false,
14-
workerChunkLoading: false,
15-
},
16-
devServer: {
17-
webSocketServer: "ws",
18-
},
19-
plugins: [ExitOnDonePlugin],
11+
plugins: [new ExitOnDonePlugin()],
2012
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
3+
console.log("Hello from the client");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"use strict";
2+
3+
console.log("Hello from the server");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"use strict";
2+
3+
const ExitOnDonePlugin = require("../../helpers/ExitOnDonePlugin");
4+
5+
module.exports = [
6+
{
7+
mode: "development",
8+
context: __dirname,
9+
stats: "none",
10+
entry: "./client.js",
11+
output: {
12+
path: "/",
13+
filename: "client.js",
14+
},
15+
},
16+
{
17+
mode: "development",
18+
context: __dirname,
19+
target: "node",
20+
stats: "none",
21+
entry: "./server.js",
22+
output: {
23+
path: "/",
24+
filename: "server.js",
25+
},
26+
plugins: [new ExitOnDonePlugin()],
27+
},
28+
];

test/fixtures/cli/webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ module.exports = {
77
stats: "detailed",
88
context: __dirname,
99
entry: "./foo.js",
10-
plugins: [ExitOnDonePlugin],
10+
plugins: [new ExitOnDonePlugin()],
1111
};

test/fixtures/universal-compiler-config/webpack.config.js

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module.exports = [
1010
path: "/",
1111
filename: "client.js",
1212
},
13-
node: false,
1413
infrastructureLogging: {
1514
level: "warn",
1615
},
@@ -25,7 +24,6 @@ module.exports = [
2524
path: "/",
2625
filename: "server.js",
2726
},
28-
node: false,
2927
infrastructureLogging: {
3028
level: "warn",
3129
},

0 commit comments

Comments
 (0)