next 15.4.0-canary.0 → 15.4.0-canary.2

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.
Files changed (35) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +37 -4
  3. package/dist/build/index.js.map +1 -1
  4. package/dist/build/swc/index.js +1 -1
  5. package/dist/build/utils.d.ts +1 -0
  6. package/dist/build/utils.js.map +1 -1
  7. package/dist/build/webpack-config.js +2 -2
  8. package/dist/client/app-bootstrap.js +1 -1
  9. package/dist/client/index.js +1 -1
  10. package/dist/esm/build/index.js +38 -5
  11. package/dist/esm/build/index.js.map +1 -1
  12. package/dist/esm/build/swc/index.js +1 -1
  13. package/dist/esm/build/utils.js.map +1 -1
  14. package/dist/esm/build/webpack-config.js +2 -2
  15. package/dist/esm/client/app-bootstrap.js +1 -1
  16. package/dist/esm/client/index.js +1 -1
  17. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  18. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  19. package/dist/esm/server/lib/app-info-log.js +1 -1
  20. package/dist/esm/server/lib/router-utils/build-prefetch-segment-data-route.js +29 -3
  21. package/dist/esm/server/lib/router-utils/build-prefetch-segment-data-route.js.map +1 -1
  22. package/dist/esm/server/lib/start-server.js +1 -1
  23. package/dist/esm/shared/lib/canary-only.js +1 -1
  24. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  25. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  26. package/dist/server/lib/app-info-log.js +1 -1
  27. package/dist/server/lib/router-utils/build-prefetch-segment-data-route.d.ts +13 -0
  28. package/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +24 -2
  29. package/dist/server/lib/router-utils/build-prefetch-segment-data-route.js.map +1 -1
  30. package/dist/server/lib/start-server.js +1 -1
  31. package/dist/shared/lib/canary-only.js +1 -1
  32. package/dist/telemetry/anonymous-meta.js +1 -1
  33. package/dist/telemetry/events/session-stopped.js +2 -2
  34. package/dist/telemetry/events/version.js +2 -2
  35. package/package.json +15 -15
@@ -1,12 +1,12 @@
1
1
  import path from '../../../shared/lib/isomorphic/path';
