Skip to content

Commit 5e9875e

Browse files
committed
fix(stack): correct stale slug in v3 drizzle tests (eql_v3. -> public.)
The rebase moved the v3 catalog keys from eql_v3.* to public.*, but the drizzle-v3 test slug helper still stripped the 'eql_v3.' prefix — a no-op against public.* keys. It left every matrix column named 'public.<domain>' (with a dot) instead of '<domain>'. The mocked unit suites passed (they assert slug() against itself), but the LIVE operators-live-pg matrix failed at bulkEncryptModels with 'Cannot convert undefined or null to object' because protect-ffi cannot resolve a dotted column identifier. Strip '^public.' to match the passing v3-matrix suites (matrix-live-pg) and yield clean column names. Test-only; no source change.
1 parent dcae4a2 commit 5e9875e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/stack/__tests__/drizzle-v3/column.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '@/eql/v3/drizzle/column'
1010
import { typedEntries, V3_MATRIX } from '../v3-matrix/catalog'
1111

12-
const slug = (eqlType: string) => eqlType.replace('eql_v3.', '')
12+
const slug = (eqlType: string) => eqlType.replace(/^public\./, '')
1313

1414
describe('makeEqlV3Column', () => {
1515
it('sets dataType() to the concrete eql_v3 domain', () => {

packages/stack/__tests__/drizzle-v3/operators-live-pg.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const RUN = `run-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`
3838
const ROW_A = 'row-a'
3939
const ROW_B = 'row-b'
4040

41-
const slug = (eqlType: EqlV3TypeName): string => eqlType.replace('eql_v3.', '')
41+
const slug = (eqlType: EqlV3TypeName): string => eqlType.replace(/^public\./, '')
4242
const matrixEntries = typedEntries(V3_MATRIX)
4343
const matrixColumns = Object.fromEntries(
4444
matrixEntries.map(([eqlType, spec]) => [

packages/stack/__tests__/drizzle-v3/operators.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function setup(
5454
return { ops, encrypt, render }
5555
}
5656

57-
const slug = (eqlType: string) => eqlType.replace('eql_v3.', '')
57+
const slug = (eqlType: string) => eqlType.replace(/^public\./, '')
5858
const matrixEntries = typedEntries(V3_MATRIX)
5959
const matrixTable = pgTable(
6060
'matrix_users',

0 commit comments

Comments
 (0)