@vercel/next 3.1.14 → 3.1.17

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 CHANGED
@@ -42724,14 +42724,13 @@ const build = async ({ files, workPath, repoRootPath, entrypoint, config = {}, m
42724
42724
  entryDirectory,
42725
42725
  outputDirectory,
42726
42726
  }, null, 2));
42727
- Object.keys(process.env)
42728
- .filter(key => key.startsWith('VERCEL_'))
42729
- .forEach(key => {
42730
- const newKey = `NEXT_PUBLIC_${key}`;
42731
- if (!(newKey in process.env)) {
42732
- process.env[newKey] = process.env[key];
42733
- }
42727
+ const prefixedEnvs = (0, build_utils_1.getPrefixedEnvVars)({
42728
+ envPrefix: 'NEXT_PUBLIC_',
42729
+ envs: process.env,
42734
42730
  });
42731
+ for (const [key, value] of Object.entries(prefixedEnvs)) {
42732
+ process.env[key] = value;
42733
+ }
42735
42734
  await (0, build_utils_1.download)(files, workPath, meta);
42736
42735
  if (config.rootDirectory) {
42737
42736
  // this must come after the download step since files outside
@@ -47039,7 +47038,11 @@ const onPrerenderRoute = (prerenderRouteArgs) => (routeKey, { isBlocking, isFall
47039
47038
  let lambda;
47040
47039
  let outputPathData = path_1.default.posix.join(entryDirectory, dataRoute);
47041
47040
  if (nonDynamicSsg || isFallback || isOmitted) {
47042
- outputPathData = outputPathData.replace(new RegExp(`${(0, escape_string_regexp_1.default)(origRouteFileNoExt)}.json$`), `${routeFileNoExt}.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`);
47043
47046
  }
47044
47047
  if (isSharedLambdas) {
47045
47048
  const outputSrcPathPage = normalizeIndexOutput(path_1.default.join('/', srcRoute == null
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$`), `${routeFileNoExt}.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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "3.1.14",
3
+ "version": "3.1.17",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -44,9 +44,9 @@
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.1.1",
47
+ "@vercel/build-utils": "5.3.0",
48
48
  "@vercel/nft": "0.21.0",
49
- "@vercel/routing-utils": "2.0.1",
49
+ "@vercel/routing-utils": "2.0.2",
50
50
  "async-sema": "3.0.1",
51
51
  "buffer-crc32": "0.2.13",
52
52
  "cheerio": "1.0.0-rc.10",
@@ -69,5 +69,5 @@
69
69
  "typescript": "4.5.2",
70
70
  "webpack-sources": "3.2.3"
71
71
  },
72
- "gitHead": "5eb8b16cbdf6215618b4b8125673941757fa1a8e"
72
+ "gitHead": "31f79c7de1944420b1f6fa5be9235c9b3f1d62b6"
73
73
  }