micro-contracts 0.18.0 → 0.18.1

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Contract-first OpenAPI toolchain for TypeScript Web/API systems. Generates contract packages, server routes, and frontend clients from OpenAPI specifications with enforceable guardrails.
4
4
 
5
- **Version:** 0.18.0
5
+ **Version:** 0.18.1
6
6
 
7
7
  ## Table of Contents
8
8
 
@@ -196,7 +196,7 @@ Ensures generated code matches spec and hasn't been tampered.
196
196
 
197
197
  | Check | Type | Description | Local Command | CI Job |
198
198
  |-------|------|-------------|---------------|--------|
199
- | Drift | built-in | `git diff packages/` must be clean | `micro-contracts check --only drift` | `drift` |
199
+ | Drift | built-in | `packages/**` must match the commit (staged, unstaged and untracked all count) | `micro-contracts check --only drift` | `drift` |
200
200
  | Manifest | built-in | SHA-256 hash verification | `micro-contracts check --only manifest` | `manifest` |
201
201
  | Package typecheck | custom | Generated packages compile (`tsc`) | `micro-contracts check --only package-typecheck` | `package-typecheck` |
202
202
  | Project rules | custom | Project-specific Spectral rules on **generated** spec | `micro-contracts check --only spec-project` | `spec-project` |
@@ -206,8 +206,11 @@ Ensures generated code matches spec and hasn't been tampered.
206
206
 
207
207
  **Drift check** — After running `generate`, `packages/**` must match committed state:
208
208
  ```bash
209
- git diff --exit-code packages/
209
+ git diff --exit-code HEAD -- packages/ && git ls-files --others --exclude-standard packages/
210
210
  ```
211
+ Comparing against `HEAD` rather than the index matters: a pre-commit run stages
212
+ its changes first, and comparing the worktree to the index would report a
213
+ hand-edited generated file as clean.
211
214
 
212
215
  **Manifest verification** — `packages/.generated-manifest.json` stores:
213
216
  - SHA-256 hashes of all generated files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "micro-contracts",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Contract-first OpenAPI toolchain that keeps TypeScript UI and microservices aligned via code generation",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",