Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-09-16 17:29:58 +00:00
parent 1afca056e3
commit 6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions

View file

@ -150,7 +150,6 @@ var fakeServer = {
fakeHTTPMethods: true,
logger: true,
unsafeHeadersEnabled: true,
legacyRoutes: true,
};
// eslint-disable-next-line no-param-reassign
@ -214,8 +213,6 @@ var fakeServer = {
log: log,
legacyRoutes: true,
respondWith: function respondWith(method, url, body) {
if (arguments.length === 1 && typeof method !== "function") {
this.response = responseArray(method);
@ -250,22 +247,18 @@ var fakeServer = {
url = url.replace("://", "\\://");
}
if (/\*/.test(url)) {
// Uses the new syntax for repeating parameters in path-to-regexp,
// see https://github.com/pillarjs/path-to-regexp#unexpected--or-
// eslint-disable-next-line no-param-reassign
url = url.replace(/\/\*/g, "/(.*)");
}
if (this.legacyRoutes) {
if (url.includes("?")) {
// eslint-disable-next-line no-param-reassign
url = url.replace("?", "\\?");
}
url = url.replace(/\/\*/g, "/*path");
}
}
push.call(this.responses, {
method: method,
url:
typeof url === "string" && url !== "" ? pathToRegexp(url) : url,
typeof url === "string" && url !== ""
? pathToRegexp(url).regexp
: url,
response: typeof body === "function" ? body : responseArray(body),
});
},