@netlify/plugin-nextjs 5.0.0-rc.7 → 5.0.0-rc.8

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.
@@ -6,7 +6,7 @@
6
6
 
7
7
  import {
8
8
  setImageConfig
9
- } from "../esm-chunks/chunk-FMO6SJ5E.js";
9
+ } from "../esm-chunks/chunk-MCEOSJH6.js";
10
10
  import "../esm-chunks/chunk-5JVNISGM.js";
11
11
  export {
12
12
  setImageConfig
@@ -1565,15 +1565,27 @@ var setImageConfig = async (ctx) => {
1565
1565
  if (imageLoader !== "default") {
1566
1566
  return;
1567
1567
  }
1568
- ctx.netlifyConfig.redirects.push({
1569
- from: imageEndpointPath,
1570
- // w and q are too short to be used as params with id-length rule
1571
- // but we are forced to do so because of the next/image loader decides on their names
1572
- // eslint-disable-next-line id-length
1573
- query: { url: ":url", w: ":width", q: ":quality" },
1574
- to: "/.netlify/images?url=:url&w=:width&q=:quality",
1575
- status: 200
1576
- });
1568
+ ctx.netlifyConfig.redirects.push(
1569
+ {
1570
+ from: imageEndpointPath,
1571
+ // w and q are too short to be used as params with id-length rule
1572
+ // but we are forced to do so because of the next/image loader decides on their names
1573
+ // eslint-disable-next-line id-length
1574
+ query: { url: ":url", w: ":width", q: ":quality" },
1575
+ to: "/.netlify/images?url=:url&w=:width&q=:quality",
1576
+ status: 200
1577
+ },
1578
+ // when migrating from @netlify/plugin-nextjs@4 image redirect to ipx might be cached in the browser
1579
+ {
1580
+ from: "/_ipx/*",
1581
+ // w and q are too short to be used as params with id-length rule
1582
+ // but we are forced to do so because of the next/image loader decides on their names
1583
+ // eslint-disable-next-line id-length
1584
+ query: { url: ":url", w: ":width", q: ":quality" },
1585
+ to: "/.netlify/images?url=:url&w=:width&q=:quality",
1586
+ status: 200
1587
+ }
1588
+ );
1577
1589
  if (remotePatterns?.length !== 0 || domains?.length !== 0) {
1578
1590
  ctx.netlifyConfig.images ||= { remote_images: [] };
1579
1591
  ctx.netlifyConfig.images.remote_images ||= [];
@@ -8,7 +8,7 @@ import "./chunk-5JVNISGM.js";
8
8
 
9
9
  // package.json
10
10
  var name = "@netlify/plugin-nextjs";
11
- var version = "5.0.0-rc.7";
11
+ var version = "5.0.0-rc.8";
12
12
  var description = "Run Next.js seamlessly on Netlify";
13
13
  var main = "./dist/index.js";
14
14
  var type = "module";
@@ -53,7 +53,7 @@ var homepage = "https://github.com/netlify/next-runtime-minimal#readme";
53
53
  var devDependencies = {
54
54
  "@fastly/http-compute-js": "1.1.4",
55
55
  "@netlify/blobs": "^7.0.1",
56
- "@netlify/build": "^29.36.4",
56
+ "@netlify/build": "^29.37.2",
57
57
  "@netlify/edge-bundler": "^11.3.0",
58
58
  "@netlify/edge-functions": "^2.3.1",
59
59
  "@netlify/eslint-config-node": "^7.0.1",
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  } from "./esm-chunks/chunk-72ZI2IVI.js";
36
36
  import {
37
37
  setImageConfig
38
- } from "./esm-chunks/chunk-FMO6SJ5E.js";
38
+ } from "./esm-chunks/chunk-MCEOSJH6.js";
39
39
  import {
40
40
  PluginContext
41
41
  } from "./esm-chunks/chunk-3NYX5FXN.js";
@@ -925,12 +925,17 @@ var NetlifyCacheHandler = class {
925
925
  const lastModified = Date.now();
926
926
  span.setAttributes({ key, lastModified, blobKey });
927
927
  console.debug(`[NetlifyCacheHandler.set]: ${key}`);
928
+ let value = data;
928
929
  if (data?.kind === "ROUTE") {
929
- data.body = data.body.toString("base64");
930
+ value = {
931
+ ...data,
932
+ // @ts-expect-error gotta find a better solution for this
933
+ body: data.body.toString("base64")
934
+ };
930
935
  }
931
936
  await this.blobStore.setJSON(blobKey, {
932
937
  lastModified,
933
- value: data
938
+ value
934
939
  });
935
940
  if (data?.kind === "PAGE") {
936
941
  const requestContext = (0, import_request_context.getRequestContext)();
@@ -51202,7 +51202,7 @@ var import_sdk_trace_node = __toESM(require_src14(), 1);
51202
51202
  var import_semantic_conventions = __toESM(require_src(), 1);
51203
51203
  var {
51204
51204
  default: { version, name }
51205
- } = await import("../../esm-chunks/package-NR7AMHPP.js");
51205
+ } = await import("../../esm-chunks/package-NFGYFGF2.js");
51206
51206
  var sdk = new import_sdk_node.NodeSDK({
51207
51207
  resource: new import_resources.Resource({
51208
51208
  [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.0.0-rc.7",
3
+ "version": "5.0.0-rc.8",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",