@docupace/pipeline 1.0.0-alpha.35 → 1.0.0-alpha.36
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/package.json
CHANGED
|
@@ -12,8 +12,7 @@ export async function validateChangesets(directoryPath) {
|
|
|
12
12
|
let preJson;
|
|
13
13
|
|
|
14
14
|
if (!fs.existsSync(preJsonPath) && mdFiles.length === 0) {
|
|
15
|
-
|
|
16
|
-
process.exit(1);
|
|
15
|
+
throw new Error("Error: No pre.json and no md files found.")
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
if (fs.existsSync(preJsonPath)) {
|
|
@@ -29,16 +28,15 @@ export async function validateChangesets(directoryPath) {
|
|
|
29
28
|
const unmatchedFiles = mdFileNamesWithoutExt.filter(fileName => !changesetNames.includes(fileName));
|
|
30
29
|
|
|
31
30
|
if (unmatchedFiles.length == 0) {
|
|
32
|
-
|
|
33
|
-
process.exit(1);
|
|
31
|
+
throw new Error("Error: No new MD files found:");
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
console.log("Validation successful.");
|
|
39
37
|
} catch (error) {
|
|
40
|
-
console.
|
|
41
|
-
|
|
38
|
+
console.log(error.message);
|
|
39
|
+
throw(error);
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
|