@vercel/next 3.1.13 → 3.1.14
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 +0 -18
- package/dist/server-build.js +0 -18
- package/package.json +5 -6
package/dist/index.js
CHANGED
@@ -44826,7 +44826,6 @@ const CORRECT_MIDDLEWARE_ORDER_VERSION = 'v12.1.7-canary.29';
|
|
44826
44826
|
const NEXT_DATA_MIDDLEWARE_RESOLVING_VERSION = 'v12.1.7-canary.33';
|
44827
44827
|
const EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION = 'v12.2.0';
|
44828
44828
|
const CORRECTED_MANIFESTS_VERSION = 'v12.2.0';
|
44829
|
-
const NON_NESTED_MIDDLEWARE_VERSION = 'v12.1.7-canary.9';
|
44830
44829
|
async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs, baseDir, workPath, entryPath, nodeVersion, buildId, escapedBuildId, dynamicPrefix, entryDirectory, outputDirectory, redirects, beforeFilesRewrites, afterFilesRewrites, fallbackRewrites, headers, dataRoutes, hasIsr404Page, imagesManifest, wildcardConfig, routesManifest, staticPages, lambdaPages, nextVersion, canUsePreviewMode, trailingSlash, prerenderManifest, omittedPrerenderRoutes, trailingSlashRedirects, isCorrectLocaleAPIRoutes, lambdaCompressedByteLimit, requiredServerFilesManifest, }) {
|
44831
44830
|
const lambdas = {};
|
44832
44831
|
const prerenders = {};
|
@@ -44837,7 +44836,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
44837
44836
|
const isCorrectNotFoundRoutes = semver_1.default.gte(nextVersion, CORRECT_NOT_FOUND_ROUTES_VERSION);
|
44838
44837
|
const isCorrectMiddlewareOrder = semver_1.default.gte(nextVersion, CORRECT_MIDDLEWARE_ORDER_VERSION);
|
44839
44838
|
const isCorrectManifests = semver_1.default.gte(nextVersion, CORRECTED_MANIFESTS_VERSION);
|
44840
|
-
const isNonNestedMiddleware = semver_1.default.gte(nextVersion, NON_NESTED_MIDDLEWARE_VERSION);
|
44841
44839
|
let hasStatic500 = !!staticPages[path_1.default.join(entryDirectory, '500')];
|
44842
44840
|
if (lambdaPageKeys.length === 0) {
|
44843
44841
|
throw new build_utils_1.NowBuildError({
|
@@ -45417,22 +45415,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
45417
45415
|
fsPath: catchallFsPath,
|
45418
45416
|
});
|
45419
45417
|
}
|
45420
|
-
// We stopped duplicating matchers for _next/data routes when we added
|
45421
|
-
// x-nextjs-data header resolving but we should still resolve middleware
|
45422
|
-
// when the header isn't present so we augment the source to include that.
|
45423
|
-
// We don't apply this modification for nested middleware > 1 staticRoute
|
45424
|
-
if (isNonNestedMiddleware) {
|
45425
|
-
middleware.staticRoutes.forEach(route => {
|
45426
|
-
if (!route.src?.match(/_next[\\/]{1,}data/)) {
|
45427
|
-
route.src =
|
45428
|
-
`^(\\/_next\\/data\\/${escapedBuildId})?(` +
|
45429
|
-
route.src
|
45430
|
-
?.replace(/\|\^/g, '|')
|
45431
|
-
.replace(/\$$/, ')$')
|
45432
|
-
.replace(/\$/g, '(\\.json)?$');
|
45433
|
-
}
|
45434
|
-
});
|
45435
|
-
}
|
45436
45418
|
return {
|
45437
45419
|
wildcard: wildcardConfig,
|
45438
45420
|
images: imagesManifest?.images?.loader === 'default'
|
package/dist/server-build.js
CHANGED
@@ -21,7 +21,6 @@ const CORRECT_MIDDLEWARE_ORDER_VERSION = 'v12.1.7-canary.29';
|
|
21
21
|
const NEXT_DATA_MIDDLEWARE_RESOLVING_VERSION = 'v12.1.7-canary.33';
|
22
22
|
const EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION = 'v12.2.0';
|
23
23
|
const CORRECTED_MANIFESTS_VERSION = 'v12.2.0';
|
24
|
-
const NON_NESTED_MIDDLEWARE_VERSION = 'v12.1.7-canary.9';
|
25
24
|
async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs, baseDir, workPath, entryPath, nodeVersion, buildId, escapedBuildId, dynamicPrefix, entryDirectory, outputDirectory, redirects, beforeFilesRewrites, afterFilesRewrites, fallbackRewrites, headers, dataRoutes, hasIsr404Page, imagesManifest, wildcardConfig, routesManifest, staticPages, lambdaPages, nextVersion, canUsePreviewMode, trailingSlash, prerenderManifest, omittedPrerenderRoutes, trailingSlashRedirects, isCorrectLocaleAPIRoutes, lambdaCompressedByteLimit, requiredServerFilesManifest, }) {
|
26
25
|
const lambdas = {};
|
27
26
|
const prerenders = {};
|
@@ -32,7 +31,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
32
31
|
const isCorrectNotFoundRoutes = semver_1.default.gte(nextVersion, CORRECT_NOT_FOUND_ROUTES_VERSION);
|
33
32
|
const isCorrectMiddlewareOrder = semver_1.default.gte(nextVersion, CORRECT_MIDDLEWARE_ORDER_VERSION);
|
34
33
|
const isCorrectManifests = semver_1.default.gte(nextVersion, CORRECTED_MANIFESTS_VERSION);
|
35
|
-
const isNonNestedMiddleware = semver_1.default.gte(nextVersion, NON_NESTED_MIDDLEWARE_VERSION);
|
36
34
|
let hasStatic500 = !!staticPages[path_1.default.join(entryDirectory, '500')];
|
37
35
|
if (lambdaPageKeys.length === 0) {
|
38
36
|
throw new build_utils_1.NowBuildError({
|
@@ -612,22 +610,6 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
612
610
|
fsPath: catchallFsPath,
|
613
611
|
});
|
614
612
|
}
|
615
|
-
// We stopped duplicating matchers for _next/data routes when we added
|
616
|
-
// x-nextjs-data header resolving but we should still resolve middleware
|
617
|
-
// when the header isn't present so we augment the source to include that.
|
618
|
-
// We don't apply this modification for nested middleware > 1 staticRoute
|
619
|
-
if (isNonNestedMiddleware) {
|
620
|
-
middleware.staticRoutes.forEach(route => {
|
621
|
-
if (!route.src?.match(/_next[\\/]{1,}data/)) {
|
622
|
-
route.src =
|
623
|
-
`^(\\/_next\\/data\\/${escapedBuildId})?(` +
|
624
|
-
route.src
|
625
|
-
?.replace(/\|\^/g, '|')
|
626
|
-
.replace(/\$$/, ')$')
|
627
|
-
.replace(/\$/g, '(\\.json)?$');
|
628
|
-
}
|
629
|
-
});
|
630
|
-
}
|
631
613
|
return {
|
632
614
|
wildcard: wildcardConfig,
|
633
615
|
images: imagesManifest?.images?.loader === 'default'
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.14",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -11,8 +11,7 @@
|
|
11
11
|
"test-unit": "yarn test test/build.test.ts test/unit/",
|
12
12
|
"test-next-local": "jest --env node --verbose --bail --forceExit --testTimeout=360000 test/integration/*.test.js test/integration/*.test.ts",
|
13
13
|
"test-next-local:middleware": "jest --env node --verbose --bail --useStderr --testTimeout=360000 test/integration/middleware.test.ts",
|
14
|
-
"test-integration-once": "rm test/builder-info.json; jest --env node --verbose --runInBand --bail test/fixtures/**/*.test.js"
|
15
|
-
"prepublishOnly": "yarn build"
|
14
|
+
"test-integration-once": "rm test/builder-info.json; jest --env node --verbose --runInBand --bail test/fixtures/**/*.test.js"
|
16
15
|
},
|
17
16
|
"repository": {
|
18
17
|
"type": "git",
|
@@ -45,9 +44,9 @@
|
|
45
44
|
"@types/semver": "6.0.0",
|
46
45
|
"@types/text-table": "0.2.1",
|
47
46
|
"@types/webpack-sources": "3.2.0",
|
48
|
-
"@vercel/build-utils": "5.1.
|
47
|
+
"@vercel/build-utils": "5.1.1",
|
49
48
|
"@vercel/nft": "0.21.0",
|
50
|
-
"@vercel/routing-utils": "2.0.
|
49
|
+
"@vercel/routing-utils": "2.0.1",
|
51
50
|
"async-sema": "3.0.1",
|
52
51
|
"buffer-crc32": "0.2.13",
|
53
52
|
"cheerio": "1.0.0-rc.10",
|
@@ -70,5 +69,5 @@
|
|
70
69
|
"typescript": "4.5.2",
|
71
70
|
"webpack-sources": "3.2.3"
|
72
71
|
},
|
73
|
-
"gitHead": "
|
72
|
+
"gitHead": "5eb8b16cbdf6215618b4b8125673941757fa1a8e"
|
74
73
|
}
|