@vercel/next 4.4.0 → 4.4.1
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 +38 -15
- package/package.json +3 -3
package/dist/index.js
CHANGED
@@ -1185,9 +1185,9 @@ var require_find_up = __commonJS({
|
|
1185
1185
|
}
|
1186
1186
|
});
|
1187
1187
|
|
1188
|
-
// ../../node_modules/.pnpm/universalify@2.0.
|
1188
|
+
// ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
|
1189
1189
|
var require_universalify = __commonJS({
|
1190
|
-
"../../node_modules/.pnpm/universalify@2.0.
|
1190
|
+
"../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
|
1191
1191
|
"use strict";
|
1192
1192
|
exports.fromCallback = function(fn) {
|
1193
1193
|
return Object.defineProperty(function(...args) {
|
@@ -1195,11 +1195,8 @@ var require_universalify = __commonJS({
|
|
1195
1195
|
fn.apply(this, args);
|
1196
1196
|
else {
|
1197
1197
|
return new Promise((resolve, reject) => {
|
1198
|
-
|
1199
|
-
|
1200
|
-
...args,
|
1201
|
-
(err, res) => err != null ? reject(err) : resolve(res)
|
1202
|
-
);
|
1198
|
+
args.push((err, res) => err != null ? reject(err) : resolve(res));
|
1199
|
+
fn.apply(this, args);
|
1203
1200
|
});
|
1204
1201
|
}
|
1205
1202
|
}, "name", { value: fn.name });
|
@@ -1209,8 +1206,10 @@ var require_universalify = __commonJS({
|
|
1209
1206
|
const cb = args[args.length - 1];
|
1210
1207
|
if (typeof cb !== "function")
|
1211
1208
|
return fn.apply(this, args);
|
1212
|
-
else
|
1213
|
-
|
1209
|
+
else {
|
1210
|
+
args.pop();
|
1211
|
+
fn.apply(this, args).then((r) => cb(null, r), cb);
|
1212
|
+
}
|
1214
1213
|
}, "name", { value: fn.name });
|
1215
1214
|
};
|
1216
1215
|
}
|
@@ -10622,6 +10621,7 @@ function getImagesConfig(imagesManifest) {
|
|
10622
10621
|
return imagesManifest?.images?.loader === "default" && imagesManifest.images?.unoptimized !== true ? {
|
10623
10622
|
domains: imagesManifest.images.domains,
|
10624
10623
|
sizes: imagesManifest.images.sizes,
|
10624
|
+
qualities: imagesManifest.images.qualities,
|
10625
10625
|
remotePatterns: imagesManifest.images.remotePatterns,
|
10626
10626
|
localPatterns: imagesManifest.images.localPatterns,
|
10627
10627
|
minimumCacheTTL: imagesManifest.images.minimumCacheTTL,
|
@@ -11200,7 +11200,9 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11200
11200
|
let fallbackHeaders;
|
11201
11201
|
let renderingMode = "STATIC" /* STATIC */;
|
11202
11202
|
let fallbackRevalidate;
|
11203
|
+
let fallbackRootParams;
|
11203
11204
|
let allowHeader;
|
11205
|
+
let fallbackSourceRoute;
|
11204
11206
|
if (manifest.version === 4) {
|
11205
11207
|
experimentalBypassFor = manifest.dynamicRoutes[lazyRoute].experimentalBypassFor;
|
11206
11208
|
prefetchDataRoute = manifest.dynamicRoutes[lazyRoute].prefetchDataRoute;
|
@@ -11211,7 +11213,9 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11211
11213
|
// using the `experimentalPPR` flag.
|
11212
11214
|
(manifest.dynamicRoutes[lazyRoute].experimentalPPR ? "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ : "STATIC" /* STATIC */);
|
11213
11215
|
fallbackRevalidate = manifest.dynamicRoutes[lazyRoute].fallbackRevalidate;
|
11216
|
+
fallbackRootParams = manifest.dynamicRoutes[lazyRoute].fallbackRootParams;
|
11214
11217
|
allowHeader = manifest.dynamicRoutes[lazyRoute].allowHeader;
|
11218
|
+
fallbackSourceRoute = manifest.dynamicRoutes[lazyRoute].fallbackSourceRoute;
|
11215
11219
|
}
|
11216
11220
|
if (typeof fallback === "string") {
|
11217
11221
|
ret.fallbackRoutes[lazyRoute] = {
|
@@ -11225,6 +11229,8 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
|
|
11225
11229
|
prefetchDataRoute,
|
11226
11230
|
prefetchDataRouteRegex,
|
11227
11231
|
fallbackRevalidate,
|
11232
|
+
fallbackRootParams,
|
11233
|
+
fallbackSourceRoute,
|
11228
11234
|
renderingMode,
|
11229
11235
|
allowHeader
|
11230
11236
|
};
|
@@ -11737,13 +11743,21 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
11737
11743
|
if (appDir && renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */) {
|
11738
11744
|
isAppPathRoute = true;
|
11739
11745
|
if (isFallback) {
|
11740
|
-
const {
|
11746
|
+
const {
|
11747
|
+
fallbackStatus,
|
11748
|
+
fallbackHeaders,
|
11749
|
+
fallbackRevalidate,
|
11750
|
+
fallbackSourceRoute
|
11751
|
+
} = prerenderManifest.fallbackRoutes[routeKey];
|
11741
11752
|
if (fallbackStatus) {
|
11742
11753
|
initialStatus = fallbackStatus;
|
11743
11754
|
}
|
11744
11755
|
if (fallbackHeaders) {
|
11745
11756
|
initialHeaders = fallbackHeaders;
|
11746
11757
|
}
|
11758
|
+
if (fallbackSourceRoute) {
|
11759
|
+
srcRoute = fallbackSourceRoute;
|
11760
|
+
}
|
11747
11761
|
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && typeof fallbackRevalidate !== "undefined") {
|
11748
11762
|
initialRevalidate = fallbackRevalidate;
|
11749
11763
|
}
|
@@ -11982,7 +11996,8 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
11982
11996
|
}
|
11983
11997
|
let htmlAllowQuery = allowQuery;
|
11984
11998
|
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && isFallback) {
|
11985
|
-
|
11999
|
+
const { fallbackRootParams } = prerenderManifest.fallbackRoutes[routeKey];
|
12000
|
+
htmlAllowQuery = fallbackRootParams ?? [];
|
11986
12001
|
}
|
11987
12002
|
prerenders[outputPathPage] = new import_build_utils.Prerender({
|
11988
12003
|
expiration: initialRevalidate,
|
@@ -14677,7 +14692,7 @@ ${JSON.stringify(
|
|
14677
14692
|
...denormalizeNextDataRoute(),
|
14678
14693
|
...isNextDataServerResolving ? dataRoutes.filter((route) => {
|
14679
14694
|
const { pathname } = new URL(route.dest || "/", "http://n");
|
14680
|
-
return !isDynamicRoute(pathname.replace(
|
14695
|
+
return !isDynamicRoute(pathname.replace(/(\\)?\.json$/, ""));
|
14681
14696
|
}) : [],
|
14682
14697
|
// /_next/data routes for getServerProps/getStaticProps pages
|
14683
14698
|
...isNextDataServerResolving ? (
|
@@ -15011,7 +15026,8 @@ var build = async (buildOptions) => {
|
|
15011
15026
|
cliType,
|
15012
15027
|
lockfileVersion,
|
15013
15028
|
packageJsonPackageManager,
|
15014
|
-
turboSupportsCorepackHome
|
15029
|
+
turboSupportsCorepackHome,
|
15030
|
+
detectedLockfile
|
15015
15031
|
} = await (0, import_build_utils3.scanParentDirs)(entryPath, true);
|
15016
15032
|
spawnOpts.env = (0, import_build_utils3.getEnvForPackageManager)({
|
15017
15033
|
cliType,
|
@@ -15019,7 +15035,8 @@ var build = async (buildOptions) => {
|
|
15019
15035
|
packageJsonPackageManager,
|
15020
15036
|
nodeVersion,
|
15021
15037
|
env: spawnOpts.env || {},
|
15022
|
-
turboSupportsCorepackHome
|
15038
|
+
turboSupportsCorepackHome,
|
15039
|
+
detectedLockfile
|
15023
15040
|
});
|
15024
15041
|
const nowJsonPath = await (0, import_find_up.default)(["now.json", "vercel.json"], {
|
15025
15042
|
cwd: entryPath
|
@@ -15403,6 +15420,12 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
15403
15420
|
message: 'image-manifest.json "images.minimumCacheTTL" must be an integer. Contact support if this continues to happen.'
|
15404
15421
|
});
|
15405
15422
|
}
|
15423
|
+
if (images.qualities && !Array.isArray(images.qualities)) {
|
15424
|
+
throw new import_build_utils3.NowBuildError({
|
15425
|
+
code: "NEXT_IMAGES_QUALITIES",
|
15426
|
+
message: 'image-manifest.json "images.qualities" must be an array. Contact support if this continues to happen.'
|
15427
|
+
});
|
15428
|
+
}
|
15406
15429
|
if (typeof images.dangerouslyAllowSVG !== "undefined" && typeof images.dangerouslyAllowSVG !== "boolean") {
|
15407
15430
|
throw new import_build_utils3.NowBuildError({
|
15408
15431
|
code: "NEXT_IMAGES_DANGEROUSLYALLOWSVG",
|
@@ -15777,7 +15800,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
15777
15800
|
);
|
15778
15801
|
}
|
15779
15802
|
if (dataRoute.page === "/") {
|
15780
|
-
route.src = route.src.replace(/\/index
|
15803
|
+
route.src = route.src.replace(/\/index(\\)?\.json/, ".json");
|
15781
15804
|
}
|
15782
15805
|
if (ssgDataRoute) {
|
15783
15806
|
route.dest = route.dest.replace(
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/next",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.1",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index",
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
@@ -30,8 +30,8 @@
|
|
30
30
|
"@types/semver": "6.0.0",
|
31
31
|
"@types/text-table": "0.2.1",
|
32
32
|
"@types/webpack-sources": "3.2.0",
|
33
|
-
"@vercel/build-utils": "
|
34
|
-
"@vercel/routing-utils": "
|
33
|
+
"@vercel/build-utils": "9.0.0",
|
34
|
+
"@vercel/routing-utils": "5.0.0",
|
35
35
|
"async-sema": "3.0.1",
|
36
36
|
"buffer-crc32": "0.2.13",
|
37
37
|
"bytes": "3.1.2",
|