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

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

Lines changed: 16 additions & 0 deletions
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

Lines changed: 16 additions & 0 deletions
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

Lines changed: 32 additions & 20 deletions
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

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

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

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

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

Lines changed: 1 addition & 4 deletions
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
};

0 commit comments

Comments
 (0)