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

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
13
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 1.8.2 to 1.8.3-canary.0

16

dist/superstatic.js

@@ -7,5 +7,5 @@ "use strict";

*/
const util_1 = require("util");
const url_1 = require("url");
const path_to_regexp_1 = require("path-to-regexp");
const UN_NAMED_SEGMENT = '__UN_NAMED_SEGMENT__';
function getCleanUrls(filePaths) {

@@ -142,3 +142,10 @@ const htmlFiles = filePaths

});
const segments = keys.map(k => k.name).filter(util_1.isString);
const segments = keys
.map(k => k.name)
.map(name => {
if (typeof name !== 'string') {
return UN_NAMED_SEGMENT;
}
return name;
});
return { src: r.source, segments };

@@ -156,3 +163,4 @@ }

hash = hash || '';
if (segments.length > 0) {
const namedSegments = segments.filter(name => name !== UN_NAMED_SEGMENT);
if (namedSegments.length > 0) {
const indexes = {};

@@ -177,3 +185,3 @@ segments.forEach((name, index) => {

for (const [name, value] of Object.entries(indexes)) {
if (!(name in query)) {
if (!(name in query) && name !== UN_NAMED_SEGMENT) {
query[name] = value;

@@ -180,0 +188,0 @@ }

{
"name": "@vercel/routing-utils",
"version": "1.8.2",
"version": "1.8.3-canary.0",
"description": "Vercel routing utilities",

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

},
"gitHead": "b626f3fe57751dc2c34a0bb8f678bcbbaafae068"
"gitHead": "684c2299842cb52d7f2ba78a13ed12bd046abb7e"
}
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