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

@netlify/plugin-nextjs

Package Overview
Dependencies
Maintainers
21
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/plugin-nextjs - npm Package Compare versions

Comparing version 5.7.2 to 5.7.3

dist/esm-chunks/chunk-KGYJQ2U2.js

2

dist/build/content/prerendered.js

@@ -16,3 +16,3 @@

require_out
} from "../../esm-chunks/chunk-FHR56UHE.js";
} from "../../esm-chunks/chunk-KGYJQ2U2.js";
import {

@@ -19,0 +19,0 @@ require_semver

@@ -16,3 +16,3 @@

require_out
} from "../../esm-chunks/chunk-FHR56UHE.js";
} from "../../esm-chunks/chunk-KGYJQ2U2.js";
import {

@@ -19,0 +19,0 @@ require_semver

@@ -16,3 +16,3 @@

require_out
} from "../../esm-chunks/chunk-FHR56UHE.js";
} from "../../esm-chunks/chunk-KGYJQ2U2.js";
import {

@@ -19,0 +19,0 @@ __toESM

@@ -9,3 +9,3 @@

require_out
} from "../../esm-chunks/chunk-FHR56UHE.js";
} from "../../esm-chunks/chunk-KGYJQ2U2.js";
import {

@@ -110,4 +110,3 @@ __commonJS,

var tokens = lexer(str);
var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a;
var defaultPattern = "[^".concat(escapeString(options.delimiter || "/#?"), "]+?");
var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a, _b = options.delimiter, delimiter = _b === void 0 ? "/#?" : _b;
var result = [];

@@ -136,2 +135,20 @@ var key = 0;

};
var isSafe = function(value2) {
for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {
var char2 = delimiter_1[_i];
if (value2.indexOf(char2) > -1)
return true;
}
return false;
};
var safePattern = function(prefix2) {
var prev = result[result.length - 1];
var prevText = prefix2 || (prev && typeof prev === "string" ? prev : "");
if (prev && !prevText) {
throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name, '"'));
}
if (!prevText || isSafe(prevText))
return "[^".concat(escapeString(delimiter), "]+?");
return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter), "])+?");
};
while (i < tokens.length) {

@@ -155,3 +172,3 @@ var char = tryConsume("CHAR");

suffix: "",
pattern: pattern || defaultPattern,
pattern: pattern || safePattern(prefix),
modifier: tryConsume("MODIFIER") || ""

@@ -179,3 +196,3 @@ });

name: name_1 || (pattern_1 ? key++ : ""),
pattern: name_1 && !pattern_1 ? defaultPattern : pattern_1,
pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,
prefix,

@@ -356,6 +373,5 @@ suffix,

if (token.modifier === "+" || token.modifier === "*") {
route += "((?:".concat(token.pattern, ")").concat(token.modifier, ")");
} else {
route += "(".concat(token.pattern, ")").concat(token.modifier);
throw new TypeError('Can not repeat "'.concat(token.name, '" without a prefix and suffix'));
}
route += "(".concat(token.pattern, ")").concat(token.modifier);
}

@@ -362,0 +378,0 @@ } else {

@@ -16,3 +16,3 @@

require_out
} from "../../esm-chunks/chunk-FHR56UHE.js";
} from "../../esm-chunks/chunk-KGYJQ2U2.js";
import {

@@ -19,0 +19,0 @@ __toESM

@@ -113,5 +113,2 @@

get useRegionalBlobs() {
if (!(this.featureFlags || {})["next-runtime-regional-blobs"]) {
return false;
}
const REQUIRED_BUILD_VERSION = ">=29.41.5";

@@ -118,0 +115,0 @@ return (0, import_semver.satisfies)(this.buildVersion, REQUIRED_BUILD_VERSION, { includePrerelease: true });

@@ -9,3 +9,3 @@

require_out
} from "../esm-chunks/chunk-FHR56UHE.js";
} from "../esm-chunks/chunk-KGYJQ2U2.js";
import {

@@ -12,0 +12,0 @@ require_semver

@@ -27,3 +27,2 @@ import type { Context } from '@netlify/edge-functions'

nextConfig?: RequestData['nextConfig']
requestLocale?: string
}

@@ -37,3 +36,2 @@

nextConfig,
requestLocale,
}: BuildResponseOptions): Promise<Response | void> => {

@@ -202,7 +200,6 @@ logger

// If we are redirecting a request that had a locale in the URL, we need to add it back in
if (redirect && requestLocale) {
redirect = normalizeLocalizedTarget({ target: redirect, request, nextConfig, requestLocale })
if (redirect) {
redirect = normalizeLocalizedTarget({ target: redirect, request, nextConfig })
if (redirect === request.url) {
logger.withFields({ rewrite_url: rewrite }).debug('Rewrite url is same as original url')
logger.withFields({ redirect_url: redirect }).debug('Redirect url is same as original url')
return

@@ -240,3 +237,2 @@ }

nextConfig,
requestLocale,
}: {

@@ -246,4 +242,3 @@ target: string

nextConfig?: RequestData['nextConfig']
requestLocale?: string
}) {
}): string {
const targetUrl = new URL(target, request.url)

@@ -253,5 +248,4 @@

const locale = normalizedTarget.detectedLocale ?? requestLocale
if (
locale &&
normalizedTarget.detectedLocale &&
!normalizedTarget.pathname.startsWith(`/api/`) &&

@@ -261,3 +255,6 @@ !normalizedTarget.pathname.startsWith(`/_next/static/`)

targetUrl.pathname =
addBasePath(`/${locale}${normalizedTarget.pathname}`, nextConfig?.basePath) || `/`
addBasePath(
`/${normalizedTarget.detectedLocale}${normalizedTarget.pathname}`,
nextConfig?.basePath,
) || `/`
} else {

@@ -264,0 +261,0 @@ targetUrl.pathname = addBasePath(normalizedTarget.pathname, nextConfig?.basePath) || `/`

@@ -64,3 +64,2 @@ import type { Context } from '@netlify/edge-functions'

result,
requestLocale: nextRequest.detectedLocale,
nextConfig,

@@ -67,0 +66,0 @@ })

{
"name": "@netlify/plugin-nextjs",
"version": "5.7.2",
"version": "5.7.3",
"description": "Run Next.js seamlessly on Netlify",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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