@vercel/build-utils 2.12.3-canary.43 → 2.12.3-canary.44
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.
@@ -6,7 +6,8 @@ interface Metadata {
|
|
6
6
|
}
|
7
7
|
/**
|
8
8
|
* If the Deployment can be built with the new File System API,
|
9
|
-
*
|
9
|
+
* return the new Builder. Otherwise an "Exclusion Condition"
|
10
|
+
* was hit so return `null` builder with a `reason` for exclusion.
|
10
11
|
*/
|
11
12
|
export declare function detectFileSystemAPI({ files, projectSettings, builders, vercelConfig, pkg, tag, enableFlag, }: {
|
12
13
|
files: {
|
@@ -9,7 +9,8 @@ const _1 = require("./");
|
|
9
9
|
const enableFileSystemApiFrameworks = new Set(['solidstart']);
|
10
10
|
/**
|
11
11
|
* If the Deployment can be built with the new File System API,
|
12
|
-
*
|
12
|
+
* return the new Builder. Otherwise an "Exclusion Condition"
|
13
|
+
* was hit so return `null` builder with a `reason` for exclusion.
|
13
14
|
*/
|
14
15
|
async function detectFileSystemAPI({ files, projectSettings, builders, vercelConfig, pkg, tag, enableFlag = false, }) {
|
15
16
|
const framework = projectSettings.framework || '';
|
@@ -113,22 +114,39 @@ async function detectFileSystemAPI({ files, projectSettings, builders, vercelCon
|
|
113
114
|
reason: `Detected Next.js with Output Directory \`${projectSettings.outputDirectory}\` override. Please change it back to the default.`,
|
114
115
|
};
|
115
116
|
}
|
116
|
-
const
|
117
|
-
if (!
|
117
|
+
const nextVersion = deps['next'];
|
118
|
+
if (!nextVersion) {
|
118
119
|
return {
|
119
120
|
metadata,
|
120
121
|
fsApiBuilder: null,
|
121
122
|
reason: `Detected Next.js in Project Settings but missing \`next\` package.json dependencies. Please run \`npm i next\`.`,
|
122
123
|
};
|
123
124
|
}
|
124
|
-
// TODO:
|
125
|
-
if (
|
126
|
-
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(
|
125
|
+
// TODO: Read version from lockfile instead of package.json
|
126
|
+
if (nextVersion !== 'latest' && nextVersion !== 'canary') {
|
127
|
+
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(nextVersion) || '');
|
127
128
|
if (!fixedVersion || !semver_1.default.gte(fixedVersion, '12.0.0')) {
|
128
129
|
return {
|
129
130
|
metadata,
|
130
131
|
fsApiBuilder: null,
|
131
|
-
reason: `Detected legacy Next.js version "${
|
132
|
+
reason: `Detected legacy Next.js version "${nextVersion}" in package.json. Please run \`npm i next@latest\` to upgrade.`,
|
133
|
+
};
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
if (!hasDotOutput) {
|
138
|
+
// TODO: Read version from lockfile instead of package.json
|
139
|
+
const vercelCliVersion = deps['vercel'];
|
140
|
+
if (vercelCliVersion &&
|
141
|
+
vercelCliVersion !== 'latest' &&
|
142
|
+
vercelCliVersion !== 'canary') {
|
143
|
+
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(vercelCliVersion) || '');
|
144
|
+
// TODO: we might want to use '24.0.0' once its released
|
145
|
+
if (!fixedVersion || !semver_1.default.gte(fixedVersion, '23.1.3-canary.68')) {
|
146
|
+
return {
|
147
|
+
metadata,
|
148
|
+
fsApiBuilder: null,
|
149
|
+
reason: `Detected legacy Vercel CLI version "${vercelCliVersion}" in package.json. Please run \`npm i vercel@latest\` to upgrade.`,
|
132
150
|
};
|
133
151
|
}
|
134
152
|
}
|
package/dist/index.js
CHANGED
@@ -33856,7 +33856,8 @@ const _1 = __webpack_require__(2855);
|
|
33856
33856
|
const enableFileSystemApiFrameworks = new Set(['solidstart']);
|
33857
33857
|
/**
|
33858
33858
|
* If the Deployment can be built with the new File System API,
|
33859
|
-
*
|
33859
|
+
* return the new Builder. Otherwise an "Exclusion Condition"
|
33860
|
+
* was hit so return `null` builder with a `reason` for exclusion.
|
33860
33861
|
*/
|
33861
33862
|
async function detectFileSystemAPI({ files, projectSettings, builders, vercelConfig, pkg, tag, enableFlag = false, }) {
|
33862
33863
|
const framework = projectSettings.framework || '';
|
@@ -33960,22 +33961,39 @@ async function detectFileSystemAPI({ files, projectSettings, builders, vercelCon
|
|
33960
33961
|
reason: `Detected Next.js with Output Directory \`${projectSettings.outputDirectory}\` override. Please change it back to the default.`,
|
33961
33962
|
};
|
33962
33963
|
}
|
33963
|
-
const
|
33964
|
-
if (!
|
33964
|
+
const nextVersion = deps['next'];
|
33965
|
+
if (!nextVersion) {
|
33965
33966
|
return {
|
33966
33967
|
metadata,
|
33967
33968
|
fsApiBuilder: null,
|
33968
33969
|
reason: `Detected Next.js in Project Settings but missing \`next\` package.json dependencies. Please run \`npm i next\`.`,
|
33969
33970
|
};
|
33970
33971
|
}
|
33971
|
-
// TODO:
|
33972
|
-
if (
|
33973
|
-
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(
|
33972
|
+
// TODO: Read version from lockfile instead of package.json
|
33973
|
+
if (nextVersion !== 'latest' && nextVersion !== 'canary') {
|
33974
|
+
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(nextVersion) || '');
|
33974
33975
|
if (!fixedVersion || !semver_1.default.gte(fixedVersion, '12.0.0')) {
|
33975
33976
|
return {
|
33976
33977
|
metadata,
|
33977
33978
|
fsApiBuilder: null,
|
33978
|
-
reason: `Detected legacy Next.js version "${
|
33979
|
+
reason: `Detected legacy Next.js version "${nextVersion}" in package.json. Please run \`npm i next@latest\` to upgrade.`,
|
33980
|
+
};
|
33981
|
+
}
|
33982
|
+
}
|
33983
|
+
}
|
33984
|
+
if (!hasDotOutput) {
|
33985
|
+
// TODO: Read version from lockfile instead of package.json
|
33986
|
+
const vercelCliVersion = deps['vercel'];
|
33987
|
+
if (vercelCliVersion &&
|
33988
|
+
vercelCliVersion !== 'latest' &&
|
33989
|
+
vercelCliVersion !== 'canary') {
|
33990
|
+
const fixedVersion = semver_1.default.valid(semver_1.default.coerce(vercelCliVersion) || '');
|
33991
|
+
// TODO: we might want to use '24.0.0' once its released
|
33992
|
+
if (!fixedVersion || !semver_1.default.gte(fixedVersion, '23.1.3-canary.68')) {
|
33993
|
+
return {
|
33994
|
+
metadata,
|
33995
|
+
fsApiBuilder: null,
|
33996
|
+
reason: `Detected legacy Vercel CLI version "${vercelCliVersion}" in package.json. Please run \`npm i vercel@latest\` to upgrade.`,
|
33979
33997
|
};
|
33980
33998
|
}
|
33981
33999
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "2.12.3-canary.
|
3
|
+
"version": "2.12.3-canary.44",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.js",
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"typescript": "4.3.4",
|
50
50
|
"yazl": "2.4.3"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "ecb44812263a03803157ad258c2f0f3cd0fc83ef"
|
53
53
|
}
|