Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/routing-utils - npm Package Compare versions

Comparing version
6.0.2
to
6.1.0
+3
-3
./dist/index.js

@@ -180,3 +180,3 @@ "use strict";

new RegExp(src);
} catch (err) {
} catch (_err) {
const prop = type === "Route" ? "src`/`source" : "source";

@@ -196,3 +196,3 @@ return `${type} at index ${index} has invalid \`${prop}\` regular expression "${src}".`;

sourceSegments = new Set((0, import_superstatic.sourceToRegex)(source).segments);
} catch (err) {
} catch (_err) {
return {

@@ -218,3 +218,3 @@ message: `${type} at index ${index} has invalid \`source\` pattern "${source}".`,

}
} catch (err) {
} catch (_err) {
}

@@ -221,0 +221,0 @@ const hasSegments = (0, import_superstatic.collectHasSegments)(has);

@@ -180,3 +180,3 @@ "use strict";

new RegExp(src);
} catch (err) {
} catch (_err) {
const prop = type === "Route" ? "src`/`source" : "source";

@@ -196,3 +196,3 @@ return `${type} at index ${index} has invalid \`${prop}\` regular expression "${src}".`;

sourceSegments = new Set((0, import_superstatic.sourceToRegex)(source).segments);
} catch (err) {
} catch (_err) {
return {

@@ -218,3 +218,3 @@ message: `${type} at index ${index} has invalid \`source\` pattern "${source}".`,

}
} catch (err) {
} catch (_err) {
}

@@ -221,0 +221,0 @@ const hasSegments = (0, import_superstatic.collectHasSegments)(has);

@@ -21,3 +21,2 @@ "use strict";

__export(schemas_exports, {
bulkRedirectsSchema: () => bulkRedirectsSchema,
cleanUrlsSchema: () => cleanUrlsSchema,

@@ -308,2 +307,3 @@ hasSchema: () => hasSchema,

},
// biome-ignore lint/suspicious/noThenProperty: JSON Schema if/then keyword
then: {

@@ -332,2 +332,3 @@ required: ["args"]

},
// biome-ignore lint/suspicious/noThenProperty: JSON Schema if/then keyword
then: {

@@ -341,2 +342,3 @@ properties: {

},
// biome-ignore lint/suspicious/noThenProperty: JSON Schema if/then keyword
then: {

@@ -665,43 +667,4 @@ pattern: "^[a-zA-Z0-9_-]+$"

};
const bulkRedirectsSchema = {
type: "array",
description: "A list of bulk redirect definitions.",
items: {
type: "object",
additionalProperties: false,
required: ["source", "destination"],
properties: {
source: {
description: "The exact URL path or pattern to match.",
type: "string",
maxLength: 2048
},
destination: {
description: "The target URL path where traffic should be redirected.",
type: "string",
maxLength: 2048
},
permanent: {
description: "A boolean to toggle between permanent and temporary redirect. When `true`, the status code is `308`. When `false` the status code is `307`.",
type: "boolean"
},
statusCode: {
description: "An optional integer to define the status code of the redirect.",
type: "integer",
enum: [301, 302, 307, 308]
},
sensitive: {
description: "A boolean to toggle between case-sensitive and case-insensitive redirect. When `true`, the redirect is case-sensitive. When `false` the redirect is case-insensitive.",
type: "boolean"
},
query: {
description: "Whether the query string should be preserved by the redirect. The default is `false`.",
type: "boolean"
}
}
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
bulkRedirectsSchema,
cleanUrlsSchema,

@@ -708,0 +671,0 @@ hasSchema,

@@ -136,3 +136,3 @@ "use strict";

return route;
} catch (e) {
} catch (_e) {
throw new Error(`Failed to parse redirect: ${JSON.stringify(r)}`);

@@ -170,3 +170,3 @@ }

return route;
} catch (e) {
} catch (_e) {
throw new Error(`Failed to parse rewrite: ${JSON.stringify(r)}`);

@@ -382,3 +382,3 @@ }

return (0, import_path_to_regexp.compile)(value, { validate: false })(indexes);
} catch (e) {
} catch (_e) {
}

@@ -385,0 +385,0 @@ }

{
"name": "@vercel/routing-utils",
"version": "6.0.2",
"version": "6.1.0",
"description": "Vercel routing utilities",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is too big to display