open-mailery already depends on @hasna/contracts, but it has no .valid.json/.invalid.json fixture pair and no package script that runs contracts conformance.
Scope (this repository only):
- Keep contract parsing at the existing producer/consumer boundary (
parseContract for shared contract payloads).
- Add package-owned fixtures under
fixtures/ or examples/: at least one .valid.json and one .invalid.json for each adopted schema. Start from the copyable template in hasna/contracts, then replace the generic payload with this package’s real boundary payload.
- Add
"contracts:conformance": "contracts conformance fixtures" (adjust the directory only if using examples/).
- Run that script and
contracts no-cloud-scan . from prepublishOnly, preserving every existing typecheck, test, build, pack, and release command.
Acceptance:
bun run contracts:conformance validates a non-empty fixture set and exits 0.
- The package prepublish gate runs conformance and no-cloud scan as well as all prior gates.
- No shared schema or runtime behavior is changed in this backfill.
open-mailery already depends on
@hasna/contracts, but it has no.valid.json/.invalid.jsonfixture pair and no package script that runscontracts conformance.Scope (this repository only):
parseContractfor shared contract payloads).fixtures/orexamples/: at least one.valid.jsonand one.invalid.jsonfor each adopted schema. Start from the copyable template inhasna/contracts, then replace the generic payload with this package’s real boundary payload."contracts:conformance": "contracts conformance fixtures"(adjust the directory only if usingexamples/).contracts no-cloud-scan .fromprepublishOnly, preserving every existing typecheck, test, build, pack, and release command.Acceptance:
bun run contracts:conformancevalidates a non-empty fixture set and exits 0.