next 15.6.0-canary.55 → 15.6.0-canary.57

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 (45) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +3 -3
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/webpack-config.js +2 -2
  5. package/dist/client/app-bootstrap.js +1 -1
  6. package/dist/client/index.js +1 -1
  7. package/dist/compiled/next-server/server.runtime.prod.js +1 -1
  8. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  9. package/dist/esm/build/index.js +3 -3
  10. package/dist/esm/build/swc/index.js +1 -1
  11. package/dist/esm/build/webpack-config.js +2 -2
  12. package/dist/esm/client/app-bootstrap.js +1 -1
  13. package/dist/esm/client/index.js +1 -1
  14. package/dist/esm/server/body-streams.js +4 -7
  15. package/dist/esm/server/body-streams.js.map +1 -1
  16. package/dist/esm/server/config-schema.js +1 -0
  17. package/dist/esm/server/config-schema.js.map +1 -1
  18. package/dist/esm/server/config-shared.js +2 -1
  19. package/dist/esm/server/config-shared.js.map +1 -1
  20. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  21. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  22. package/dist/esm/server/lib/app-info-log.js +1 -1
  23. package/dist/esm/server/lib/incremental-cache/tags-manifest.external.js +10 -6
  24. package/dist/esm/server/lib/incremental-cache/tags-manifest.external.js.map +1 -1
  25. package/dist/esm/server/lib/start-server.js +1 -1
  26. package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
  27. package/dist/server/body-streams.js +4 -7
  28. package/dist/server/body-streams.js.map +1 -1
  29. package/dist/server/config-schema.d.ts +1 -0
  30. package/dist/server/config-schema.js +1 -0
  31. package/dist/server/config-schema.js.map +1 -1
  32. package/dist/server/config-shared.d.ts +1 -0
  33. package/dist/server/config-shared.js +2 -1
  34. package/dist/server/config-shared.js.map +1 -1
  35. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  36. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  37. package/dist/server/lib/app-info-log.js +1 -1
  38. package/dist/server/lib/incremental-cache/tags-manifest.external.js +10 -6
  39. package/dist/server/lib/incremental-cache/tags-manifest.external.js.map +1 -1
  40. package/dist/server/lib/start-server.js +1 -1
  41. package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  42. package/dist/telemetry/anonymous-meta.js +1 -1
  43. package/dist/telemetry/events/session-stopped.js +2 -2
  44. package/dist/telemetry/events/version.js +2 -2
  45. package/package.json +15 -15
