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

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
35
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.11.1-canary.0 to 1.11.1-canary.1

20

dist/superstatic.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -13,6 +10,2 @@ exports.sourceToRegex = exports.convertTrailingSlash = exports.convertHeaders = exports.convertRewrites = exports.convertRedirects = exports.convertCleanUrls = exports.getCleanUrls = void 0;

const path_to_regexp_1 = require("path-to-regexp");
// @ts-ignore
const lexer_1 = __importDefault(require("regexr/lexer-dist/lexer"));
// @ts-ignore
const profiles_1 = __importDefault(require("regexr/lexer-dist/profiles"));
const UN_NAMED_SEGMENT = '__UN_NAMED_SEGMENT__';

@@ -179,2 +172,3 @@ function getCleanUrls(filePaths) {

exports.sourceToRegex = sourceToRegex;
const namedGroupsRegex = /\(\?<([a-zA-Z][a-zA-Z0-9]*)>/g;
function collectHasSegments(has) {

@@ -187,9 +181,7 @@ const hasSegments = new Set();

if (hasItem.value) {
const matcher = new RegExp(`^${hasItem.value}$`);
const lexer = new lexer_1.default();
lexer.profile = profiles_1.default.js;
lexer.parse(`/${matcher.source}/`);
Object.keys(lexer.namedGroups).forEach(groupKey => {
hasSegments.add(groupKey);
});
for (const match of hasItem.value.matchAll(namedGroupsRegex)) {
if (match[1]) {
hasSegments.add(match[1]);
}
}
if (hasItem.type === 'host') {

@@ -196,0 +188,0 @@ hasSegments.add('host');

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

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

"dependencies": {
"path-to-regexp": "6.1.0",
"regexr": "https://github.com/ijjk/regexr-lexer.git#3bcf3d1c4bc6dd9239c47acb1fb7b419823f8337"
"path-to-regexp": "6.1.0"
},

@@ -35,3 +34,3 @@ "devDependencies": {

},
"gitHead": "6d8b10802c8e577a20762c8fb6e0f7b18991712d"
"gitHead": "e28edc5c93418bd65f675dc841a2bf0cf52b4572"
}
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