@sitecore-jss/sitecore-jss-nextjs 22.11.0-canary.6 → 22.11.0-canary.7

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.
@@ -10,7 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EditingRenderMiddleware = exports.MetadataHandler = exports.isDesignLibraryPreviewData = exports.isEditingMetadataPreviewData = exports.ChromesHandler = void 0;
13
- const constants_1 = require("next/constants");
13
+ // STATIC_PROPS_ID and SERVER_PROPS_ID were removed from next/constants in Next.js 16
14
+ // These are internal identifiers used in __NEXT_DATA__ script tag
15
+ // Defining them locally to maintain functionality
16
+ const STATIC_PROPS_ID = '__N_SSG';
17
+ const SERVER_PROPS_ID = '__N_SSR';
14
18
  const sitecore_jss_1 = require("@sitecore-jss/sitecore-jss");
15
19
  const layout_1 = require("@sitecore-jss/sitecore-jss/layout");
16
20
  const editing_1 = require("@sitecore-jss/sitecore-jss/editing");
@@ -117,7 +121,7 @@ class ChromesHandler extends render_middleware_1.RenderMiddlewareBase {
117
121
  // to do with the Next route/page we've rendered. Beyond the extraneous request, this can result in a 404 with
118
122
  // certain route configurations (e.g. multiple catch-all routes).
119
123
  // The following line will trick it into thinking we're SSR, thus avoiding any router.replace.
120
- html = html.replace(constants_1.STATIC_PROPS_ID, constants_1.SERVER_PROPS_ID);
124
+ html = html.replace(STATIC_PROPS_ID, SERVER_PROPS_ID);
121
125
  const body = { html };
122
126
  // Return expected JSON result
123
127
  sitecore_jss_1.debug.editing('editing render middleware end in %dms: %o', Date.now() - startTimestamp, {
@@ -7,7 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { STATIC_PROPS_ID, SERVER_PROPS_ID } from 'next/constants';
10
+ // STATIC_PROPS_ID and SERVER_PROPS_ID were removed from next/constants in Next.js 16
11
+ // These are internal identifiers used in __NEXT_DATA__ script tag
12
+ // Defining them locally to maintain functionality
13
+ const STATIC_PROPS_ID = '__N_SSG';
14
+ const SERVER_PROPS_ID = '__N_SSR';
11
15
  import { NativeDataFetcher, debug } from '@sitecore-jss/sitecore-jss';
12
16
  import { EditMode, LayoutServicePageState } from '@sitecore-jss/sitecore-jss/layout';
13
17
  import { QUERY_PARAM_EDITING_SECRET, EDITING_ALLOWED_ORIGINS, isDesignLibraryMode, } from '@sitecore-jss/sitecore-jss/editing';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-nextjs",
3
- "version": "22.11.0-canary.6",
3
+ "version": "22.11.0-canary.7",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -53,7 +53,7 @@
53
53
  "eslint-plugin-react": "^7.37.5",
54
54
  "jsdom": "^26.1.0",
55
55
  "mocha": "^11.7.0",
56
- "next": "^15.4.6",
56
+ "next": "^16.1.0",
57
57
  "nock": "^13.3.0",
58
58
  "nyc": "^17.1.0",
59
59
  "react": "^19.1.0",
@@ -67,21 +67,21 @@
67
67
  "@sitecore-cloudsdk/core": "^0.5.2",
68
68
  "@sitecore-cloudsdk/events": "^0.5.2",
69
69
  "@sitecore-cloudsdk/personalize": "^0.5.2",
70
- "next": "^15.4.6",
70
+ "next": "^16.1.0",
71
71
  "react": "^19.1.0",
72
72
  "react-dom": "^19.1.0"
73
73
  },
74
74
  "dependencies": {
75
- "@sitecore-jss/sitecore-jss": "22.11.0-canary.6",
76
- "@sitecore-jss/sitecore-jss-dev-tools": "22.11.0-canary.6",
77
- "@sitecore-jss/sitecore-jss-react": "22.11.0-canary.6",
75
+ "@sitecore-jss/sitecore-jss": "22.11.0-canary.7",
76
+ "@sitecore-jss/sitecore-jss-dev-tools": "22.11.0-canary.7",
77
+ "@sitecore-jss/sitecore-jss-react": "22.11.0-canary.7",
78
78
  "@vercel/kv": "^0.2.1",
79
79
  "regex-parser": "^2.2.11",
80
80
  "sync-disk-cache": "^2.1.0"
81
81
  },
82
82
  "description": "",
83
83
  "types": "types/index.d.ts",
84
- "gitHead": "d8887014b516b2eb4c1c913a172f7c4658dfed16",
84
+ "gitHead": "8de47145f9d9ed3b50b3fa72dff8758df03188bc",
85
85
  "files": [
86
86
  "dist",
87
87
  "types",