New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
9
Versions
86
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 5.0.2 to 5.0.3

41

dist/superstatic.js

@@ -32,34 +32,3 @@ "use strict";

var import_url = require("url");
var import_path_to_regexp = require("path-to-regexp");
var import_path_to_regexp_updated = require("path-to-regexp-updated");
function pathToRegexp(callerId, path, keys, options) {
const currentRegExp = (0, import_path_to_regexp.pathToRegexp)(path, keys, options);
try {
const currentKeys = keys;
const newKeys = [];
const newRegExp = (0, import_path_to_regexp_updated.pathToRegexp)(path, newKeys, options);
const isDiffRegExp = currentRegExp.toString() !== newRegExp.toString();
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffRegExp) {
const message = JSON.stringify({
path,
currentRegExp: currentRegExp.toString(),
newRegExp: newRegExp.toString()
});
console.error(`[vc] PATH TO REGEXP PATH DIFF @ #${callerId}: ${message}`);
}
const isDiffKeys = keys?.toString() !== newKeys?.toString();
if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffKeys) {
const message = JSON.stringify({
isDiffKeys,
currentKeys,
newKeys
});
console.error(`[vc] PATH TO REGEXP KEYS DIFF @ #${callerId}: ${message}`);
}
} catch (err) {
const error = err;
console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${error.message}`);
}
return currentRegExp;
}
var import_path_to_regexp = require("@vercel-internals/path-to-regexp");
const UN_NAMED_SEGMENT = "__UN_NAMED_SEGMENT__";

@@ -220,3 +189,3 @@ function getCleanUrls(filePaths) {

const keys = [];
const r = pathToRegexp("632", source, keys, {
const r = (0, import_path_to_regexp.pathToRegexp)("632", source, keys, {
strict: true,

@@ -294,5 +263,5 @@ sensitive: true,

try {
pathToRegexp("528", pathname, pathnameKeys);
pathToRegexp("834", hash || "", hashKeys);
pathToRegexp("712", hostname || "", hostnameKeys);
(0, import_path_to_regexp.pathToRegexp)("528", pathname, pathnameKeys);
(0, import_path_to_regexp.pathToRegexp)("834", hash || "", hashKeys);
(0, import_path_to_regexp.pathToRegexp)("712", hostname || "", hostnameKeys);
} catch (_) {

@@ -299,0 +268,0 @@ }

8

package.json
{
"name": "@vercel/routing-utils",
"version": "5.0.2",
"version": "5.0.3",
"description": "Vercel routing utilities",

@@ -16,9 +16,7 @@ "main": "./dist/index.js",

"license": "Apache-2.0",
"dependencies": {
"path-to-regexp-updated": "npm:path-to-regexp@6.3.0",
"path-to-regexp": "6.1.0"
},
"dependencies": {},
"devDependencies": {
"@types/jest": "27.4.1",
"@types/node": "14.18.33",
"@vercel-internals/path-to-regexp": "1.0.0",
"ajv": "^6.12.3",

@@ -25,0 +23,0 @@ "jest-junit": "16.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc