@happyvertical/smrt-vitest 0.42.0 → 0.42.2

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/AGENTS.md CHANGED
@@ -63,6 +63,11 @@ same `retry` policy inline in their own `vitest.config.ts`.
63
63
 
64
64
  ## Test Database Utilities
65
65
 
66
+ PostgreSQL isolated factories provision all canonical framework-owned system
67
+ tables on the base connection before opening the per-test transaction. A
68
+ missing-table probe aborts the transaction even when optional-table logic
69
+ catches the original error.
70
+
66
71
  | Function | Use Case |
67
72
  |----------|----------|
68
73
  | `createIsolatedTestDbFromManifest()` | Multi-table tests — auto-creates schema from manifest with FK ordering and STI dedup |
@@ -83,6 +88,12 @@ string is a CREATE TABLE preview and is merged in only for a table whose
83
88
  contributors expose no `columns` (hand-authored manifests). Do not add a
84
89
  private DDL/index renderer here; extend the core strategy instead.
85
90
 
91
+ On PostgreSQL, the isolated factories provision the canonical change-feed
92
+ table and `_smrt_append_change` helper on the base connection before opening
93
+ the test transaction. Transaction handles are treated as already initialized
94
+ by SMRT objects, so moving this provisioning into the transaction would leave
95
+ the first interceptor-driven write without its required function (#2427).
96
+
86
97
  For local file-backed SQLite, identical schemas are prepared once per Vitest
87
98
  process and cloned from an immutable schema-only template for later databases.
88
99
  The cache key is the full generated DDL, concurrent first callers share one