@vercel/static-build 0.23.0 → 0.23.2-canary.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 +21 -12
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -9114,7 +9114,7 @@ exports.frameworks = [
|
|
|
9114
9114
|
}));
|
|
9115
9115
|
return (config && config.publishDir) || 'public';
|
|
9116
9116
|
},
|
|
9117
|
-
defaultVersion: '0.58.2',
|
|
9117
|
+
defaultVersion: '0.58.2', // Must match the build image
|
|
9118
9118
|
},
|
|
9119
9119
|
{
|
|
9120
9120
|
name: 'Jekyll',
|
|
@@ -9252,7 +9252,7 @@ exports.frameworks = [
|
|
|
9252
9252
|
},
|
|
9253
9253
|
},
|
|
9254
9254
|
getOutputDirName: async () => 'public',
|
|
9255
|
-
defaultVersion: '0.
|
|
9255
|
+
defaultVersion: '0.13.0', // Must match the build image
|
|
9256
9256
|
},
|
|
9257
9257
|
{
|
|
9258
9258
|
name: 'Vite',
|
|
@@ -13861,9 +13861,16 @@ function getPkg(entrypoint, workPath) {
|
|
|
13861
13861
|
if (path_1.default.basename(entrypoint) !== 'package.json') {
|
|
13862
13862
|
return null;
|
|
13863
13863
|
}
|
|
13864
|
-
|
|
13865
|
-
|
|
13866
|
-
|
|
13864
|
+
try {
|
|
13865
|
+
const pkgPath = path_1.default.join(workPath, entrypoint);
|
|
13866
|
+
const pkg = JSON.parse(fs_1.readFileSync(pkgPath, 'utf8'));
|
|
13867
|
+
return pkg;
|
|
13868
|
+
}
|
|
13869
|
+
catch (err) {
|
|
13870
|
+
if (err.code !== 'ENOENT')
|
|
13871
|
+
throw err;
|
|
13872
|
+
}
|
|
13873
|
+
return null;
|
|
13867
13874
|
}
|
|
13868
13875
|
function getFramework(config, pkg) {
|
|
13869
13876
|
if (!config || !config.zeroConfig) {
|
|
@@ -13889,7 +13896,7 @@ async function fetchBinary(url, framework, version) {
|
|
|
13889
13896
|
throw new build_utils_1.NowBuildError({
|
|
13890
13897
|
code: 'STATIC_BUILD_BINARY_NOT_FOUND',
|
|
13891
13898
|
message: `Version ${version} of ${framework} does not exist. Please specify a different one.`,
|
|
13892
|
-
link: 'https://vercel.
|
|
13899
|
+
link: 'https://vercel.link/framework-versioning',
|
|
13893
13900
|
});
|
|
13894
13901
|
}
|
|
13895
13902
|
await build_utils_1.spawnAsync(`curl -sSL ${url} | tar -zx -C /usr/local/bin`, [], {
|
|
@@ -13978,7 +13985,7 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
|
|
|
13978
13985
|
Node.js will load 'false' as a string, not a boolean, so it's truthy still.
|
|
13979
13986
|
This is to ensure we don't accidentally break other packages that check
|
|
13980
13987
|
if process.env.CI is true somewhere.
|
|
13981
|
-
|
|
13988
|
+
|
|
13982
13989
|
https://github.com/facebook/create-react-app/issues/2453
|
|
13983
13990
|
https://github.com/facebook/create-react-app/pull/2501
|
|
13984
13991
|
https://github.com/vercel/community/discussions/30
|
|
@@ -14256,25 +14263,27 @@ const build = async ({ files, entrypoint, workPath, config, meta = {}, }) => {
|
|
|
14256
14263
|
};
|
|
14257
14264
|
exports.build = build;
|
|
14258
14265
|
const prepareCache = async ({ entrypoint, workPath, config, }) => {
|
|
14266
|
+
const cacheFiles = {};
|
|
14267
|
+
// File System API v1 cache files
|
|
14259
14268
|
const buildConfig = await read_build_output_1.readBuildOutputConfig({
|
|
14260
14269
|
workPath,
|
|
14261
14270
|
configFileName: 'build.json',
|
|
14262
14271
|
});
|
|
14263
14272
|
if ((buildConfig === null || buildConfig === void 0 ? void 0 : buildConfig.cache) && Array.isArray(buildConfig.cache)) {
|
|
14264
|
-
const cacheFiles = {};
|
|
14265
14273
|
for (const cacheGlob of buildConfig.cache) {
|
|
14266
14274
|
Object.assign(cacheFiles, await build_utils_1.glob(cacheGlob, workPath));
|
|
14267
14275
|
}
|
|
14268
14276
|
return cacheFiles;
|
|
14269
14277
|
}
|
|
14270
|
-
|
|
14271
|
-
|
|
14278
|
+
// Default cache files
|
|
14279
|
+
Object.assign(cacheFiles, await build_utils_1.glob('{.shadow-cljs,node_modules}/**', workPath));
|
|
14280
|
+
// Framework cache files
|
|
14272
14281
|
const pkg = getPkg(entrypoint, workPath);
|
|
14273
14282
|
const framework = getFramework(config, pkg);
|
|
14274
14283
|
if (framework === null || framework === void 0 ? void 0 : framework.cachePattern) {
|
|
14275
|
-
|
|
14284
|
+
Object.assign(cacheFiles, await build_utils_1.glob(framework.cachePattern, workPath));
|
|
14276
14285
|
}
|
|
14277
|
-
return
|
|
14286
|
+
return cacheFiles;
|
|
14278
14287
|
};
|
|
14279
14288
|
exports.prepareCache = prepareCache;
|
|
14280
14289
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "0.23.0",
|
|
3
|
+
"version": "0.23.2-canary.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"@types/ms": "0.7.31",
|
|
25
25
|
"@types/node-fetch": "2.5.4",
|
|
26
26
|
"@types/promise-timeout": "1.3.0",
|
|
27
|
-
"@vercel/build-utils": "2.15.0",
|
|
28
|
-
"@vercel/frameworks": "0.7.
|
|
27
|
+
"@vercel/build-utils": "2.15.2-canary.0",
|
|
28
|
+
"@vercel/frameworks": "0.7.1",
|
|
29
29
|
"@vercel/ncc": "0.24.0",
|
|
30
|
-
"@vercel/routing-utils": "1.13.
|
|
30
|
+
"@vercel/routing-utils": "1.13.1",
|
|
31
31
|
"get-port": "5.0.0",
|
|
32
32
|
"is-port-reachable": "2.0.1",
|
|
33
33
|
"ms": "2.1.2",
|
|
34
34
|
"node-fetch": "2.6.1",
|
|
35
35
|
"rc9": "1.2.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "e7f524defba3bbf2db750dea3235e6699584c424"
|
|
38
38
|
}
|