Skip to content

chore(deps-dev): bump webpack-cli from 4.7.2 to 4.8.0 #3649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions test/cli/__snapshots__/basic.test.js.snap.webpack4
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`basic basic should accept the promise function of webpack.config.js: stderr 1`] = `
"<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
<i> [webpack-dev-server] On Your Network (IPv4): http://<ip-v4>:<port>/
<i> [webpack-dev-server] On Your Network (IPv6): http://[<ip-v6>]:<port>/
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
`;

exports[`basic basic should work using "--host localhost --port <port>": stderr 1`] = `
"<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:<port>/, http://<ip-v4>:<port>/
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
`;

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

exports[`basic basic should work: stderr 1`] = `
"<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
Expand Down
16 changes: 16 additions & 0 deletions test/cli/__snapshots__/basic.test.js.snap.webpack5
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`basic basic should accept the promise function of webpack.config.js: stderr 1`] = `
"<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
<i> [webpack-dev-server] On Your Network (IPv4): http://<ip-v4>:<port>/
<i> [webpack-dev-server] On Your Network (IPv6): http://[<ip-v6>]:<port>/
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
`;

exports[`basic basic should work using "--host localhost --port <port>": stderr 1`] = `
"<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:<port>/, http://<ip-v4>:<port>/
<i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory"
`;

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

exports[`basic basic should work: stderr 1`] = `
"<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
Expand Down
52 changes: 32 additions & 20 deletions test/cli/basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,33 @@ describe("basic", () => {
});

it("should accept the promise function of webpack.config.js", async () => {
try {
const { exitCode } = await testBin([
"--config",
path.resolve(
__dirname,
"../fixtures/promise-config/webpack.config.js"
),
"--port",
port,
]);
expect(exitCode).toEqual(0);
} catch (err) {
// for windows
expect(err.stdout).toContain("main.js");
}
const { exitCode, stderr } = await testBin([
"--config",
path.resolve(
__dirname,
"../fixtures/cli-promise-config/webpack.config.js"
),
"--port",
port,
]);

expect(exitCode).toEqual(0);
expect(normalizeStderr(stderr, { ipv6: true })).toMatchSnapshot("stderr");
});

it("should work using multi compiler mode", async () => {
const { exitCode, stderr } = await testBin([
"--config",
path.resolve(
__dirname,
"../fixtures/cli-universal-compiler-config/webpack.config.js"
),
"--port",
port,
]);

expect(exitCode).toEqual(0);
expect(normalizeStderr(stderr, { ipv6: true })).toMatchSnapshot("stderr");
});

