@vercel/next 2.8.66 → 2.8.67-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.
@@ -450,7 +450,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
450
450
  currentRouteSrc = starterRouteSrc;
451
451
  }
452
452
  // add to existing route src if src length limit isn't reached
453
- currentRouteSrc = `${currentRouteSrc.substr(0, currentRouteSrc.length - 1)}${currentRouteSrc[currentRouteSrc.length - 2] === '(' ? '' : '|'}${route})`;
453
+ currentRouteSrc = `${currentRouteSrc.substring(0, currentRouteSrc.length - 1)}${currentRouteSrc[currentRouteSrc.length - 2] === '(' ? '' : '|'}${route})`;
454
454
  if (isLastRoute) {
455
455
  pushRoute(currentRouteSrc);
456
456
  }
@@ -458,7 +458,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
458
458
  }
459
459
  }
460
460
  return {
461
- middleware: middleware.middleware,
462
461
  wildcard: wildcardConfig,
463
462
  images: ((_d = imagesManifest === null || imagesManifest === void 0 ? void 0 : imagesManifest.images) === null || _d === void 0 ? void 0 : _d.loader) === 'default'
464
463
  ? {
@@ -786,8 +785,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
786
785
  },
787
786
  ]),
788
787
  ],
789
- watch: [],
790
- childProcesses: [],
791
788
  };
792
789
  }
793
790
  exports.serverBuild = serverBuild;
package/dist/utils.js CHANGED
@@ -306,7 +306,7 @@ function localizeDynamicRoutes(dynamicRoutes, dynamicPrefix, entryDirectory, sta
306
306
  const isFallback = prerenderManifest.fallbackRoutes[pathname];
307
307
  const isBlocking = prerenderManifest.blockingFallbackRoutes[pathname];
308
308
  const isApiRoute = pathnameNoPrefix === '/api' || (pathnameNoPrefix === null || pathnameNoPrefix === void 0 ? void 0 : pathnameNoPrefix.startsWith('/api/'));
309
- const isAutoExport = staticPages[addLocaleOrDefault(pathname, routesManifest).substr(1)];
309
+ const isAutoExport = staticPages[addLocaleOrDefault(pathname, routesManifest).substring(1)];
310
310
  const isLocalePrefixed = isFallback || isBlocking || isAutoExport || isServerMode;
311
311
  route.src = route.src.replace('^', `^${dynamicPrefix ? `${dynamicPrefix}[/]?` : '[/]?'}(?${isLocalePrefixed ? '<nextLocale>' : ':'}${i18n.locales.map(locale => (0, escape_string_regexp_1.default)(locale)).join('|')})?`);
312
312
  if (isLocalePrefixed && !(isCorrectLocaleAPIRoutes && isApiRoute)) {
@@ -1403,7 +1403,6 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
1403
1403
  staticRoutes: [],
1404
1404
  dynamicRouteMap: new Map(),
1405
1405
  edgeFunctions: {},
1406
- middleware: [],
1407
1406
  };
1408
1407
  for (const worker of workerConfigs.values()) {
1409
1408
  const edgeFile = worker.edgeFunction.name;
@@ -1411,6 +1410,7 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
1411
1410
  source.edgeFunctions[edgeFile] = worker.edgeFunction;
1412
1411
  const route = {
1413
1412
  continue: true,
1413
+ override: true,
1414
1414
  middlewarePath: edgeFile,
1415
1415
  src: worker.routeSrc,
1416
1416
  };
@@ -1427,7 +1427,6 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
1427
1427
  staticRoutes: [],
1428
1428
  dynamicRouteMap: new Map(),
1429
1429
  edgeFunctions: {},
1430
- middleware: [],
1431
1430
  };
1432
1431
  }
1433
1432
  exports.getMiddlewareBundle = getMiddlewareBundle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "2.8.66",
3
+ "version": "2.8.67-canary.2",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -45,8 +45,8 @@
45
45
  "@types/semver": "6.0.0",
46
46
  "@types/text-table": "0.2.1",
47
47
  "@types/webpack-sources": "3.2.0",
48
- "@vercel/build-utils": "3.1.0",
49
- "@vercel/nft": "0.19.0",
48
+ "@vercel/build-utils": "3.1.1-canary.2",
49
+ "@vercel/nft": "0.19.1",
50
50
  "@vercel/routing-utils": "1.13.3",
51
51
  "async-sema": "3.0.1",
52
52
  "buffer-crc32": "0.2.13",
@@ -70,5 +70,5 @@
70
70
  "typescript": "4.5.2",
71
71
  "webpack-sources": "3.2.3"
72
72
  },
73
- "gitHead": "6e8935883b874d68499283e7a3081a1e2824cbee"
73
+ "gitHead": "be74f79fa06e3252519a9c0a8fd8564ab5676bae"
74
74
  }