@vercel/fs-detectors 5.2.3 → 5.2.4
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.
|
@@ -40,10 +40,9 @@ var import_detect_framework = require("../detect-framework");
|
|
|
40
40
|
var import_json5 = __toESM(require("json5"));
|
|
41
41
|
var import_semver = __toESM(require("semver"));
|
|
42
42
|
class MissingBuildPipeline extends Error {
|
|
43
|
-
constructor() {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
);
|
|
43
|
+
constructor(usesTasks) {
|
|
44
|
+
const message = usesTasks ? "Missing required `build` task in turbo.json." : "Missing required `build` pipeline in turbo.json or package.json Turbo configuration.";
|
|
45
|
+
super(message);
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
class MissingBuildTarget extends Error {
|
|
@@ -79,10 +78,12 @@ async function getMonorepoDefaultSettings(projectName, projectPath, relativeToRo
|
|
|
79
78
|
detectorFilesystem.readFile("package.json").catch(() => null)
|
|
80
79
|
]);
|
|
81
80
|
let hasBuildPipeline = false;
|
|
81
|
+
let hasTurboTasks = false;
|
|
82
82
|
let turboSemVer = null;
|
|
83
83
|
if (turboJSONBuf !== null) {
|
|
84
84
|
const turboJSON = import_json5.default.parse(turboJSONBuf.toString("utf-8"));
|
|
85
|
-
|
|
85
|
+
hasTurboTasks = "tasks" in (turboJSON || {});
|
|
86
|
+
if (turboJSON?.pipeline?.build || turboJSON?.tasks?.build) {
|
|
86
87
|
hasBuildPipeline = true;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -94,7 +95,7 @@ async function getMonorepoDefaultSettings(projectName, projectPath, relativeToRo
|
|
|
94
95
|
turboSemVer = packageJSON?.dependencies?.turbo || packageJSON?.devDependencies?.turbo || null;
|
|
95
96
|
}
|
|
96
97
|
if (!hasBuildPipeline) {
|
|
97
|
-
throw new MissingBuildPipeline();
|
|
98
|
+
throw new MissingBuildPipeline(hasTurboTasks);
|
|
98
99
|
}
|
|
99
100
|
if (projectPath === "/") {
|
|
100
101
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/fs-detectors",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.4",
|
|
4
4
|
"description": "Vercel filesystem detectors",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@types/minimatch": "3.0.5",
|
|
31
31
|
"@types/node": "14.18.33",
|
|
32
32
|
"@types/semver": "7.3.10",
|
|
33
|
-
"@vercel/build-utils": "
|
|
33
|
+
"@vercel/build-utils": "8.2.1",
|
|
34
34
|
"jest-junit": "16.0.0",
|
|
35
35
|
"typescript": "4.9.5"
|
|
36
36
|
},
|