Skip to content

Commit f50af7a

Browse files
committed
Update vacuum, move OAS to vacuum
1 parent 3c6d8c6 commit f50af7a

15 files changed

+83028
-107
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"typescript": "^5.2.2"
4141
},
4242
"dependencies": {
43-
"@quobix/vacuum": "^0.5.0",
43+
"@quobix/vacuum": "^0.8.6",
4444
"@rate-my-openapi/core": "*",
4545
"@stoplight/spectral-core": "^1.18.3",
4646
"@stoplight/spectral-functions": "^1.7.2",

packages/cli/src/handlers/generate-rating.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ export async function generateRating(argv: Arguments) {
3434
"../",
3535
"rulesets/rules.vacuum.yaml",
3636
);
37+
// TODO: Use JS functions once bugs are fixed
38+
// https://github.com/daveshanley/vacuum/issues/418
39+
// const rulesetFunctionsPath = join(
40+
// process.cwd(),
41+
// "../",
42+
// "../",
43+
// "rulesets/functions",
44+
// );
3745
const openApiFile = await readFile(pathName);
3846
const { stdout, stderr } = await execAwait(
3947
`vacuum spectral-report -r ${rulesetPath} -o ${pathName}`,
@@ -50,7 +58,9 @@ export async function generateRating(argv: Arguments) {
5058
try {
5159
outputReport = JSON.parse(stdout);
5260
} catch (err) {
53-
throw new Error(`Failed to parse vacuum output to JSON: ${err}`);
61+
throw new Error(
62+
`Failed to parse vacuum output to JSON: ${err}. Output: ${stdout}`,
63+
);
5464
}
5565

5666
// Spectral supplement

0 commit comments

Comments
 (0)