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.0 to 5.7.1

dist/esm-chunks/package-GZ5FMVI4.js

21

dist/build/content/prerendered.js

@@ -151,4 +151,4 @@

var routeToFilePath = (path) => path === "/" ? "/index" : path;
var buildPagesCacheValue = async (path) => ({
kind: "PAGE",
var buildPagesCacheValue = async (path, shouldUseEnumKind) => ({
kind: shouldUseEnumKind ? "PAGES" : "PAGE",
html: await readFile(`${path}.html`, "utf-8"),

@@ -185,4 +185,4 @@ pageData: JSON.parse(await readFile(`${path}.json`, "utf-8")),

};
var buildRouteCacheValue = async (path, initialRevalidateSeconds) => ({
kind: "ROUTE",
var buildRouteCacheValue = async (path, initialRevalidateSeconds, shouldUseEnumKind) => ({
kind: shouldUseEnumKind ? "APP_ROUTE" : "ROUTE",
body: await readFile(`${path}.body`, "base64"),

@@ -205,2 +205,5 @@ ...JSON.parse(await readFile(`${path}.meta`, "utf-8")),

}) : false;
const shouldUseEnumKind = ctx.nextVersion ? (0, import_semver.satisfies)(ctx.nextVersion, ">=15.0.0-canary.114 <15.0.0-d || >15.0.0-rc.0", {
includePrerelease: true
}) : false;
await Promise.all(

@@ -219,3 +222,6 @@ Object.entries(manifest.routes).map(

}
value = await buildPagesCacheValue(join(ctx.publishDir, "server/pages", key));
value = await buildPagesCacheValue(
join(ctx.publishDir, "server/pages", key),
shouldUseEnumKind
);
break;

@@ -231,3 +237,4 @@ case meta.dataRoute?.endsWith(".rsc"):

join(ctx.publishDir, "server/app", key),
meta.initialRevalidateSeconds
meta.initialRevalidateSeconds,
shouldUseEnumKind
);

@@ -238,3 +245,3 @@ break;

}
if (value.kind === "PAGE" || value.kind === "APP_PAGE") {
if (value.kind === "PAGE" || value.kind === "PAGES" || value.kind === "APP_PAGE") {
verifyNetlifyForms(ctx, value.html);

@@ -241,0 +248,0 @@ }

@@ -393,4 +393,6 @@

import { cp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import { dirname, join, relative, sep } from "node:path";
import { sep as posixSep } from "node:path/posix";
import { EDGE_HANDLER_NAME } from "../plugin-context.js";
var toPosixPath = (path) => path.split(sep).join(posixSep);
var writeEdgeManifest = async (ctx, manifest) => {

@@ -462,6 +464,12 @@ await mkdir(ctx.edgeFunctionsDir, { recursive: true });

const parts = [shim];
const outputFile = join(destDir, `server/${name}.js`);
if (wasm?.length) {
parts.push(
`import { decode as _base64Decode } from "../edge-runtime/vendor/deno.land/std@0.175.0/encoding/base64.ts";`
const base64ModulePath = join(
destDir,
"edge-runtime/vendor/deno.land/std@0.175.0/encoding/base64.ts"
);
const base64ModulePathRelativeToOutputFile = toPosixPath(
relative(dirname(outputFile), base64ModulePath)
);
parts.push(`import { decode as _base64Decode } from "${base64ModulePathRelativeToOutputFile}";`);
for (const wasmChunk of wasm ?? []) {

@@ -482,4 +490,4 @@ const data = await readFile(join(srcDir, wasmChunk.filePath));

const exports = `const middlewareEntryKey = Object.keys(_ENTRIES).find(entryKey => entryKey.startsWith("middleware_${name}")); export default _ENTRIES[middlewareEntryKey].default;`;
await mkdir(dirname(join(destDir, `server/${name}.js`)), { recursive: true });
await writeFile(join(destDir, `server/${name}.js`), [...parts, exports].join("\n"));
await mkdir(dirname(outputFile), { recursive: true });
await writeFile(outputFile, [...parts, exports].join("\n"));
};

@@ -486,0 +494,0 @@ var createEdgeHandler = async (ctx, definition) => {

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

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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