Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
7
Versions
80
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 2.1.2 to 2.1.3

26

dist/superstatic.js

@@ -44,2 +44,4 @@ "use strict";

const hasSegments = collectHasSegments(r.has);
normalizeHasKeys(r.has);
normalizeHasKeys(r.missing);
try {

@@ -65,2 +67,5 @@ const loc = replaceSegments(segments, hasSegments, r.destination, true);

}
if (r.missing) {
route.missing = r.missing;
}
return route;

@@ -78,2 +83,4 @@ }

const hasSegments = collectHasSegments(r.has);
normalizeHasKeys(r.has);
normalizeHasKeys(r.missing);
try {

@@ -85,2 +92,5 @@ const dest = replaceSegments(segments, hasSegments, r.destination, false, internalParamNames);

}
if (r.missing) {
route.missing = r.missing;
}
return route;

@@ -99,2 +109,4 @@ }

const hasSegments = collectHasSegments(h.has);
normalizeHasKeys(h.has);
normalizeHasKeys(h.missing);
const namedSegments = segments.filter(name => name !== UN_NAMED_SEGMENT);

@@ -127,2 +139,5 @@ const indexes = {};

}
if (h.missing) {
route.missing = h.missing;
}
return route;

@@ -178,8 +193,13 @@ });

const namedGroupsRegex = /\(\?<([a-zA-Z][a-zA-Z0-9]*)>/g;
const normalizeHasKeys = (hasItems = []) => {
for (const hasItem of hasItems) {
if ('key' in hasItem && hasItem.type === 'header') {
hasItem.key = hasItem.key.toLowerCase();
}
}
return hasItems;
};
function collectHasSegments(has) {
const hasSegments = new Set();
for (const hasItem of has || []) {
if ('key' in hasItem && hasItem.type === 'header') {
hasItem.key = hasItem.key.toLowerCase();
}
if (!hasItem.value && 'key' in hasItem) {

@@ -186,0 +206,0 @@ hasSegments.add(hasItem.key);

4

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

@@ -33,3 +33,3 @@ "main": "./dist/index.js",

},
"gitHead": "0964be17106419263b3f38d67784dd97b8b0c565"
"gitHead": "1b211f28dfdcb112f1aecb53a2b9f257ecc58420"
}
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