@netlify/plugin-nextjs 5.7.3 → 5.7.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.
@@ -8,7 +8,7 @@ import "./chunk-OEQOKJGE.js";
8
8
 
9
9
  // package.json
10
10
  var name = "@netlify/plugin-nextjs";
11
- var version = "5.7.3";
11
+ var version = "5.7.4";
12
12
  var description = "Run Next.js seamlessly on Netlify";
13
13
  var main = "./dist/index.js";
14
14
  var type = "module";
@@ -58,13 +58,13 @@ var homepage = "https://github.com/netlify/next-runtime#readme";
58
58
  var devDependencies = {
59
59
  "@fastly/http-compute-js": "1.1.4",
60
60
  "@netlify/blobs": "^8.0.1",
61
- "@netlify/build": "^29.54.8",
61
+ "@netlify/build": "^29.54.9",
62
62
  "@netlify/edge-bundler": "^12.2.3",
63
63
  "@netlify/edge-functions": "^2.11.0",
64
64
  "@netlify/eslint-config-node": "^7.0.1",
65
65
  "@netlify/functions": "^2.8.2",
66
66
  "@netlify/serverless-functions-api": "^1.29.0",
67
- "@netlify/zip-it-and-ship-it": "^9.39.6",
67
+ "@netlify/zip-it-and-ship-it": "^9.39.7",
68
68
  "@opentelemetry/api": "^1.8.0",
69
69
  "@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
70
70
  "@opentelemetry/resources": "^1.24.0",
@@ -169,10 +169,10 @@ var NetlifyCacheHandler = class {
169
169
  }
170
170
  if (cacheValue.kind === "PAGE" || cacheValue.kind === "PAGES" || cacheValue.kind === "APP_PAGE" || cacheValue.kind === "ROUTE" || cacheValue.kind === "APP_ROUTE") {
171
171
  if (cacheValue.headers?.[import_constants.NEXT_CACHE_TAGS_HEADER]) {
172
- const cacheTags = cacheValue.headers[import_constants.NEXT_CACHE_TAGS_HEADER].split(",");
172
+ const cacheTags = cacheValue.headers[import_constants.NEXT_CACHE_TAGS_HEADER].split(/,|%2c/gi);
173
173
  requestContext.responseCacheTags = cacheTags;
174
174
  } else if ((cacheValue.kind === "PAGE" || cacheValue.kind === "PAGES") && typeof cacheValue.pageData === "object") {
175
- const cacheTags = [`_N_T_${key === "/index" ? "/" : key}`];
175
+ const cacheTags = [`_N_T_${key === "/index" ? "/" : encodeURI(key)}`];
176
176
  requestContext.responseCacheTags = cacheTags;
177
177
  }
178
178
  }
@@ -319,10 +319,10 @@ var NetlifyCacheHandler = class {
319
319
  if (data?.kind === "PAGE" || data?.kind === "PAGES") {
320
320
  const requestContext = (0, import_request_context.getRequestContext)();
321
321
  if (requestContext?.didPagesRouterOnDemandRevalidate) {
322
- const tag = `_N_T_${key === "/index" ? "/" : key}`;
322
+ const tag = `_N_T_${key === "/index" ? "/" : encodeURI(key)}`;
323
323
  (0, import_request_context.getLogger)().debug(`Purging CDN cache for: [${tag}]`);
324
324
  requestContext.trackBackgroundWork(
325
- purgeCache({ tags: [tag] }).catch((error) => {
325
+ purgeCache({ tags: tag.split(/,|%2c/gi) }).catch((error) => {
326
326
  (0, import_request_context.getLogger)().withError(error).error(`[NetlifyCacheHandler]: Purging the cache for tag ${tag} failed`);
327
327
  })
328
328
  );
@@ -342,7 +342,9 @@ var NetlifyCacheHandler = class {
342
342
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
343
343
  async doRevalidateTag(tagOrTags, ...args) {
344
344
  (0, import_request_context.getLogger)().withFields({ tagOrTags, args }).debug("NetlifyCacheHandler.revalidateTag");
345
- const tags = Array.isArray(tagOrTags) ? tagOrTags : [tagOrTags];
345
+ const tags = (Array.isArray(tagOrTags) ? tagOrTags : [tagOrTags]).flatMap(
346
+ (tag) => tag.split(/,|%2c/gi)
347
+ );
346
348
  const data = {
347
349
  revalidatedAt: Date.now()
348
350
  };
@@ -370,7 +372,7 @@ var NetlifyCacheHandler = class {
370
372
  if (cacheEntry.value?.kind === "FETCH") {
371
373
  cacheTags = [...tags, ...softTags];
372
374
  } else if (cacheEntry.value?.kind === "PAGE" || cacheEntry.value?.kind === "PAGES" || cacheEntry.value?.kind === "APP_PAGE" || cacheEntry.value?.kind === "ROUTE" || cacheEntry.value?.kind === "APP_ROUTE") {
373
- cacheTags = cacheEntry.value.headers?.[import_constants.NEXT_CACHE_TAGS_HEADER]?.split(",") || [];
375
+ cacheTags = cacheEntry.value.headers?.[import_constants.NEXT_CACHE_TAGS_HEADER]?.split(/,|%2c/gi) || [];
374
376
  } else {
375
377
  return false;
376
378
  }
@@ -68866,7 +68866,7 @@ var import_semantic_conventions = __toESM(require_src(), 1);
68866
68866
  import { getLogger } from "./request-context.cjs";
68867
68867
  var {
68868
68868
  default: { version, name }
68869
- } = await import("../../esm-chunks/package-EEQP43EX.js");
68869
+ } = await import("../../esm-chunks/package-5HTSLGL2.js");
68870
68870
  var sdk = new import_sdk_node.NodeSDK({
68871
68871
  resource: new import_resources.Resource({
68872
68872
  [import_semantic_conventions.SEMRESATTRS_SERVICE_NAME]: name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "5.7.3",
3
+ "version": "5.7.4",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",