@vercel/next 28.0.0 → 28.0.1-snapshot-c4002eb2617b

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.
@@ -25,9 +25,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  mod
26
26
  ));
27
27
 
28
- // ../../node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs
28
+ // ../../node_modules/.pnpm/@swc+helpers@0.5.23/node_modules/@swc/helpers/cjs/_interop_require_default.cjs
29
29
  var require_interop_require_default = __commonJS({
30
- "../../node_modules/.pnpm/@swc+helpers@0.5.15/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
30
+ "../../node_modules/.pnpm/@swc+helpers@0.5.23/node_modules/@swc/helpers/cjs/_interop_require_default.cjs"(exports2) {
31
31
  "use strict";
32
32
  function _interop_require_default(obj) {
33
33
  return obj && obj.__esModule ? obj : { default: obj };
@@ -36,9 +36,9 @@ var require_interop_require_default = __commonJS({
36
36
  }
37
37
  });
38
38
 
39
- // ../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js
39
+ // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js
40
40
  var require_modern_browserslist_target = __commonJS({
41
- "../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js"(exports2, module2) {
41
+ "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js"(exports2, module2) {
42
42
  "use strict";
43
43
  var MODERN_BROWSERSLIST_TARGET = [
44
44
  "chrome 111",
@@ -50,9 +50,9 @@ var require_modern_browserslist_target = __commonJS({
50
50
  }
51
51
  });
52
52
 
53
- // ../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js
53
+ // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js
54
54
  var require_entry_constants = __commonJS({
55
- "../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js"(exports2) {
55
+ "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js"(exports2) {
56
56
  "use strict";
57
57
  Object.defineProperty(exports2, "__esModule", {
58
58
  value: true
@@ -84,9 +84,9 @@ var require_entry_constants = __commonJS({
84
84
  }
85
85
  });
86
86
 
87
- // ../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js
87
+ // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js
88
88
  var require_constants = __commonJS({
89
- "../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js"(exports2, module2) {
89
+ "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js"(exports2, module2) {
90
90
  "use strict";
91
91
  Object.defineProperty(exports2, "__esModule", {
92
92
  value: true
@@ -245,6 +245,9 @@ var require_constants = __commonJS({
245
245
  PRERENDER_MANIFEST: function() {
246
246
  return PRERENDER_MANIFEST;
247
247
  },
248
+ PREVIEW_PROPS_MANIFEST: function() {
249
+ return PREVIEW_PROPS_MANIFEST;
250
+ },
248
251
  REACT_LOADABLE_MANIFEST: function() {
249
252
  return REACT_LOADABLE_MANIFEST;
250
253
  },
@@ -350,6 +353,7 @@ var require_constants = __commonJS({
350
353
  var EXPORT_DETAIL = "export-detail.json";
351
354
  var PRERENDER_MANIFEST = "prerender-manifest.json";
352
355
  var PREFETCH_HINTS = "prefetch-hints.json";
356
+ var PREVIEW_PROPS_MANIFEST = "preview-props.json";
353
357
  var ROUTES_MANIFEST = "routes-manifest.json";
354
358
  var IMAGES_MANIFEST = "images-manifest.json";
355
359
  var SERVER_FILES_MANIFEST = "required-server-files";
@@ -451,9 +455,9 @@ var require_constants = __commonJS({
451
455
  }
452
456
  });
453
457
 
454
- // ../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js
458
+ // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js
455
459
  var require_constants2 = __commonJS({
456
- "../../node_modules/.pnpm/next@16.3.0-canary.96_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js"(exports2, module2) {
460
+ "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js"(exports2, module2) {
457
461
  module2.exports = require_constants();
458
462
  }
459
463
  });
@@ -9866,6 +9870,23 @@ async function handleNodeOutputs(nodeOutputs, {
9866
9870
  );
9867
9871
  }
9868
9872
  const usesSrcDir = await usesSrcDirectory(projectDir);
9873
+ const handlerSource = (0, import_node_handler.getHandlerSource)({
9874
+ projectRelativeDistDir: import_node_path.default.posix.relative(projectDir, distDir),
9875
+ prerenderFallbackFalseMap,
9876
+ isMiddleware,
9877
+ nextConfig: config,
9878
+ nextEnvLoaderPathRelativeToProjectDir
9879
+ });
9880
+ const handlerSourceHash = sha256(handlerSource);
9881
+ const relativeToRepoRootCache = /* @__PURE__ */ new Map();
9882
+ const relativeToRepoRoot = (fsPath) => {
9883
+ let relPath = relativeToRepoRootCache.get(fsPath);
9884
+ if (relPath === void 0) {
9885
+ relPath = import_node_path.default.posix.relative(repoRoot, fsPath);
9886
+ relativeToRepoRootCache.set(fsPath, relPath);
9887
+ }
9888
+ return relPath;
9889
+ };
9869
9890
  await Promise.all(
9870
9891
  nodeOutputs.map(async (output) => {
9871
9892
  await fsSema.acquire();
@@ -9877,7 +9898,7 @@ async function handleNodeOutputs(nodeOutputs, {
9877
9898
  const files = {};
9878
9899
  const filesHashes = output.assetsHashes;
9879
9900
  for (const [relPath, fsPath] of Object.entries(output.assets)) {
9880
- files[relPath] = import_node_path.default.posix.relative(repoRoot, fsPath);
9901
+ files[relPath] = relativeToRepoRoot(fsPath);
9881
9902
  }
9882
9903
  files[import_node_path.default.posix.relative(repoRoot, output.filePath)] = import_node_path.default.posix.relative(repoRoot, output.filePath);
9883
9904
  if (hasProjectEnvFiles) {
@@ -9892,7 +9913,7 @@ async function handleNodeOutputs(nodeOutputs, {
9892
9913
  for (const [relPath, fsPath] of Object.entries(
9893
9914
  notFoundOutput.assets
9894
9915
  )) {
9895
- files[relPath] = import_node_path.default.posix.relative(repoRoot, fsPath);
9916
+ files[relPath] = relativeToRepoRoot(fsPath);
9896
9917
  if (filesHashes) {
9897
9918
  filesHashes[relPath] = notFoundOutput.assetsHashes?.[relPath];
9898
9919
  }
@@ -9913,16 +9934,9 @@ async function handleNodeOutputs(nodeOutputs, {
9913
9934
  "___next_launcher.cjs"
9914
9935
  );
9915
9936
  await import_promises.default.mkdir(import_node_path.default.dirname(handlerFilePath), { recursive: true });
9916
- const handlerSource = (0, import_node_handler.getHandlerSource)({
9917
- projectRelativeDistDir: import_node_path.default.posix.relative(projectDir, distDir),
9918
- prerenderFallbackFalseMap,
9919
- isMiddleware,
9920
- nextConfig: config,
9921
- nextEnvLoaderPathRelativeToProjectDir
9922
- });
9923
9937
  await writeIfNotExists(handlerFilePath, handlerSource);
9924
9938
  if (filesHashes) {
9925
- filesHashes["___next_launcher.cjs"] = sha256(handlerSource);
9939
+ filesHashes["___next_launcher.cjs"] = handlerSourceHash;
9926
9940
  }
9927
9941
  const operationType = output.type === import_constants.AdapterOutputType.APP_PAGE || output.type === import_constants.AdapterOutputType.PAGES ? "PAGE" : "API";
9928
9942
  const sourceFile = await getSourceFilePathFromPage({
@@ -10625,20 +10639,28 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
10625
10639
 
10626
10640
  // src/toolbar.ts
10627
10641
  function generateToolbarScript(isProduction, optIn, deploymentIdExpr) {
10628
- let cookieCheck = "true";
10642
+ let enabledAssignment = "";
10629
10643
  let applyOptInAttr = "";
10630
10644
  if (isProduction) {
10631
- cookieCheck = "/(?:^|;\\s)__vercel_toolbar=1(?:;|$)/.test(document.cookie)";
10645
+ enabledAssignment = `
10646
+ try {
10647
+ enabled = /(?:^|;\\s)__vercel_toolbar=1(?:;|$)/.test(document.cookie);
10648
+ } catch (e) {
10649
+ enabled = false;
10650
+ }`;
10632
10651
  applyOptInAttr = 's.setAttribute("data-explicit-opt-in","true");s.setAttribute("data-cookie-opt-in","true");';
10633
10652
  } else if (optIn) {
10634
10653
  applyOptInAttr = 's.setAttribute("data-explicit-opt-in","true");';
10635
10654
  }
10636
- applyOptInAttr += `s.setAttribute("data-deployment-id",${deploymentIdExpr});`;
10637
10655
  return `
10638
- if(${cookieCheck}){
10656
+ let enabled = true;
10657
+ ${enabledAssignment}
10658
+
10659
+ if(enabled){
10639
10660
  var s=document.createElement('script');
10640
10661
  s.src='https://vercel.live/_next-live/feedback/feedback.js';
10641
10662
  ${applyOptInAttr}
10663
+ s.setAttribute("data-deployment-id",${deploymentIdExpr});
10642
10664
  ((document.head||document.documentElement).appendChild(s))
10643
10665
  }`;
10644
10666
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "28.0.0",
3
+ "version": "28.0.1-snapshot-c4002eb2617b",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -16,10 +16,10 @@
16
16
  "@vercel/nft": "1.10.0"
17
17
  },
18
18
  "peerDependencies": {
19
- "@vercel/build-utils": "15.2.0"
19
+ "@vercel/build-utils": "15.2.1-snapshot-c4002eb2617b"
20
20
  },
21
21
  "devDependencies": {
22
- "@next-community/adapter-vercel": "0.0.1-beta.34",
22
+ "@next-community/adapter-vercel": "0.0.1-beta.35",
23
23
  "@types/aws-lambda": "8.10.19",
24
24
  "@types/buffer-crc32": "0.2.0",
25
25
  "@types/bytes": "3.1.1",
@@ -59,7 +59,7 @@
59
59
  "vite": "6.4.3",
60
60
  "vitest": "4.1.10",
61
61
  "webpack-sources": "3.2.3",
62
- "@vercel/build-utils": "15.2.0",
62
+ "@vercel/build-utils": "15.2.1-snapshot-c4002eb2617b",
63
63
  "@vercel/routing-utils": "6.6.1"
64
64
  },
65
65
  "scripts": {