specshield 3.2.8 → 3.3.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.
- package/CHANGELOG.md +67 -0
- package/LICENSE +1 -1
- package/README.md +8 -6
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# SpecShield CLI changelog
|
|
2
2
|
|
|
3
|
+
## 3.3.0 — 2026-06-20 — Complex-spec hardening + "contract compatibility testing"
|
|
4
|
+
|
|
5
|
+
A minor release focused on the local diff engine's accuracy on advanced OpenAPI
|
|
6
|
+
constructs, plus naming and packaging updates. The `bdct` command names are
|
|
7
|
+
unchanged — your existing CI keeps working.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Polymorphism & union support in `compare`.** `oneOf` / `anyOf` are no longer
|
|
12
|
+
flattened into a single object; each variant is captured and compared
|
|
13
|
+
independently. New change types surface in the diff:
|
|
14
|
+
- `SCHEMA_VARIANT_ADDED` (non-breaking) / `SCHEMA_VARIANT_REMOVED` (breaking)
|
|
15
|
+
- `SCHEMA_DISCRIMINATOR_CHANGED` (breaking — discriminator renamed/removed)
|
|
16
|
+
- field-level changes *inside* a matched variant are now detected.
|
|
17
|
+
- **`additionalProperties` (free-form maps / dictionaries)** value schemas are
|
|
18
|
+
now captured and diffed — a field removed/changed inside map values is caught.
|
|
19
|
+
- **OpenAPI 3.1 null-unions** (`type: [x, "null"]`) normalize to a base type +
|
|
20
|
+
`nullable`, so 3.1 specs compare cleanly against 3.0's `nullable: true` and
|
|
21
|
+
don't surface a bogus type-change.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **Naming:** SpecShield is now described as **contract compatibility testing**
|
|
26
|
+
(a.k.a. bidirectional contract testing) across the README and package metadata.
|
|
27
|
+
No command or flag changed.
|
|
28
|
+
- `oneOf` / `anyOf` handling no longer over-marks fields as `required` (the old
|
|
29
|
+
merge concatenated every variant's `required`), removing a class of
|
|
30
|
+
false-positive breaking changes.
|
|
31
|
+
- The local `compare` engine and the hosted BDCT `verify` engine are now aligned
|
|
32
|
+
on union / map / enum / 3.1 semantics — `compare` and `verify` give consistent
|
|
33
|
+
verdicts on the same spec.
|
|
34
|
+
|
|
35
|
+
### Packaging / legal
|
|
36
|
+
|
|
37
|
+
- `LICENSE` copyright and `package.json` author now attribute the project to
|
|
38
|
+
**SpecShield Software Private Limited**.
|
|
39
|
+
- The `specshield-bdct-action` default `cli-version` now tracks **`~3.3.0`**
|
|
40
|
+
(the latest 3.3.x patch), so action users get 3.3 bug-fixes automatically.
|
|
41
|
+
|
|
42
|
+
> Note: this entry documents everything since the last documented release (3.2.7),
|
|
43
|
+
> including what shipped in the 3.2.8–3.2.9 patches. `enum` value-removal detection
|
|
44
|
+
> (`ENUM_VALUE_REMOVED`, breaking) is part of this aligned engine work.
|
|
45
|
+
|
|
3
46
|
## 3.2.7 — 2026-06-12 — `history` + `share` now work from the CLI
|
|
4
47
|
|
|
5
48
|
`specshield history` and `specshield share` were previously "UI-only" stubs —
|
|
@@ -32,6 +75,30 @@ saved comparison's id, so the full CLI/CI flow works end to end.
|
|
|
32
75
|
- `specshield share` validates the report id is a positive number and gives a
|
|
33
76
|
clear message (pointing at `specshield history`) instead of a server 400.
|
|
34
77
|
|
|
78
|
+
## 3.2.4–3.2.6 — 2026-05-29 → 2026-06-03 — `whoami`, can-i-deploy fix, runnable examples
|
|
79
|
+
|
|
80
|
+
A series of small patches, consolidated here (they predate the 3.2.7 history/share work).
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- **`specshield whoami`** — prints the authenticated user, plan, and the org keys
|
|
85
|
+
you can pass to `--org`.
|
|
86
|
+
- **`examples/playwright-har/`** — a runnable Playwright → HAR → `bdct capture`
|
|
87
|
+
starter you can clone and run in ~30 seconds against a public sandbox.
|
|
88
|
+
|
|
89
|
+
### Fixed
|
|
90
|
+
|
|
91
|
+
- **`can-i-deploy` / `verify` `v`-prefix round-trip.** Versions were displayed as
|
|
92
|
+
`v1.0.0`; pasting that back into `--version` queried `v1.0.0` and matched zero
|
|
93
|
+
records (the stored value is `1.0.0`), so the gate failed open. A leading `v`
|
|
94
|
+
before a digit is now stripped on input, and the display is idempotent.
|
|
95
|
+
|
|
96
|
+
### Docs / CI
|
|
97
|
+
|
|
98
|
+
- README: grouped table of contents and a flagship rewrite of the
|
|
99
|
+
`bdct capture from-har` section; added a weekly smoke workflow that runs the
|
|
100
|
+
example against the published CLI.
|
|
101
|
+
|
|
35
102
|
## 3.2.3 — 2026-05-28 — BDCT fidelity: HAR capture + provider conformance
|
|
36
103
|
|
|
37
104
|
Two new `bdct` sub-commands that close the contract-fidelity gap PactFlow
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
**Commands — local & hosted compare**
|
|
18
18
|
- [Local Compare](#local-compare) · [Remote Compare](#remote-compare) · [Comparison History](#comparison-history) · [Share a Comparison](#share-a-comparison) · [GitHub App PR Checks](#github-app--pr-checks)
|
|
19
19
|
|
|
20
|
-
**
|
|
21
|
-
- [
|
|
20
|
+
**Contract Compatibility Testing — the `bdct` commands**
|
|
21
|
+
- [Overview & full command reference](#bi-directional-contract-testing-bdct)
|
|
22
22
|
- [`bdct capture from-har` — HAR → consumer contract](#bdct-capture-from-har--turn-real-traffic-into-a-consumer-contract)
|
|
23
23
|
- [Step 1 — record a HAR](#step-1--record-a-har-file) · [Step 2 — generate contract](#step-2--turn-the-har-into-a-consumer-contract) · [Step 3 — publish + gate](#step-3--publish--gate) · [Operational concerns](#operational-concerns-read-this-before-going-live)
|
|
24
24
|
- [`bdct verify-provider` — spec-vs-production conformance](#bdct-verify-provider--does-your-live-provider-actually-match-its-spec)
|
|
@@ -34,21 +34,23 @@
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
-
> **OpenAPI Diff · Breaking-Change Detection ·
|
|
37
|
+
> **Contract Compatibility Testing · OpenAPI Diff · Breaking-Change Detection · `can-i-deploy` Deploy Gate · Pact-File Ingest · Live-Traffic Capture · Spec-vs-Production Conformance · GitHub PR Checks**
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
41
|
## Never ship a breaking change to your API consumers
|
|
42
42
|
|
|
43
|
-
**SpecShield
|
|
43
|
+
**SpecShield is contract compatibility testing for APIs** — catch breaking changes before they reach your consumers, and gate every deploy with `can-i-deploy`. *(Contract compatibility testing is also known as bidirectional contract testing.)*
|
|
44
|
+
|
|
45
|
+
It's the one CLI that does four things to keep your API safe:
|
|
44
46
|
|
|
45
47
|
1. **Diff** two OpenAPI specs and fail CI on breaking changes.
|
|
46
|
-
2. **
|
|
48
|
+
2. **Contract compatibility testing** with `can-i-deploy` — block a deploy that would break a consumer.
|
|
47
49
|
3. **`bdct capture from-har`** — turn recorded traffic into an accurate consumer contract (no Pact DSL).
|
|
48
50
|
4. **`bdct verify-provider`** — prove the running provider actually matches its OpenAPI spec.
|
|
49
51
|
|
|
50
52
|
```
|
|
51
|
-
OpenAPI diff +
|
|
53
|
+
OpenAPI diff + contract compatibility checks + HAR → consumer contract + spec-vs-production conformance — in one CLI.
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
No broker. No Pact DSL. Language-agnostic. Works in 30 seconds. Local mode never uploads your specs.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specshield",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.3.0",
|
|
4
|
+
"description": "Contract compatibility testing for APIs — catch breaking OpenAPI changes before they reach your consumers, with can-i-deploy deploy gating and GitHub PR checks. (a.k.a. bidirectional contract testing.)",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"specshield": "./bin/specshield.js"
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"github-app",
|
|
45
45
|
"api-drift"
|
|
46
46
|
],
|
|
47
|
+
"author": "SpecShield Software Private Limited",
|
|
47
48
|
"license": "MIT",
|
|
48
49
|
"files": [
|
|
49
50
|
"bin",
|