@@ -28,8 +28,13 @@ const tagsManifest = new Map();
28
28
  const areTagsExpired = (tags, timestamp)=>{
29
29
  for (const tag of tags){
30
30
  const entry = tagsManifest.get(tag);
31
- if (entry) {
32
- if (entry.expired && entry.expired >= timestamp) {
31
+ const expiredAt = entry == null ? void 0 : entry.expired;
32
+ if (typeof expiredAt === 'number') {
33
+ const now = Date.now();
34
+ // For immediate expiration (expiredAt <= now) and tag was invalidated after entry was created
35
+ // OR for future expiration that has now passed (expiredAt > timestamp && expiredAt <= now)
36
+ const isImmediatelyExpired = expiredAt <= now && expiredAt > timestamp;
37
+ if (isImmediatelyExpired) {
33
38
  return true;
34
39
  }
35
40
  }
@@ -39,10 +44,9 @@ const areTagsExpired = (tags, timestamp)=>{
39
44
  const areTagsStale = (tags, timestamp)=>{
40
45
  for (const tag of tags){
41
46
  const entry = tagsManifest.get(tag);
42
- if (entry) {
43
- if (entry.stale && entry.stale >= timestamp) {
44
- return true;
45
- }
47
+ const staleAt = (entry == null ? void 0 : entry.stale) ?? 0;
48
+ if (typeof staleAt === 'number' && staleAt > timestamp) {
49
+ return true;
46
50
  }
47
51
  }
48
52
  return false;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\nexport interface TagManifestEntry {\n stale?: number\n expired?: number\n}\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map<string, TagManifestEntry>()\n\nexport const areTagsExpired = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const entry = tagsManifest.get(tag)\n\n if (entry) {\n if (entry.expired && entry.expired >= timestamp) {\n return true\n }\n }\n }\n\n return false\n}\n\nexport const areTagsStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const entry = tagsManifest.get(tag)\n\n if (entry) {\n if (entry.stale && entry.stale >= timestamp) {\n return true\n }\n }\n }\n\n return false\n}\n"],"names":["areTagsExpired","areTagsStale","tagsManifest","Map","tags","timestamp","tag","entry","get","expired","stale"],"mappings":";;;;;;;;;;;;;;;;IAWaA,cAAc;eAAdA;;IAcAC,YAAY;eAAZA;;IAhBAC,YAAY;eAAZA;;;AAAN,MAAMA,eAAe,IAAIC;AAEzB,MAAMH,iBAAiB,CAACI,MAAgBC;IAC7C,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,QAAQL,aAAaM,GAAG,CAACF;QAE/B,IAAIC,OAAO;YACT,IAAIA,MAAME,OAAO,IAAIF,MAAME,OAAO,IAAIJ,WAAW;gBAC/C,OAAO;YACT;QACF;IACF;IAEA,OAAO;AACT;AAEO,MAAMJ,eAAe,CAACG,MAAgBC;IAC3C,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,QAAQL,aAAaM,GAAG,CAACF;QAE/B,IAAIC,OAAO;YACT,IAAIA,MAAMG,KAAK,IAAIH,MAAMG,KAAK,IAAIL,WAAW;gBAC3C,OAAO;YACT;QACF;IACF;IAEA,OAAO;AACT","ignoreList":[0]}
1
+ {"version":3,"sources":["../../../../src/server/lib/incremental-cache/tags-manifest.external.ts"],"sourcesContent":["import type { Timestamp } from '../cache-handlers/types'\n\nexport interface TagManifestEntry {\n stale?: number\n expired?: number\n}\n\n// We share the tags manifest between the \"use cache\" handlers and the previous\n// file-system cache.\nexport const tagsManifest = new Map<string, TagManifestEntry>()\n\nexport const areTagsExpired = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const entry = tagsManifest.get(tag)\n const expiredAt = entry?.expired\n\n if (typeof expiredAt === 'number') {\n const now = Date.now()\n // For immediate expiration (expiredAt <= now) and tag was invalidated after entry was created\n // OR for future expiration that has now passed (expiredAt > timestamp && expiredAt <= now)\n const isImmediatelyExpired = expiredAt <= now && expiredAt > timestamp\n\n if (isImmediatelyExpired) {\n return true\n }\n }\n }\n\n return false\n}\n\nexport const areTagsStale = (tags: string[], timestamp: Timestamp) => {\n for (const tag of tags) {\n const entry = tagsManifest.get(tag)\n const staleAt = entry?.stale ?? 0\n\n if (typeof staleAt === 'number' && staleAt > timestamp) {\n return true\n }\n }\n\n return false\n}\n"],"names":["areTagsExpired","areTagsStale","tagsManifest","Map","tags","timestamp","tag","entry","get","expiredAt","expired","now","Date","isImmediatelyExpired","staleAt","stale"],"mappings":";;;;;;;;;;;;;;;;IAWaA,cAAc;eAAdA;;IAoBAC,YAAY;eAAZA;;IAtBAC,YAAY;eAAZA;;;AAAN,MAAMA,eAAe,IAAIC;AAEzB,MAAMH,iBAAiB,CAACI,MAAgBC;IAC7C,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,QAAQL,aAAaM,GAAG,CAACF;QAC/B,MAAMG,YAAYF,yBAAAA,MAAOG,OAAO;QAEhC,IAAI,OAAOD,cAAc,UAAU;YACjC,MAAME,MAAMC,KAAKD,GAAG;YACpB,8FAA8F;YAC9F,2FAA2F;YAC3F,MAAME,uBAAuBJ,aAAaE,OAAOF,YAAYJ;YAE7D,IAAIQ,sBAAsB;gBACxB,OAAO;YACT;QACF;IACF;IAEA,OAAO;AACT;AAEO,MAAMZ,eAAe,CAACG,MAAgBC;IAC3C,KAAK,MAAMC,OAAOF,KAAM;QACtB,MAAMG,QAAQL,aAAaM,GAAG,CAACF;QAC/B,MAAMQ,UAAUP,CAAAA,yBAAAA,MAAOQ,KAAK,KAAI;QAEhC,IAAI,OAAOD,YAAY,YAAYA,UAAUT,WAAW;YACtD,OAAO;QACT;IACF;IAEA,OAAO;AACT","ignoreList":[0]}
@@ -179,7 +179,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
179
179
  async function startServer(serverOptions) {
180
180
  const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
181
181
  let { port } = serverOptions;
182
- process.title = `next-server (v${"15.6.0-canary.55"})`;
182
+ process.title = `next-server (v${"15.6.0-canary.57"})`;
183
183
  let handlersReady = ()=>{};
184
184
  let handlersError = ()=>{};
185
185
  let handlersPromise = new Promise((resolve, reject)=>{
@@ -21,7 +21,7 @@ _export(exports, {
21
21
  }
22
22
  });
23
23
  function isStableBuild() {
24
- return !"15.6.0-canary.55"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
24
+ return !"15.6.0-canary.57"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
25
25
  }
26
26
  class CanaryOnlyConfigError extends Error {
27
27
  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.6.0-canary.55"
84
+ nextVersion: "15.6.0-canary.57"
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.6.0-canary.55" !== 'string') {
14
+ if (typeof "15.6.0-canary.57" !== 'string') {
15
15
  return [];
16
16
  }
17
17
  const payload = {
18
- nextVersion: "15.6.0-canary.55",
18
+ nextVersion: "15.6.0-canary.57",
19
19
  nodeVersion: process.version,
20
20
  cliCommand: event.cliCommand,
21
21
  durationMilliseconds: event.durationMilliseconds,
@@ -12,12 +12,12 @@ const EVENT_VERSION = 'NEXT_CLI_SESSION_STARTED';
12
12
  function eventCliSession(nextConfig, event) {
13
13
  var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_reactCompiler, _nextConfig_reactCompiler1;
14
14
  // This should be an invariant, if it fails our build tooling is broken.
15
- if (typeof "15.6.0-canary.55" !== 'string') {
15
+ if (typeof "15.6.0-canary.57" !== 'string') {
16
16
  return [];
17
17
  }
18
18
  const { images, i18n } = nextConfig || {};
19
19
  const payload = {
20
- nextVersion: "15.6.0-canary.55",
20
+ nextVersion: "15.6.0-canary.57",
21
21
  nodeVersion: process.version,
22
22
  cliCommand: event.cliCommand,
23
23
  isSrcDir: event.isSrcDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next",
3
- "version": "15.6.0-canary.55",
3
+ "version": "15.6.0-canary.57",
4
4
  "description": "The React Framework",
5
5
  "main": "./dist/server/next.js",
6
6
  "license": "MIT",
@@ -98,7 +98,7 @@
98
98
  ]
99
99
  },
100
100
  "dependencies": {
101
- "@next/env": "15.6.0-canary.55",
101
+ "@next/env": "15.6.0-canary.57",
102
102
  "@swc/helpers": "0.5.15",
103
103
  "caniuse-lite": "^1.0.30001579",
104
104
  "postcss": "8.4.31",
@@ -128,14 +128,14 @@
128
128
  },
129
129
  "optionalDependencies": {
130
130
  "sharp": "^0.34.4",
131
- "@next/swc-darwin-arm64": "15.6.0-canary.55",
132
- "@next/swc-darwin-x64": "15.6.0-canary.55",
133
- "@next/swc-linux-arm64-gnu": "15.6.0-canary.55",
134
- "@next/swc-linux-arm64-musl": "15.6.0-canary.55",
135
- "@next/swc-linux-x64-gnu": "15.6.0-canary.55",
136
- "@next/swc-linux-x64-musl": "15.6.0-canary.55",
137
- "@next/swc-win32-arm64-msvc": "15.6.0-canary.55",
138
- "@next/swc-win32-x64-msvc": "15.6.0-canary.55"
131
+ "@next/swc-darwin-arm64": "15.6.0-canary.57",
132
+ "@next/swc-darwin-x64": "15.6.0-canary.57",
133
+ "@next/swc-linux-arm64-gnu": "15.6.0-canary.57",
134
+ "@next/swc-linux-arm64-musl": "15.6.0-canary.57",
135
+ "@next/swc-linux-x64-gnu": "15.6.0-canary.57",
136
+ "@next/swc-linux-x64-musl": "15.6.0-canary.57",
137
+ "@next/swc-win32-arm64-msvc": "15.6.0-canary.57",
138
+ "@next/swc-win32-x64-msvc": "15.6.0-canary.57"
139
139
  },
140
140
  "devDependencies": {
141
141
  "@babel/code-frame": "7.26.2",
@@ -170,11 +170,11 @@
170
170
  "@modelcontextprotocol/sdk": "1.18.1",
171
171
  "@mswjs/interceptors": "0.23.0",
172
172
  "@napi-rs/triples": "1.2.0",
173
- "@next/font": "15.6.0-canary.55",
174
- "@next/polyfill-module": "15.6.0-canary.55",
175
- "@next/polyfill-nomodule": "15.6.0-canary.55",
176
- "@next/react-refresh-utils": "15.6.0-canary.55",
177
- "@next/swc": "15.6.0-canary.55",
173
+ "@next/font": "15.6.0-canary.57",
174
+ "@next/polyfill-module": "15.6.0-canary.57",
175
+ "@next/polyfill-nomodule": "15.6.0-canary.57",
176
+ "@next/react-refresh-utils": "15.6.0-canary.57",
177
+ "@next/swc": "15.6.0-canary.57",
178
178
  "@opentelemetry/api": "1.6.0",
179
179
  "@playwright/test": "1.51.1",
180
180
  "@rspack/core": "1.5.0",