@vercel/next 3.2.12 → 3.3.0
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 +12 -6
- package/dist/server-build.js +3 -3
- package/dist/utils.js +8 -3
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -44229,6 +44229,7 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
|
|
44229
44229
|
handler: '___next_launcher.cjs',
|
44230
44230
|
runtime: nodeVersion.runtime,
|
44231
44231
|
...lambdaOptions,
|
44232
|
+
operationType: 'SSR',
|
44232
44233
|
shouldAddHelpers: false,
|
44233
44234
|
shouldAddSourcemapSupport: false,
|
44234
44235
|
supportsMultiPayloads: !!process.env.NEXT_PRIVATE_MULTI_PAYLOAD,
|
@@ -46616,10 +46617,10 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46616
46617
|
},
|
46617
46618
|
],
|
46618
46619
|
dest: path_1.default.posix.join('/', entryDirectory, '/index.rsc'),
|
46619
|
-
|
46620
|
+
continue: true,
|
46620
46621
|
},
|
46621
46622
|
{
|
46622
|
-
src: `^${path_1.default.posix.join('/', entryDirectory, '/(
|
46623
|
+
src: `^${path_1.default.posix.join('/', entryDirectory, '/((?!.+\\.rsc).+)$')}`,
|
46623
46624
|
has: [
|
46624
46625
|
{
|
46625
46626
|
type: 'header',
|
@@ -46627,7 +46628,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
46627
46628
|
},
|
46628
46629
|
],
|
46629
46630
|
dest: path_1.default.posix.join('/', entryDirectory, '/$1.rsc'),
|
46630
|
-
|
46631
|
+
continue: true,
|
46631
46632
|
},
|
46632
46633
|
]
|
46633
46634
|
: []),
|
@@ -48079,16 +48080,19 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
48079
48080
|
if (appDir && srcRoute && dataRoute.endsWith('.rsc')) {
|
48080
48081
|
isAppPathRoute = true;
|
48081
48082
|
}
|
48083
|
+
const isOmittedOrNotFound = isOmitted || isNotFound;
|
48082
48084
|
const htmlFsRef = isBlocking || (isNotFound && !static404Page)
|
48083
48085
|
? // Blocking pages do not have an HTML fallback
|
48084
48086
|
null
|
48085
48087
|
: new build_utils_1.FileFsRef({
|
48086
|
-
fsPath: path_1.default.join(isAppPathRoute &&
|
48088
|
+
fsPath: path_1.default.join(isAppPathRoute && !isOmittedOrNotFound && appDir
|
48089
|
+
? appDir
|
48090
|
+
: pagesDir, isFallback
|
48087
48091
|
? // Fallback pages have a special file.
|
48088
48092
|
addLocaleOrDefault(prerenderManifest.fallbackRoutes[routeKey].fallback, routesManifest, locale)
|
48089
48093
|
: // Otherwise, the route itself should exist as a static HTML
|
48090
48094
|
// file.
|
48091
|
-
`${
|
48095
|
+
`${isOmittedOrNotFound
|
48092
48096
|
? addLocaleOrDefault('/404', routesManifest, locale)
|
48093
48097
|
: routeFileNoExt}.html`),
|
48094
48098
|
});
|
@@ -48097,7 +48101,9 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
48097
48101
|
isFallback || isBlocking || (isNotFound && !static404Page)
|
48098
48102
|
? null
|
48099
48103
|
: new build_utils_1.FileFsRef({
|
48100
|
-
fsPath: path_1.default.join(isAppPathRoute &&
|
48104
|
+
fsPath: path_1.default.join(isAppPathRoute && !isOmittedOrNotFound && appDir
|
48105
|
+
? appDir
|
48106
|
+
: pagesDir, `${isOmittedOrNotFound
|
48101
48107
|
? addLocaleOrDefault('/404.html', routesManifest, locale)
|
48102
48108
|
: isAppPathRoute
|
48103
48109
|
? dataRoute
|
package/dist/server-build.js
CHANGED
@@ -884,10 +884,10 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
884
884
|
},
|
885
885
|
],
|
886
886
|
dest: path_1.default.posix.join('/', entryDirectory, '/index.rsc'),
|
887
|
-
|
887
|
+
continue: true,
|
888
888
|
},
|
889
889
|
{
|
890
|
-
src: `^${path_1.default.posix.join('/', entryDirectory, '/(
|
890
|
+
src: `^${path_1.default.posix.join('/', entryDirectory, '/((?!.+\\.rsc).+)$')}`,
|
891
891
|
has: [
|
892
892
|
{
|
893
893
|
type: 'header',
|
@@ -895,7 +895,7 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
|
|
895
895
|
},
|
896
896
|
],
|
897
897
|
dest: path_1.default.posix.join('/', entryDirectory, '/$1.rsc'),
|
898
|
-
|
898
|
+
continue: true,
|
899
899
|
},
|
900
900
|
]
|
901
901
|
: []),
|
package/dist/utils.js
CHANGED
@@ -1106,16 +1106,19 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1106
1106
|
if (appDir && srcRoute && dataRoute.endsWith('.rsc')) {
|
1107
1107
|
isAppPathRoute = true;
|
1108
1108
|
}
|
1109
|
+
const isOmittedOrNotFound = isOmitted || isNotFound;
|
1109
1110
|
const htmlFsRef = isBlocking || (isNotFound && !static404Page)
|
1110
1111
|
? // Blocking pages do not have an HTML fallback
|
1111
1112
|
null
|
1112
1113
|
: new build_utils_1.FileFsRef({
|
1113
|
-
fsPath: path_1.default.join(isAppPathRoute &&
|
1114
|
+
fsPath: path_1.default.join(isAppPathRoute && !isOmittedOrNotFound && appDir
|
1115
|
+
? appDir
|
1116
|
+
: pagesDir, isFallback
|
1114
1117
|
? // Fallback pages have a special file.
|
1115
1118
|
addLocaleOrDefault(prerenderManifest.fallbackRoutes[routeKey].fallback, routesManifest, locale)
|
1116
1119
|
: // Otherwise, the route itself should exist as a static HTML
|
1117
1120
|
// file.
|
1118
|
-
`${
|
1121
|
+
`${isOmittedOrNotFound
|
1119
1122
|
? addLocaleOrDefault('/404', routesManifest, locale)
|
1120
1123
|
: routeFileNoExt}.html`),
|
1121
1124
|
});
|
@@ -1124,7 +1127,9 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
|
|
1124
1127
|
isFallback || isBlocking || (isNotFound && !static404Page)
|
1125
1128
|
? null
|
1126
1129
|
: new build_utils_1.FileFsRef({
|
1127
|
-
fsPath: path_1.default.join(isAppPathRoute &&
|
1130
|
+
fsPath: path_1.default.join(isAppPathRoute && !isOmittedOrNotFound && appDir
|
1131
|
+
? appDir
|
1132
|
+
: pagesDir, `${isOmittedOrNotFound
|
1128
1133
|
? addLocaleOrDefault('/404.html', routesManifest, locale)
|
1129
1134
|
: isAppPathRoute
|
1130
1135
|
? dataRoute
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.3.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"build-dev": "node build.js --dev",
|
10
10
|
"test": "jest --env node --verbose --bail --runInBand",
|
11
11
|
"test-unit": "yarn test test/unit/",
|
12
|
-
"test-next-local": "jest --env node --verbose --bail --
|
12
|
+
"test-next-local": "jest --env node --verbose --bail --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
14
|
"test-integration-once": "rm test/builder-info.json; jest --env node --verbose --runInBand --bail test/fixtures/**/*.test.js"
|
15
15
|
},
|
@@ -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.
|
47
|
+
"@vercel/build-utils": "5.6.0",
|
48
48
|
"@vercel/nft": "0.22.1",
|
49
49
|
"@vercel/routing-utils": "2.1.3",
|
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": "a19447f9cdc8c7be8aa3646dfb441dd9469d2ed3"
|
73
73
|
}
|