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

@vercel/routing-utils

Package Overview
Dependencies
Maintainers
57
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.3-canary.0 to 1.11.3-canary.1

7

dist/index.js

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

}
function checkPatternSyntax(type, index, { source, destination, }) {
function checkPatternSyntax(type, index, { source, destination, has, }) {
let sourceSegments = new Set();

@@ -153,6 +153,7 @@ const destinationSegments = new Set();

}
const hasSegments = superstatic_1.collectHasSegments(has);
for (const segment of destinationSegments) {
if (!sourceSegments.has(segment)) {
if (!sourceSegments.has(segment) && !hasSegments.includes(segment)) {
return {
message: `${type} at index ${index} has segment ":${segment}" in \`destination\` property but not in \`source\` property.`,
message: `${type} at index ${index} has segment ":${segment}" in \`destination\` property but not in \`source\` or \`has\` property.`,
link: 'https://vercel.link/invalid-route-destination-segment',

@@ -159,0 +160,0 @@ };

@@ -1,2 +0,2 @@

import { Route, Redirect, Rewrite, Header } from './types';
import { Route, Redirect, Rewrite, HasField, Header } from './types';
export declare function getCleanUrls(filePaths: string[]): {

@@ -15,1 +15,2 @@ html: string;

};
export declare function collectHasSegments(has?: HasField): string[];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sourceToRegex = exports.convertTrailingSlash = exports.convertHeaders = exports.convertRewrites = exports.convertRedirects = exports.convertCleanUrls = exports.getCleanUrls = void 0;
exports.collectHasSegments = exports.sourceToRegex = exports.convertTrailingSlash = exports.convertHeaders = exports.convertRewrites = exports.convertRedirects = exports.convertCleanUrls = exports.getCleanUrls = void 0;
/**

@@ -194,2 +194,3 @@ * This converts Superstatic configuration to vercel.json Routes

}
exports.collectHasSegments = collectHasSegments;
function replaceSegments(segments, hasItemSegments, destination, isRedirect) {

@@ -196,0 +197,0 @@ const parsedDestination = url_1.parse(destination, true);

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

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

},
"gitHead": "cf827a8b919ff6eed383863af39c26d51b2aa16e"
"gitHead": "8f7c2f638539e25385f83beb056305c42294289d"
}
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