@vercel/next 3.1.16 → 3.1.19
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.
- package/dist/index.js +13 -9
- package/dist/utils.js +13 -9
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -47038,7 +47038,11 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
47038
47038
|
let lambda;
|
47039
47039
|
let outputPathData = path_1.default.posix.join(entryDirectory, dataRoute);
|
47040
47040
|
if (nonDynamicSsg || isFallback || isOmitted) {
|
47041
|
-
outputPathData = outputPathData.replace(new RegExp(`${(0, escape_string_regexp_1.default)(origRouteFileNoExt)}.json$`),
|
47041
|
+
outputPathData = outputPathData.replace(new RegExp(`${(0, escape_string_regexp_1.default)(origRouteFileNoExt)}.json$`),
|
47042
|
+
// ensure we escape "$" correctly while replacing as "$" is a special
|
47043
|
+
// character, we need to do double escaping as first is for the initial
|
47044
|
+
// replace on the routeFile and then the second on the outputPath
|
47045
|
+
`${routeFileNoExt.replace(/\$/g, '$$$$')}.json`);
|
47042
47046
|
}
|
47043
47047
|
if (isSharedLambdas) {
|
47044
47048
|
const outputSrcPathPage = normalizeIndexOutput(path_1.default.join('/', srcRoute == null
|
@@ -47373,6 +47377,11 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
47373
47377
|
const shortPath = edgeFile.replace(/^pages\//, '');
|
47374
47378
|
worker.edgeFunction.name = shortPath;
|
47375
47379
|
source.edgeFunctions[shortPath] = worker.edgeFunction;
|
47380
|
+
// we don't add the route for edge functions as these
|
47381
|
+
// are already added in the routes-manifest under dynamicRoutes
|
47382
|
+
if (worker.type === 'function') {
|
47383
|
+
continue;
|
47384
|
+
}
|
47376
47385
|
const route = {
|
47377
47386
|
continue: true,
|
47378
47387
|
src: worker.routeSrc,
|
@@ -47384,14 +47393,9 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
47384
47393
|
},
|
47385
47394
|
],
|
47386
47395
|
};
|
47387
|
-
|
47388
|
-
|
47389
|
-
|
47390
|
-
else {
|
47391
|
-
route.middlewarePath = shortPath;
|
47392
|
-
if (isCorrectMiddlewareOrder) {
|
47393
|
-
route.override = true;
|
47394
|
-
}
|
47396
|
+
route.middlewarePath = shortPath;
|
47397
|
+
if (isCorrectMiddlewareOrder) {
|
47398
|
+
route.override = true;
|
47395
47399
|
}
|
47396
47400
|
if (routesManifest.version > 3 && isDynamicRoute(worker.page)) {
|
47397
47401
|
source.dynamicRouteMap.set(worker.page, route);
|
package/dist/utils.js
CHANGED
@@ -1118,7 +1118,11 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1118
1118
|
let lambda;
|
1119
1119
|
let outputPathData = path_1.default.posix.join(entryDirectory, dataRoute);
|
1120
1120
|
if (nonDynamicSsg || isFallback || isOmitted) {
|
1121
|
-
outputPathData = outputPathData.replace(new RegExp(`${(0, escape_string_regexp_1.default)(origRouteFileNoExt)}.json$`),
|
1121
|
+
outputPathData = outputPathData.replace(new RegExp(`${(0, escape_string_regexp_1.default)(origRouteFileNoExt)}.json$`),
|
1122
|
+
// ensure we escape "$" correctly while replacing as "$" is a special
|
1123
|
+
// character, we need to do double escaping as first is for the initial
|
1124
|
+
// replace on the routeFile and then the second on the outputPath
|
1125
|
+
`${routeFileNoExt.replace(/\$/g, '$$$$')}.json`);
|
1122
1126
|
}
|
1123
1127
|
if (isSharedLambdas) {
|
1124
1128
|
const outputSrcPathPage = normalizeIndexOutput(path_1.default.join('/', srcRoute == null
|
@@ -1453,6 +1457,11 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
1453
1457
|
const shortPath = edgeFile.replace(/^pages\//, '');
|
1454
1458
|
worker.edgeFunction.name = shortPath;
|
1455
1459
|
source.edgeFunctions[shortPath] = worker.edgeFunction;
|
1460
|
+
// we don't add the route for edge functions as these
|
1461
|
+
// are already added in the routes-manifest under dynamicRoutes
|
1462
|
+
if (worker.type === 'function') {
|
1463
|
+
continue;
|
1464
|
+
}
|
1456
1465
|
const route = {
|
1457
1466
|
continue: true,
|
1458
1467
|
src: worker.routeSrc,
|
@@ -1464,14 +1473,9 @@ async function getMiddlewareBundle({ entryPath, outputDirectory, routesManifest,
|
|
1464
1473
|
},
|
1465
1474
|
],
|
1466
1475
|
};
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
else {
|
1471
|
-
route.middlewarePath = shortPath;
|
1472
|
-
if (isCorrectMiddlewareOrder) {
|
1473
|
-
route.override = true;
|
1474
|
-
}
|
1476
|
+
route.middlewarePath = shortPath;
|
1477
|
+
if (isCorrectMiddlewareOrder) {
|
1478
|
+
route.override = true;
|
1475
1479
|
}
|
1476
1480
|
if (routesManifest.version > 3 && isDynamicRoute(worker.page)) {
|
1477
1481
|
source.dynamicRouteMap.set(worker.page, route);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.19",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -44,7 +44,7 @@
|
|
44
44
|
"@types/semver": "6.0.0",
|
45
45
|
"@types/text-table": "0.2.1",
|
46
46
|
"@types/webpack-sources": "3.2.0",
|
47
|
-
"@vercel/build-utils": "5.3.
|
47
|
+
"@vercel/build-utils": "5.3.1",
|
48
48
|
"@vercel/nft": "0.21.0",
|
49
49
|
"@vercel/routing-utils": "2.0.2",
|
50
50
|
"async-sema": "3.0.1",
|
@@ -69,5 +69,5 @@
|
|
69
69
|
"typescript": "4.5.2",
|
70
70
|
"webpack-sources": "3.2.3"
|
71
71
|
},
|
72
|
-
"gitHead": "
|
72
|
+
"gitHead": "09c85f63d2aa47c147260d343767f6eea60e352c"
|
73
73
|
}
|