it("should exit the process when SIGINT is detected", (done) => {
Expand Down Expand Up @@ -210,7 +222,7 @@ describe("basic", () => {
"--port",
port,
"--config",
"./test/fixtures/dev-server/default-config.js",
"./test/fixtures/cli-single-entry/webpack.config.js",
]);

expect(exitCode).toEqual(0);
Expand All @@ -224,7 +236,7 @@ describe("basic", () => {
"--port",
port,
"--config",
"./test/fixtures/dev-server/multi-entry.js",
"./test/fixtures/cli-multi-entry/webpack.config.js",
"--stats",
"verbose",
]);
Expand All @@ -242,7 +254,7 @@ describe("basic", () => {
"--port",
port,
"--config",
"./test/fixtures/dev-server/empty-entry.js",
"./test/fixtures/cli-empty-entry/webpack.config.js",
]);

expect(exitCode).toEqual(0);
Expand All @@ -255,7 +267,7 @@ describe("basic", () => {
"--port",
port,
"--config",
"./test/fixtures/entry-as-descriptor/webpack.config",
"./test/fixtures/cli-entry-as-descriptor/webpack.config",
"--stats",
"detailed",
]);
Expand Down Expand Up @@ -310,7 +322,7 @@ describe("basic", () => {
"--port",
port,
"--config",
"./test/fixtures/dev-server/target-config.js",
"./test/fixtures/cli-target-config/webpack.config.js",
]);

expect(exitCode).toEqual(0);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/cli-colors-default-stats/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ module.exports = {
mode: "development",
context: __dirname,
entry: "./foo.js",
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
2 changes: 1 addition & 1 deletion test/fixtures/cli-colors-disabled/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ module.exports = {
},
context: __dirname,
entry: "./foo.js",
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
2 changes: 1 addition & 1 deletion test/fixtures/cli-colors-enabled/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ module.exports = {
},
context: __dirname,
entry: "./foo.js",
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@ module.exports = {
mode: "development",
stats: { orphanModules: true, preset: "detailed" },
entry: {},
devServer: {
webSocketServer: "ws",
},
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ module.exports = {
import: "./foo.js",
},
},
plugins: [ExitOnDonePlugin],
infrastructureLogging: {
level: "warn",
},
plugins: [new ExitOnDonePlugin()],
};
3 changes: 3 additions & 0 deletions test/fixtures/cli-multi-entry/bar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

console.log("I am bar");
3 changes: 3 additions & 0 deletions test/fixtures/cli-multi-entry/foo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

console.log("I am foo");
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ module.exports = {
foo: resolve(__dirname, "./foo.js"),
bar: resolve(__dirname, "./bar.js"),
},
devServer: {
webSocketServer: "ws",
},
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"use strict";

const { join } = require("path");
const ExitOnDonePlugin = require("../../helpers/ExitOnDonePlugin");

module.exports = () =>
new Promise((resolve) => {
resolve({
mode: "development",
entry: join(__dirname, "foo.js"),
plugins: [new ExitOnDonePlugin()],
});
});
3 changes: 3 additions & 0 deletions test/fixtures/cli-single-entry/foo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

console.log("I am foo");
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ module.exports = {
mode: "development",
stats: "detailed",
entry: resolve(__dirname, "./foo.js"),
devServer: {
webSocketServer: "ws",
},
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
3 changes: 3 additions & 0 deletions test/fixtures/cli-target-config/foo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

console.log("I am foo");
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,5 @@ module.exports = {
stats: "detailed",
entry: resolve(__dirname, "./foo.js"),
target: ["web"],
output: {
chunkLoading: false,
wasmLoading: false,
workerChunkLoading: false,
},
devServer: {
webSocketServer: "ws",
},
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
3 changes: 3 additions & 0 deletions test/fixtures/cli-universal-compiler-config/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

console.log("Hello from the client");
3 changes: 3 additions & 0 deletions test/fixtures/cli-universal-compiler-config/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"use strict";

console.log("Hello from the server");
28 changes: 28 additions & 0 deletions test/fixtures/cli-universal-compiler-config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"use strict";

const ExitOnDonePlugin = require("../../helpers/ExitOnDonePlugin");

module.exports = [
{
mode: "development",
context: __dirname,
stats: "none",
entry: "./client.js",
output: {
path: "/",
filename: "client.js",
},
},
{
mode: "development",
context: __dirname,
target: "node",
stats: "none",
entry: "./server.js",
output: {
path: "/",
filename: "server.js",
},
plugins: [new ExitOnDonePlugin()],
},
];
2 changes: 1 addition & 1 deletion test/fixtures/cli/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module.exports = {
stats: "detailed",
context: __dirname,
entry: "./foo.js",
plugins: [ExitOnDonePlugin],
plugins: [new ExitOnDonePlugin()],
};
2 changes: 0 additions & 2 deletions test/fixtures/universal-compiler-config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = [
path: "/",
filename: "client.js",
},
node: false,
infrastructureLogging: {
level: "warn",
},
Expand All @@ -25,7 +24,6 @@ module.exports = [
path: "/",
filename: "server.js",
},
node: false,
infrastructureLogging: {
level: "warn",
},
Expand Down
Loading