@quobix/vacuum 0.30.5 → 0.31.0

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.
Files changed (2) hide show
  1. package/README.md +34 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  An **ultra-super-fast**, lightweight OpenAPI, AsyncAPI and JSON Schema linter and quality checking tool inspired by [Spectral](https://github.com/stoplightio/spectral).
17
17
 
18
- It's **fully compatible** with existing [Spectral](https://github.com/stoplightio/spectral) rulesets.
18
+ It supports Spectral-style YAML and JSON rulesets. See [Spectral migration](#spectral-migration) for compatibility limits and built-in alternatives.
19
19
 
20
20
  ## Install using the official [homebrew](https://brew.sh) tap
21
21
 
@@ -352,7 +352,7 @@ You can use either **YAML** or **JSON**, vacuum supports both formats.
352
352
 
353
353
  ## Using vacuum with pre-commit
354
354
 
355
- Vacuum can be used with [pre-commit](https://pre-commit.com).
355
+ vacuum can be used with [pre-commit](https://pre-commit.com).
356
356
 
357
357
  To do that, add to your `.pre-commit-config.yaml`:
358
358
 
@@ -445,7 +445,7 @@ The report file name is _optional_. The default report output name is `vacuum-sp
445
445
 
446
446
  ## Generate a `vacuum report`
447
447
 
448
- Vacuum reports are complete snapshots in time of a linting report for a specification. These reports can be 'replayed'
448
+ vacuum reports are complete snapshots in time of a linting report for a specification. These reports can be 'replayed'
449
449
  back through vacuum. Use the `dashboard` or the `html-report` commands to 'replay' the report and explore the results
450
450
  as they were when the report was generated.
451
451
 
@@ -501,6 +501,37 @@ if you're interested in seeing how things are progressing, it's available.
501
501
  ```
502
502
 
503
503
  ---
504
+ ## Spectral migration
505
+
506
+ vacuum loads YAML and JSON rulesets. Resolve each relative `extends` path from the
507
+ file that contains it, including on Windows. Keep sibling rulesets relative:
508
+
509
+ ```yaml
510
+ extends:
511
+ - ./ruleset.bank.yml
512
+ - ./ruleset.nlgov.yml
513
+ - [vacuum:owasp, all]
514
+ ```
515
+
516
+ Use `[vacuum:owasp, all]` for vacuum's built-in OWASP checks instead of importing
517
+ `@stoplight/spectral-owasp-ruleset/dist/ruleset.mjs`. The native rules use vacuum's
518
+ rule names and behavior; they do not execute the Spectral package. JavaScript
519
+ ruleset modules (`.js`, `.mjs`, `.cjs`) are not supported.
520
+
521
+ Arazzo workflow linting and `spectral:arazzo` are not supported. Remove that entry
522
+ from rulesets used to lint OpenAPI documents. Use an Arazzo-capable linter for
523
+ Arazzo workflow documents.
524
+
525
+ `--functions` takes a directory containing custom function files:
526
+
527
+ ```shell
528
+ vacuum lint api.yaml --ruleset rules/main.yaml --functions ./functions
529
+ ```
530
+
531
+ It does not enable JavaScript ruleset modules. Omitting the directory reports an
532
+ input error and exits with code 2. In the editor, vacuum checks recognized ruleset
533
+ buffers against its ruleset schema instead of reporting an unsupported API type.
534
+
504
535
  ## Supply your own Spectral compatible ruleset
505
536
 
506
537
  If you're already using Spectral and you have your own [custom ruleset](https://meta.stoplight.io/docs/spectral/e5b9616d6d50c-custom-rulesets#custom-rulesets),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quobix/vacuum",
3
- "version": "0.30.5",
3
+ "version": "0.31.0",
4
4
  "description": "The world's fastest, most scalable and complete OpenAPI parser",
5
5
  "type": "module",
6
6
  "author": "Dave Shanley",