2
2
  import { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path';
3
3
  import { getNamedRouteRegex } from '../../../shared/lib/router/utils/route-regex';
4
- import { RSC_SEGMENT_SUFFIX, RSC_SEGMENTS_DIR_SUFFIX } from '../../../lib/constants';
4
+ import { RSC_PREFETCH_SUFFIX, RSC_SEGMENT_SUFFIX, RSC_SEGMENTS_DIR_SUFFIX } from '../../../lib/constants';
5
5
  export const SEGMENT_PATH_KEY = 'nextSegmentPath';
6
6
  export function buildPrefetchSegmentDataRoute(page, segmentPath) {
7
7
  const pagePath = normalizePagePath(page);
8
8
  const destination = path.posix.join(`${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`, `${segmentPath}${RSC_SEGMENT_SUFFIX}`);
9
- const { namedRegex } = getNamedRouteRegex(destination, {
9
+ const { namedRegex, routeKeys } = getNamedRouteRegex(destination, {
10
10
  prefixRouteKeys: true,
11
11
  includePrefix: true,
12
12
  includeSuffix: true,
@@ -15,7 +15,33 @@ export function buildPrefetchSegmentDataRoute(page, segmentPath) {
15
15
  });
16
16
  return {
17
17
  destination,
18
- source: namedRegex
18
+ source: namedRegex,
19
+ routeKeys
20
+ };
21
+ }
22
+ /**
23
+ * Builds a prefetch segment data route that is inverted. This means that it's
24
+ * supposed to rewrite from the previous segment paths route back to the
25
+ * prefetch RSC route.
26
+ *
27
+ * @param page - The page to build the route for.
28
+ * @param segmentPath - The segment path to build the route for.
29
+ * @returns The prefetch segment data route.
30
+ */ export function buildInversePrefetchSegmentDataRoute(page, segmentPath) {
31
+ const pagePath = normalizePagePath(page);
32
+ const source = path.posix.join(`${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`, `${segmentPath}${RSC_SEGMENT_SUFFIX}`);
33
+ const { namedRegex, routeKeys } = getNamedRouteRegex(source, {
34
+ prefixRouteKeys: true,
35
+ includePrefix: true,
36
+ includeSuffix: true,
37
+ excludeOptionalTrailingSlash: true,
38
+ backreferenceDuplicateKeys: true
39
+ });
40
+ const destination = path.posix.join(`${pagePath}${RSC_PREFETCH_SUFFIX}`);
41
+ return {
42
+ source: namedRegex,
43
+ destination,
44
+ routeKeys
19
45
  };
20
46
  }
21
47
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/server/lib/router-utils/build-prefetch-segment-data-route.ts"],"sourcesContent":["import path from '../../../shared/lib/isomorphic/path'\nimport { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path'\nimport { getNamedRouteRegex } from '../../../shared/lib/router/utils/route-regex'\nimport {\n RSC_SEGMENT_SUFFIX,\n RSC_SEGMENTS_DIR_SUFFIX,\n} from '../../../lib/constants'\n\nexport const SEGMENT_PATH_KEY = 'nextSegmentPath'\n\nexport type PrefetchSegmentDataRoute = {\n source: string\n destination: string\n}\n\nexport function buildPrefetchSegmentDataRoute(\n page: string,\n segmentPath: string\n): PrefetchSegmentDataRoute {\n const pagePath = normalizePagePath(page)\n\n const destination = path.posix.join(\n `${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`,\n `${segmentPath}${RSC_SEGMENT_SUFFIX}`\n )\n\n const { namedRegex } = getNamedRouteRegex(destination, {\n prefixRouteKeys: true,\n includePrefix: true,\n includeSuffix: true,\n excludeOptionalTrailingSlash: true,\n backreferenceDuplicateKeys: true,\n })\n\n return {\n destination,\n source: namedRegex,\n }\n}\n"],"names":["path","normalizePagePath","getNamedRouteRegex","RSC_SEGMENT_SUFFIX","RSC_SEGMENTS_DIR_SUFFIX","SEGMENT_PATH_KEY","buildPrefetchSegmentDataRoute","page","segmentPath","pagePath","destination","posix","join","namedRegex","prefixRouteKeys","includePrefix","includeSuffix","excludeOptionalTrailingSlash","backreferenceDuplicateKeys","source"],"mappings":"AAAA,OAAOA,UAAU,sCAAqC;AACtD,SAASC,iBAAiB,QAAQ,oDAAmD;AACrF,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SACEC,kBAAkB,EAClBC,uBAAuB,QAClB,yBAAwB;AAE/B,OAAO,MAAMC,mBAAmB,kBAAiB;AAOjD,OAAO,SAASC,8BACdC,IAAY,EACZC,WAAmB;IAEnB,MAAMC,WAAWR,kBAAkBM;IAEnC,MAAMG,cAAcV,KAAKW,KAAK,CAACC,IAAI,CACjC,GAAGH,WAAWL,yBAAyB,EACvC,GAAGI,cAAcL,oBAAoB;IAGvC,MAAM,EAAEU,UAAU,EAAE,GAAGX,mBAAmBQ,aAAa;QACrDI,iBAAiB;QACjBC,eAAe;QACfC,eAAe;QACfC,8BAA8B;QAC9BC,4BAA4B;IAC9B;IAEA,OAAO;QACLR;QACAS,QAAQN;IACV;AACF","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../../src/server/lib/router-utils/build-prefetch-segment-data-route.ts"],"sourcesContent":["import path from '../../../shared/lib/isomorphic/path'\nimport { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path'\nimport { getNamedRouteRegex } from '../../../shared/lib/router/utils/route-regex'\nimport {\n RSC_PREFETCH_SUFFIX,\n RSC_SEGMENT_SUFFIX,\n RSC_SEGMENTS_DIR_SUFFIX,\n} from '../../../lib/constants'\n\nexport const SEGMENT_PATH_KEY = 'nextSegmentPath'\n\nexport type PrefetchSegmentDataRoute = {\n source: string\n destination: string\n routeKeys: { [key: string]: string }\n}\n\nexport function buildPrefetchSegmentDataRoute(\n page: string,\n segmentPath: string\n): PrefetchSegmentDataRoute {\n const pagePath = normalizePagePath(page)\n\n const destination = path.posix.join(\n `${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`,\n `${segmentPath}${RSC_SEGMENT_SUFFIX}`\n )\n\n const { namedRegex, routeKeys } = getNamedRouteRegex(destination, {\n prefixRouteKeys: true,\n includePrefix: true,\n includeSuffix: true,\n excludeOptionalTrailingSlash: true,\n backreferenceDuplicateKeys: true,\n })\n\n return {\n destination,\n source: namedRegex,\n routeKeys,\n }\n}\n\n/**\n * Builds a prefetch segment data route that is inverted. This means that it's\n * supposed to rewrite from the previous segment paths route back to the\n * prefetch RSC route.\n *\n * @param page - The page to build the route for.\n * @param segmentPath - The segment path to build the route for.\n * @returns The prefetch segment data route.\n */\nexport function buildInversePrefetchSegmentDataRoute(\n page: string,\n segmentPath: string\n): PrefetchSegmentDataRoute {\n const pagePath = normalizePagePath(page)\n\n const source = path.posix.join(\n `${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`,\n `${segmentPath}${RSC_SEGMENT_SUFFIX}`\n )\n\n const { namedRegex, routeKeys } = getNamedRouteRegex(source, {\n prefixRouteKeys: true,\n includePrefix: true,\n includeSuffix: true,\n excludeOptionalTrailingSlash: true,\n backreferenceDuplicateKeys: true,\n })\n\n const destination = path.posix.join(`${pagePath}${RSC_PREFETCH_SUFFIX}`)\n\n return {\n source: namedRegex,\n destination,\n routeKeys,\n }\n}\n"],"names":["path","normalizePagePath","getNamedRouteRegex","RSC_PREFETCH_SUFFIX","RSC_SEGMENT_SUFFIX","RSC_SEGMENTS_DIR_SUFFIX","SEGMENT_PATH_KEY","buildPrefetchSegmentDataRoute","page","segmentPath","pagePath","destination","posix","join","namedRegex","routeKeys","prefixRouteKeys","includePrefix","includeSuffix","excludeOptionalTrailingSlash","backreferenceDuplicateKeys","source","buildInversePrefetchSegmentDataRoute"],"mappings":"AAAA,OAAOA,UAAU,sCAAqC;AACtD,SAASC,iBAAiB,QAAQ,oDAAmD;AACrF,SAASC,kBAAkB,QAAQ,+CAA8C;AACjF,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,uBAAuB,QAClB,yBAAwB;AAE/B,OAAO,MAAMC,mBAAmB,kBAAiB;AAQjD,OAAO,SAASC,8BACdC,IAAY,EACZC,WAAmB;IAEnB,MAAMC,WAAWT,kBAAkBO;IAEnC,MAAMG,cAAcX,KAAKY,KAAK,CAACC,IAAI,CACjC,GAAGH,WAAWL,yBAAyB,EACvC,GAAGI,cAAcL,oBAAoB;IAGvC,MAAM,EAAEU,UAAU,EAAEC,SAAS,EAAE,GAAGb,mBAAmBS,aAAa;QAChEK,iBAAiB;QACjBC,eAAe;QACfC,eAAe;QACfC,8BAA8B;QAC9BC,4BAA4B;IAC9B;IAEA,OAAO;QACLT;QACAU,QAAQP;QACRC;IACF;AACF;AAEA;;;;;;;;CAQC,GACD,OAAO,SAASO,qCACdd,IAAY,EACZC,WAAmB;IAEnB,MAAMC,WAAWT,kBAAkBO;IAEnC,MAAMa,SAASrB,KAAKY,KAAK,CAACC,IAAI,CAC5B,GAAGH,WAAWL,yBAAyB,EACvC,GAAGI,cAAcL,oBAAoB;IAGvC,MAAM,EAAEU,UAAU,EAAEC,SAAS,EAAE,GAAGb,mBAAmBmB,QAAQ;QAC3DL,iBAAiB;QACjBC,eAAe;QACfC,eAAe;QACfC,8BAA8B;QAC9BC,4BAA4B;IAC9B;IAEA,MAAMT,cAAcX,KAAKY,KAAK,CAACC,IAAI,CAAC,GAAGH,WAAWP,qBAAqB;IAEvE,OAAO;QACLkB,QAAQP;QACRH;QACAI;IACF;AACF","ignoreList":[0]}
@@ -42,7 +42,7 @@ export async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup,
42
42
  export async function startServer(serverOptions) {
43
43
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
44
44
  let { port } = serverOptions;
45
- process.title = `next-server (v${"15.4.0-canary.0"})`;
45
+ process.title = `next-server (v${"15.4.0-canary.2"})`;
46
46
  let handlersReady = ()=>{};
47
47
  let handlersError = ()=>{};
48
48
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -1,6 +1,6 @@
1
1
  export function isStableBuild() {
2
2
  var _process_env___NEXT_VERSION;
3
- return !((_process_env___NEXT_VERSION = "15.4.0-canary.0") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
3
+ return !((_process_env___NEXT_VERSION = "15.4.0-canary.2") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
4
4
  }
5
5
  export class CanaryOnlyError extends Error {
6
6
  constructor(arg){
@@ -139,7 +139,7 @@ async function createHotReloaderTurbopack(opts, serverFields, distDir, resetFetc
139
139
  }
140
140
  const hasRewrites = opts.fsChecker.rewrites.afterFiles.length > 0 || opts.fsChecker.rewrites.beforeFiles.length > 0 || opts.fsChecker.rewrites.fallback.length > 0;
141
141
  const hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
142
- version: "15.4.0-canary.0"
142
+ version: "15.4.0-canary.2"
143
143
  });
144
144
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
145
145
  // of the current `next dev` invocation.
@@ -257,7 +257,7 @@ class HotReloaderWebpack {
257
257
  this.previewProps = previewProps;
258
258
  this.rewrites = rewrites;
259
259
  this.hotReloaderSpan = (0, _trace.trace)('hot-reloader', undefined, {
260
- version: "15.4.0-canary.0"
260
+ version: "15.4.0-canary.2"
261
261
  });
262
262
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
263
263
  // of the current `next dev` invocation.
@@ -75,7 +75,7 @@ function logStartInfo({ networkUrl, appUrl, envInfo, experimentalFeatures, maxEx
75
75
  } else {
76
76
  bundlerSuffix = '';
77
77
  }
78
- _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.4.0-canary.0"}`))}${bundlerSuffix}`);
78
+ _log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"15.4.0-canary.2"}`))}${bundlerSuffix}`);
79
79
  if (appUrl) {
80
80
  _log.bootstrap(`- Local: ${appUrl}`);
81
81
  }
@@ -2,5 +2,18 @@ export declare const SEGMENT_PATH_KEY = "nextSegmentPath";
2
2
  export type PrefetchSegmentDataRoute = {
3
3
  source: string;
4
4
  destination: string;
5
+ routeKeys: {
6
+ [key: string]: string;
7
+ };
5
8
  };
6
9
  export declare function buildPrefetchSegmentDataRoute(page: string, segmentPath: string): PrefetchSegmentDataRoute;
10
+ /**
11
+ * Builds a prefetch segment data route that is inverted. This means that it's
12
+ * supposed to rewrite from the previous segment paths route back to the
13
+ * prefetch RSC route.
14
+ *
15
+ * @param page - The page to build the route for.
16
+ * @param segmentPath - The segment path to build the route for.
17
+ * @returns The prefetch segment data route.
18
+ */
19
+ export declare function buildInversePrefetchSegmentDataRoute(page: string, segmentPath: string): PrefetchSegmentDataRoute;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  0 && (module.exports = {
6
6
  SEGMENT_PATH_KEY: null,
7
+ buildInversePrefetchSegmentDataRoute: null,
7
8
  buildPrefetchSegmentDataRoute: null
8
9
  });
9
10
  function _export(target, all) {
@@ -16,6 +17,9 @@ _export(exports, {
16
17
  SEGMENT_PATH_KEY: function() {
17
18
  return SEGMENT_PATH_KEY;
18
19
  },
20
+ buildInversePrefetchSegmentDataRoute: function() {
21
+ return buildInversePrefetchSegmentDataRoute;
22
+ },
19
23
  buildPrefetchSegmentDataRoute: function() {
20
24
  return buildPrefetchSegmentDataRoute;
21
25
  }
@@ -33,16 +37,34 @@ const SEGMENT_PATH_KEY = 'nextSegmentPath';
33
37
  function buildPrefetchSegmentDataRoute(page, segmentPath) {
34
38
  const pagePath = (0, _normalizepagepath.normalizePagePath)(page);
35
39
  const destination = _path.default.posix.join(`${pagePath}${_constants.RSC_SEGMENTS_DIR_SUFFIX}`, `${segmentPath}${_constants.RSC_SEGMENT_SUFFIX}`);
36
- const { namedRegex } = (0, _routeregex.getNamedRouteRegex)(destination, {
40
+ const { namedRegex, routeKeys } = (0, _routeregex.getNamedRouteRegex)(destination, {
41
+ prefixRouteKeys: true,
42
+ includePrefix: true,
43
+ includeSuffix: true,
44
+ excludeOptionalTrailingSlash: true,
45
+ backreferenceDuplicateKeys: true
46
+ });
47
+ return {
48
+ destination,
49
+ source: namedRegex,
50
+ routeKeys
51
+ };
52
+ }
53
+ function buildInversePrefetchSegmentDataRoute(page, segmentPath) {
54
+ const pagePath = (0, _normalizepagepath.normalizePagePath)(page);
55
+ const source = _path.default.posix.join(`${pagePath}${_constants.RSC_SEGMENTS_DIR_SUFFIX}`, `${segmentPath}${_constants.RSC_SEGMENT_SUFFIX}`);
56
+ const { namedRegex, routeKeys } = (0, _routeregex.getNamedRouteRegex)(source, {
37
57
  prefixRouteKeys: true,
38
58
  includePrefix: true,
39
59
  includeSuffix: true,
40
60
  excludeOptionalTrailingSlash: true,
41
61
  backreferenceDuplicateKeys: true
42
62
  });
63
+ const destination = _path.default.posix.join(`${pagePath}${_constants.RSC_PREFETCH_SUFFIX}`);
43
64
  return {
65
+ source: namedRegex,
44
66
  destination,
45
- source: namedRegex
67
+ routeKeys
46
68
  };
47
69
  }
48
70
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/server/lib/router-utils/build-prefetch-segment-data-route.ts"],"sourcesContent":["import path from '../../../shared/lib/isomorphic/path'\nimport { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path'\nimport { getNamedRouteRegex } from '../../../shared/lib/router/utils/route-regex'\nimport {\n RSC_SEGMENT_SUFFIX,\n RSC_SEGMENTS_DIR_SUFFIX,\n} from '../../../lib/constants'\n\nexport const SEGMENT_PATH_KEY = 'nextSegmentPath'\n\nexport type PrefetchSegmentDataRoute = {\n source: string\n destination: string\n}\n\nexport function buildPrefetchSegmentDataRoute(\n page: string,\n segmentPath: string\n): PrefetchSegmentDataRoute {\n const pagePath = normalizePagePath(page)\n\n const destination = path.posix.join(\n `${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`,\n `${segmentPath}${RSC_SEGMENT_SUFFIX}`\n )\n\n const { namedRegex } = getNamedRouteRegex(destination, {\n prefixRouteKeys: true,\n includePrefix: true,\n includeSuffix: true,\n excludeOptionalTrailingSlash: true,\n backreferenceDuplicateKeys: true,\n })\n\n return {\n destination,\n source: namedRegex,\n }\n}\n"],"names":["SEGMENT_PATH_KEY","buildPrefetchSegmentDataRoute","page","segmentPath","pagePath","normalizePagePath","destination","path","posix","join","RSC_SEGMENTS_DIR_SUFFIX","RSC_SEGMENT_SUFFIX","namedRegex","getNamedRouteRegex","prefixRouteKeys","includePrefix","includeSuffix","excludeOptionalTrailingSlash","backreferenceDuplicateKeys","source"],"mappings":";;;;;;;;;;;;;;;IAQaA,gBAAgB;eAAhBA;;IAOGC,6BAA6B;eAA7BA;;;6DAfC;mCACiB;4BACC;2BAI5B;;;;;;AAEA,MAAMD,mBAAmB;AAOzB,SAASC,8BACdC,IAAY,EACZC,WAAmB;IAEnB,MAAMC,WAAWC,IAAAA,oCAAiB,EAACH;IAEnC,MAAMI,cAAcC,aAAI,CAACC,KAAK,CAACC,IAAI,CACjC,GAAGL,WAAWM,kCAAuB,EAAE,EACvC,GAAGP,cAAcQ,6BAAkB,EAAE;IAGvC,MAAM,EAAEC,UAAU,EAAE,GAAGC,IAAAA,8BAAkB,EAACP,aAAa;QACrDQ,iBAAiB;QACjBC,eAAe;QACfC,eAAe;QACfC,8BAA8B;QAC9BC,4BAA4B;IAC9B;IAEA,OAAO;QACLZ;QACAa,QAAQP;IACV;AACF","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../../src/server/lib/router-utils/build-prefetch-segment-data-route.ts"],"sourcesContent":["import path from '../../../shared/lib/isomorphic/path'\nimport { normalizePagePath } from '../../../shared/lib/page-path/normalize-page-path'\nimport { getNamedRouteRegex } from '../../../shared/lib/router/utils/route-regex'\nimport {\n RSC_PREFETCH_SUFFIX,\n RSC_SEGMENT_SUFFIX,\n RSC_SEGMENTS_DIR_SUFFIX,\n} from '../../../lib/constants'\n\nexport const SEGMENT_PATH_KEY = 'nextSegmentPath'\n\nexport type PrefetchSegmentDataRoute = {\n source: string\n destination: string\n routeKeys: { [key: string]: string }\n}\n\nexport function buildPrefetchSegmentDataRoute(\n page: string,\n segmentPath: string\n): PrefetchSegmentDataRoute {\n const pagePath = normalizePagePath(page)\n\n const destination = path.posix.join(\n `${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`,\n `${segmentPath}${RSC_SEGMENT_SUFFIX}`\n )\n\n const { namedRegex, routeKeys } = getNamedRouteRegex(destination, {\n prefixRouteKeys: true,\n includePrefix: true,\n includeSuffix: true,\n excludeOptionalTrailingSlash: true,\n backreferenceDuplicateKeys: true,\n })\n\n return {\n destination,\n source: namedRegex,\n routeKeys,\n }\n}\n\n/**\n * Builds a prefetch segment data route that is inverted. This means that it's\n * supposed to rewrite from the previous segment paths route back to the\n * prefetch RSC route.\n *\n * @param page - The page to build the route for.\n * @param segmentPath - The segment path to build the route for.\n * @returns The prefetch segment data route.\n */\nexport function buildInversePrefetchSegmentDataRoute(\n page: string,\n segmentPath: string\n): PrefetchSegmentDataRoute {\n const pagePath = normalizePagePath(page)\n\n const source = path.posix.join(\n `${pagePath}${RSC_SEGMENTS_DIR_SUFFIX}`,\n `${segmentPath}${RSC_SEGMENT_SUFFIX}`\n )\n\n const { namedRegex, routeKeys } = getNamedRouteRegex(source, {\n prefixRouteKeys: true,\n includePrefix: true,\n includeSuffix: true,\n excludeOptionalTrailingSlash: true,\n backreferenceDuplicateKeys: true,\n })\n\n const destination = path.posix.join(`${pagePath}${RSC_PREFETCH_SUFFIX}`)\n\n return {\n source: namedRegex,\n destination,\n routeKeys,\n }\n}\n"],"names":["SEGMENT_PATH_KEY","buildInversePrefetchSegmentDataRoute","buildPrefetchSegmentDataRoute","page","segmentPath","pagePath","normalizePagePath","destination","path","posix","join","RSC_SEGMENTS_DIR_SUFFIX","RSC_SEGMENT_SUFFIX","namedRegex","routeKeys","getNamedRouteRegex","prefixRouteKeys","includePrefix","includeSuffix","excludeOptionalTrailingSlash","backreferenceDuplicateKeys","source","RSC_PREFETCH_SUFFIX"],"mappings":";;;;;;;;;;;;;;;;IASaA,gBAAgB;eAAhBA;;IA2CGC,oCAAoC;eAApCA;;IAnCAC,6BAA6B;eAA7BA;;;6DAjBC;mCACiB;4BACC;2BAK5B;;;;;;AAEA,MAAMF,mBAAmB;AAQzB,SAASE,8BACdC,IAAY,EACZC,WAAmB;IAEnB,MAAMC,WAAWC,IAAAA,oCAAiB,EAACH;IAEnC,MAAMI,cAAcC,aAAI,CAACC,KAAK,CAACC,IAAI,CACjC,GAAGL,WAAWM,kCAAuB,EAAE,EACvC,GAAGP,cAAcQ,6BAAkB,EAAE;IAGvC,MAAM,EAAEC,UAAU,EAAEC,SAAS,EAAE,GAAGC,IAAAA,8BAAkB,EAACR,aAAa;QAChES,iBAAiB;QACjBC,eAAe;QACfC,eAAe;QACfC,8BAA8B;QAC9BC,4BAA4B;IAC9B;IAEA,OAAO;QACLb;QACAc,QAAQR;QACRC;IACF;AACF;AAWO,SAASb,qCACdE,IAAY,EACZC,WAAmB;IAEnB,MAAMC,WAAWC,IAAAA,oCAAiB,EAACH;IAEnC,MAAMkB,SAASb,aAAI,CAACC,KAAK,CAACC,IAAI,CAC5B,GAAGL,WAAWM,kCAAuB,EAAE,EACvC,GAAGP,cAAcQ,6BAAkB,EAAE;IAGvC,MAAM,EAAEC,UAAU,EAAEC,SAAS,EAAE,GAAGC,IAAAA,8BAAkB,EAACM,QAAQ;QAC3DL,iBAAiB;QACjBC,eAAe;QACfC,eAAe;QACfC,8BAA8B;QAC9BC,4BAA4B;IAC9B;IAEA,MAAMb,cAAcC,aAAI,CAACC,KAAK,CAACC,IAAI,CAAC,GAAGL,WAAWiB,8BAAmB,EAAE;IAEvE,OAAO;QACLD,QAAQR;QACRN;QACAO;IACF;AACF","ignoreList":[0]}
@@ -110,7 +110,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
110
110
  async function startServer(serverOptions) {
111
111
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
112
112
  let { port } = serverOptions;
113
- process.title = `next-server (v${"15.4.0-canary.0"})`;
113
+ process.title = `next-server (v${"15.4.0-canary.2"})`;
114
114
  let handlersReady = ()=>{};
115
115
  let handlersError = ()=>{};
116
116
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -22,7 +22,7 @@ _export(exports, {
22
22
  });
23
23
  function isStableBuild() {
24
24
  var _process_env___NEXT_VERSION;
25
- return !((_process_env___NEXT_VERSION = "15.4.0-canary.0") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
25
+ return !((_process_env___NEXT_VERSION = "15.4.0-canary.2") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
26
26
  }
27
27
  class CanaryOnlyError extends Error {
28
28
  constructor(arg){
@@ -81,7 +81,7 @@ function getAnonymousMeta() {
81
81
  isWsl: _iswsl.default,
82
82
  isCI: _ciinfo.isCI,
83
83
  ciName: _ciinfo.isCI && _ciinfo.name || null,
84
- nextVersion: "15.4.0-canary.0"
84
+ nextVersion: "15.4.0-canary.2"
85
85
  };
86
86
  return traits;
87
87
  }
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
11
11
  const EVENT_VERSION = 'NEXT_CLI_SESSION_STOPPED';
12
12
  function eventCliSessionStopped(event) {
13
13
  // This should be an invariant, if it fails our build tooling is broken.
14
- if (typeof "15.4.0-canary.0" !== 'string') {
14
+ if (typeof "15.4.0-canary.2" !== 'string') {
15
15
  return [];
16
16
  }
17
17
  const payload = {
18
- nextVersion: "15.4.0-canary.0",
18
+ nextVersion: "15.4.0-canary.2",
19
19
  nodeVersion: process.version,
20
20
  cliCommand: event.cliCommand,
21
21
  durationMilliseconds: event.durationMilliseconds,
@@ -36,12 +36,12 @@ function hasBabelConfig(dir) {
36
36
  function eventCliSession(dir, nextConfig, event) {
37
37
  var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1;
38
38
  // This should be an invariant, if it fails our build tooling is broken.
39
- if (typeof "15.4.0-canary.0" !== 'string') {
39
+ if (typeof "15.4.0-canary.2" !== 'string') {
40
40
  return [];
41
41
  }
42
42
  const { images, i18n } = nextConfig || {};
43
43
  const payload = {
44
- nextVersion: "15.4.0-canary.0",
44
+ nextVersion: "15.4.0-canary.2",
45
45
  nodeVersion: process.version,
46
46
  cliCommand: event.cliCommand,
47
47
  isSrcDir: event.isSrcDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next",
3
- "version": "15.4.0-canary.0",
3
+ "version": "15.4.0-canary.2",
4
4
  "description": "The React Framework",
5
5
  "main": "./dist/server/next.js",
6
6
  "license": "MIT",
@@ -100,7 +100,7 @@
100
100
  ]
101
101
  },
102
102
  "dependencies": {
103
- "@next/env": "15.4.0-canary.0",
103
+ "@next/env": "15.4.0-canary.2",
104
104
  "@swc/counter": "0.1.3",
105
105
  "@swc/helpers": "0.5.15",
106
106
  "busboy": "1.6.0",
@@ -132,14 +132,14 @@
132
132
  },
133
133
  "optionalDependencies": {
134
134
  "sharp": "^0.34.1",
135
- "@next/swc-darwin-arm64": "15.4.0-canary.0",
136
- "@next/swc-darwin-x64": "15.4.0-canary.0",
137
- "@next/swc-linux-arm64-gnu": "15.4.0-canary.0",
138
- "@next/swc-linux-arm64-musl": "15.4.0-canary.0",
139
- "@next/swc-linux-x64-gnu": "15.4.0-canary.0",
140
- "@next/swc-linux-x64-musl": "15.4.0-canary.0",
141
- "@next/swc-win32-arm64-msvc": "15.4.0-canary.0",
142
- "@next/swc-win32-x64-msvc": "15.4.0-canary.0"
135
+ "@next/swc-darwin-arm64": "15.4.0-canary.2",
136
+ "@next/swc-darwin-x64": "15.4.0-canary.2",
137
+ "@next/swc-linux-arm64-gnu": "15.4.0-canary.2",
138
+ "@next/swc-linux-arm64-musl": "15.4.0-canary.2",
139
+ "@next/swc-linux-x64-gnu": "15.4.0-canary.2",
140
+ "@next/swc-linux-x64-musl": "15.4.0-canary.2",
141
+ "@next/swc-win32-arm64-msvc": "15.4.0-canary.2",
142
+ "@next/swc-win32-x64-msvc": "15.4.0-canary.2"
143
143
  },
144
144
  "devDependencies": {
145
145
  "@ampproject/toolbox-optimizer": "2.8.3",
@@ -172,11 +172,11 @@
172
172
  "@jest/types": "29.5.0",
173
173
  "@mswjs/interceptors": "0.23.0",
174
174
  "@napi-rs/triples": "1.2.0",
175
- "@next/font": "15.4.0-canary.0",
176
- "@next/polyfill-module": "15.4.0-canary.0",
177
- "@next/polyfill-nomodule": "15.4.0-canary.0",
178
- "@next/react-refresh-utils": "15.4.0-canary.0",
179
- "@next/swc": "15.4.0-canary.0",
175
+ "@next/font": "15.4.0-canary.2",
176
+ "@next/polyfill-module": "15.4.0-canary.2",
177
+ "@next/polyfill-nomodule": "15.4.0-canary.2",
178
+ "@next/react-refresh-utils": "15.4.0-canary.2",
179
+ "@next/swc": "15.4.0-canary.2",
180
180
  "@opentelemetry/api": "1.6.0",
181
181
  "@playwright/test": "1.41.2",
182
182
  "@storybook/addon-a11y": "8.6.0",