@vercel/fs-detectors 5.2.2 → 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.
@@ -1,6 +1,6 @@
1
1
  import { DetectorFilesystem } from '../detectors/filesystem';
2
2
  export declare class MissingBuildPipeline extends Error {
3
- constructor();
3
+ constructor(usesTasks: boolean);
4
4
  }
5
5
  export declare class MissingBuildTarget extends Error {
6
6
  constructor();
@@ -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
- super(
45
- "Missing required `build` pipeline in turbo.json or package.json Turbo configuration."
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
- if (turboJSON?.pipeline?.build) {
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.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",
@@ -15,7 +15,7 @@
15
15
  "license": "Apache-2.0",
16
16
  "dependencies": {
17
17
  "@vercel/error-utils": "2.0.2",
18
- "@vercel/frameworks": "3.0.1",
18
+ "@vercel/frameworks": "3.0.2",
19
19
  "@vercel/routing-utils": "3.1.0",
20
20
  "glob": "8.0.3",
21
21
  "js-yaml": "4.1.0",
@@ -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": "7.10.0",
33
+ "@vercel/build-utils": "8.2.1",
34
34
  "jest-junit": "16.0.0",
35
35
  "typescript": "4.9.5"
36
36
  },