Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jan 23, 2024
1 parent 26aae7e commit 7c676e2
Show file tree
Hide file tree
Showing 82 changed files with 4,100 additions and 15,641 deletions.
10 changes: 5 additions & 5 deletions bin/webpack-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const runCli = (cli) => {
(error) => {
console.error(error);
process.exitCode = 1;
}
},
);
} else {
// eslint-disable-next-line import/no-dynamic-require
Expand Down Expand Up @@ -147,8 +147,8 @@ if (!cli.installed) {

console.error(
`We will use "${packageManager}" to install the CLI via "${packageManager} ${installOptions.join(
" "
)} ${cli.package}".`
" ",
)} ${cli.package}".`,
);

const question = `Do you want to install 'webpack-cli' (yes/no): `;
Expand All @@ -170,7 +170,7 @@ if (!cli.installed) {
if (!normalizedAnswer) {
console.error(
"You need to install 'webpack-cli' to use webpack via CLI.\n" +
"You can also install the CLI manually."
"You can also install the CLI manually.",
);

return;
Expand All @@ -182,7 +182,7 @@ if (!cli.installed) {
cli.package
}' (running '${packageManager} ${installOptions.join(" ")} ${
cli.package
}')...`
}')...`,
);

runCommand(packageManager, installOptions.concat(cli.package))
Expand Down
2 changes: 1 addition & 1 deletion client-src/clients/SockJSClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class SockJSClient {
constructor(url) {
// SockJS requires `http` and `https` protocols
this.sock = new SockJS(
url.replace(/^ws:/i, "http:").replace(/^wss:/i, "https:")
url.replace(/^ws:/i, "http:").replace(/^wss:/i, "https:"),
);
this.sock.onerror =
/**
Expand Down
12 changes: 6 additions & 6 deletions client-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ const decodeOverlayOptions = (overlayOptions) => {
["warnings", "errors", "runtimeErrors"].forEach((property) => {
if (typeof overlayOptions[property] === "string") {
const overlayFilterFunctionString = decodeURIComponent(
overlayOptions[property]
overlayOptions[property],
);

// eslint-disable-next-line no-new-func
const overlayFilterFunction = new Function(
"message",
`var callback = ${overlayFilterFunctionString}
return callback(message)`
return callback(message)`,
);

overlayOptions[property] = overlayFilterFunction;
Expand Down Expand Up @@ -134,7 +134,7 @@ if (typeof parsedResourceQuery.reconnect !== "undefined") {
function setAllLogLevel(level) {
// This is needed because the HMR logger operate separately from dev server logger
webpackHotLog.setLogLevel(
level === "verbose" || level === "log" ? "info" : level
level === "verbose" || level === "log" ? "info" : level,
);
setLogLevel(level);
}
Expand All @@ -160,7 +160,7 @@ const overlay =
: {
trustedTypesPolicyName: false,
catchRuntimeError: options.overlay,
}
},
)
: { send: () => {} };

Expand Down Expand Up @@ -232,7 +232,7 @@ const onSocketMessage = {
log.info(
`${data.pluginName ? `[${data.pluginName}] ` : ""}${data.percent}% - ${
data.msg
}.`
}.`,
);
}

Expand Down Expand Up @@ -263,7 +263,7 @@ const onSocketMessage = {
log.info(
`${
file ? `"${file}"` : "Content"
} from static directory was changed. Reloading...`
} from static directory was changed. Reloading...`,
);

self.location.reload();
Expand Down
4 changes: 2 additions & 2 deletions client-src/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const createOverlay = (options) => {
trustedTypesPolicyName || "webpack-dev-server#overlay",
{
createHTML: (value) => value,
}
},
);
}

Expand Down Expand Up @@ -253,7 +253,7 @@ const createOverlay = (options) => {
typeElement.setAttribute("data-can-open", true);
typeElement.addEventListener("click", () => {
fetch(
`/webpack-dev-server/open-editor?fileName=${message.moduleIdentifier}`
`/webpack-dev-server/open-editor?fileName=${message.moduleIdentifier}`,
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion client-src/overlay/state-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const createOverlayMachine = (options) => {
hideOverlay,
showOverlay,
},
}
},
);

return overlayMachine;
Expand Down
2 changes: 1 addition & 1 deletion client-src/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const socket = function initSocket(url, handlers, reconnect) {
if (handlers[message.type]) {
handlers[message.type](message.data, message.params);
}
}
},
);
};

Expand Down
4 changes: 2 additions & 2 deletions client-src/utils/createSocketURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function format(objURL) {
* @param {string} match
* @returns {string}
*/
(match) => encodeURIComponent(match)
(match) => encodeURIComponent(match),
);
search = search.replace("#", "%23");

Expand Down Expand Up @@ -103,7 +103,7 @@ function createSocketURL(parsedURL) {

socketURLProtocol = socketURLProtocol.replace(
/^(?:http|.+-extension|file)/i,
"ws"
"ws",
);

let socketURLAuth = "";
Expand Down
2 changes: 1 addition & 1 deletion client-src/utils/getCurrentScriptSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function getCurrentScriptSource() {
const scriptElements = document.scripts || [];
const scriptElementsWithSrc = Array.prototype.filter.call(
scriptElements,
(element) => element.getAttribute("src")
(element) => element.getAttribute("src"),
);

if (scriptElementsWithSrc.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion client-src/utils/stripAnsi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const ansiRegex = new RegExp(
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))",
].join("|"),
"g"
"g",
);

/**
Expand Down
2 changes: 1 addition & 1 deletion client-src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = [
}),
new webpack.NormalModuleReplacementPlugin(
/^tapable\/lib\/SyncBailHook/,
path.join(__dirname, "modules/logger/SyncBailHookFake.js")
path.join(__dirname, "modules/logger/SyncBailHookFake.js"),
),
],
}),
Expand Down
13 changes: 10 additions & 3 deletions examples/.assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@
font-family: "Geomanist";
font-style: normal;
font-weight: 600;
src: url("assets/geomanist-medium.woff2") format("woff2"),
src:
url("assets/geomanist-medium.woff2") format("woff2"),
url("assets/geomanist-medium.woff") format("woff");
}

html,
body {
background-color: #f3f3f3;
color: #2b3a42;
font: 400 10px "Source Sans Pro", -apple-system, BlinkMacSystemFont,
"Segoe UI", Helvetica, Arial, sans-serif;
font:
400 10px "Source Sans Pro",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Helvetica,
Arial,
sans-serif;
height: 100%;
margin: 0;
padding: 0;
Expand Down
4 changes: 2 additions & 2 deletions examples/client/logging/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ module.exports = setup({
"warnings-webpack-plugin",
(compilation) => {
compilation.warnings.push(
new Error("Manual warnings produced during compilation.")
new Error("Manual warnings produced during compilation."),
);
}
},
);
},
},
Expand Down
8 changes: 4 additions & 4 deletions examples/client/overlay/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,28 @@ target.insertAdjacentElement(
});

setTimeout(() => abortController.abort(), 100);
})
}),
);

target.insertAdjacentElement(
"afterend",
createButton("Click to throw unhandled promise rejection", () => {
setTimeout(() => Promise.reject(new Error("Async error")), 100);
})
}),
);

target.insertAdjacentElement(
"afterend",
createButton("Click to throw ignored error", () => {
unsafeOperation("something something");
})
}),
);

target.insertAdjacentElement(
"afterend",
createButton("Click to throw error", () => {
unsafeOperation("Error message thrown from JS");
})
}),
);

// eslint-disable-next-line import/no-unresolved, import/extensions
Expand Down
2 changes: 1 addition & 1 deletion examples/general/config-promise/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ module.exports = new Promise((resolve) => {
context: __dirname,
entry: "./app.js",
devServer: {},
})
}),
);
});
2 changes: 1 addition & 1 deletion examples/history-api-fallback/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ document.addEventListener(
});
});
},
true
true,
);

function check(url, re, cb) {
Expand Down
2 changes: 1 addition & 1 deletion examples/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = {
filename: "index.html",
template: path.join(__dirname, ".assets/layout.html"),
title: exampleTitle,
})
}),
);

if (result.devServer.setupMiddlewares) {
Expand Down

0 comments on commit 7c676e2

Please sign in to comment.