@netlify/plugin-nextjs 5.13.3 → 5.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -195,7 +195,13 @@ var copyNextDependencies = async (ctx) => {
195
195
  }
196
196
  const src = join(ctx.standaloneDir, entry);
197
197
  const dest = join(ctx.serverHandlerDir, entry);
198
- await cp(src, dest, { recursive: true, verbatimSymlinks: true, force: true });
198
+ const filter = ctx.constants.IS_LOCAL ? void 0 : nodeModulesFilter;
199
+ await cp(src, dest, {
200
+ recursive: true,
201
+ verbatimSymlinks: true,
202
+ force: true,
203
+ filter
204
+ });
199
205
  if (entry === "node_modules") {
200
206
  await recreateNodeModuleSymlinks(ctx.resolveFromSiteDir("node_modules"), dest);
201
207
  }
@@ -295,6 +301,12 @@ var verifyHandlerDirStructure = async (ctx) => {
295
301
  );
296
302
  }
297
303
  };
304
+ var nodeModulesFilter = async (sourcePath) => {
305
+ if (sourcePath.includes(".pnpm") && (sourcePath.includes("linuxmusl-x64") || sourcePath.includes("linux-x64-musl"))) {
306
+ return false;
307
+ }
308
+ return true;
309
+ };
298
310
  export {
299
311
  copyNextDependencies,
300
312
  copyNextServerCode,
@@ -610,16 +610,11 @@ var createEdgeHandler = async (ctx, definition) => {
610
610
  };
611
611
  var getHandlerName = ({ name }) => `${EDGE_HANDLER_NAME}-${name.replace(/\W/g, "-")}`;
612
612
  var buildHandlerDefinition = (ctx, def) => {
613
- const functionHandlerName = getHandlerName({ name: def.name });
614
- const functionName = "Next.js Middleware Handler";
615
- const cache = def.name.endsWith("middleware") ? void 0 : "manual";
616
- const generator = `${ctx.pluginName}@${ctx.pluginVersion}`;
617
613
  return augmentMatchers(def.matchers, ctx).map((matcher) => ({
618
- function: functionHandlerName,
619
- name: functionName,
614
+ function: getHandlerName({ name: def.name }),
615
+ name: "Next.js Middleware Handler",
620
616
  pattern: matcher.regexp,
621
- cache,
622
- generator
617
+ generator: `${ctx.pluginName}@${ctx.pluginVersion}`
623
618
  }));
624
619
  };
625
620
  var clearStaleEdgeHandlers = async (ctx) => {
@@ -25,12 +25,12 @@ var DEFAULT_PUBLISH_DIR = ".next";
25
25
  var SERVER_HANDLER_NAME = "___netlify-server-handler";
26
26
  var EDGE_HANDLER_NAME = "___netlify-edge-handler";
27
27
  var PluginContext = class {
28
+ constants;
28
29
  featureFlags;
29
30
  netlifyConfig;
30
31
  pluginName;
31
32
  pluginVersion;
32
33
  utils;
33
- constants;
34
34
  packageJSON;
35
35
  /** Absolute path of the next runtime plugin directory */
36
36
  pluginDir = PLUGIN_DIR;
@@ -86,7 +86,7 @@ var pipeline = (0, import_util.promisify)(import_stream.pipeline);
86
86
 
87
87
  // package.json
88
88
  var name = "@netlify/plugin-nextjs";
89
- var version = "5.13.3";
89
+ var version = "5.13.4";
90
90
 
91
91
  // src/run/handlers/tags-handler.cts
92
92
  var import_storage = require("../storage/storage.cjs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "5.13.3",
3
+ "version": "5.13.4",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",