@happyvertical/smrt-vitest 0.40.69 → 0.41.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/AGENTS.md +11 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/test-db.d.ts +0 -19
- package/dist/test-db.d.ts.map +1 -1
- package/dist/test-db.js +50 -161
- package/dist/test-db.js.map +1 -1
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -72,6 +72,17 @@ same `retry` policy inline in their own `vitest.config.ts`.
|
|
|
72
72
|
|
|
73
73
|
**DB adapter auto-detection**: `DATABASE_URL` set → PostgreSQL; otherwise → SQLite temp files.
|
|
74
74
|
|
|
75
|
+
`createIsolatedTestDbFromManifest()` renders tables **and indexes** from the
|
|
76
|
+
manifest's structured `schema.columns` / `schema.indexes` through the engine
|
|
77
|
+
DDL strategy (`collectManifestTables` + `renderCollectedManifestTable` from
|
|
78
|
+
`@happyvertical/smrt-core/schema/utils`) — the same renderer `db:migrate` uses,
|
|
79
|
+
so partial `WHERE` predicates, JSON-path targets and per-engine types match a
|
|
80
|
+
migrated database (#2358; parity asserted in
|
|
81
|
+
`src/__tests__/manifest-schema-path-parity.test.ts`). The cached `schema.ddl`
|
|
82
|
+
string is a CREATE TABLE preview and is merged in only for a table whose
|
|
83
|
+
contributors expose no `columns` (hand-authored manifests). Do not add a
|
|
84
|
+
private DDL/index renderer here; extend the core strategy instead.
|
|
85
|
+
|
|
75
86
|
For local file-backed SQLite, identical schemas are prepared once per Vitest
|
|
76
87
|
process and cloned from an immutable schema-only template for later databases.
|
|
77
88
|
The cache key is the full generated DDL, concurrent first callers share one
|