Skip to content

Commit f643512

Browse files
committed
fix(sql-orm-client): brand Tag/Role id constants as Char<36> in mn-nested-write test; re-emit fixtures with through blocks
Plain `string` constants failed the integration typecheck (tsc) because Tag.id / Role.id are `Char<36>`. Brand TAG_RUST, TAG_TS, ROLE_ADMIN, ROLE_EDITOR at declaration (matching the pattern from create.test.ts). Runtime values are unchanged. Also commits the re-emitted contract.d.ts fixtures carrying the new `through` blocks on the N:M relations (User.tags / User.roles). Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
1 parent b0d5d96 commit f643512

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

packages/3-extensions/sql-orm-client/test/fixtures/generated/contract.d.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration/test/sql-orm-client/fixtures/generated/contract.d.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration/test/sql-orm-client/mn-nested-write.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// 2. Explicit .select() used in most tests.
1515
// 3. At least one implicit/default-selection readback.
1616

17+
import type { Char } from '@prisma-next/target-postgres/codec-types';
1718
import { describe, expect, it } from 'vitest';
1819
import {
1920
createReturningUsersCollection,
@@ -22,10 +23,10 @@ import {
2223
} from './integration-helpers';
2324
import { seedRoles, seedTags, seedUserRoles, seedUsers, seedUserTags } from './runtime-helpers';
2425

25-
const TAG_RUST = 'tag-rust';
26-
const TAG_TS = 'tag-typescript';
27-
const ROLE_ADMIN = 'role-admin';
28-
const ROLE_EDITOR = 'role-editor';
26+
const TAG_RUST = 'tag-rust' as Char<36>;
27+
const TAG_TS = 'tag-typescript' as Char<36>;
28+
const ROLE_ADMIN = 'role-admin' as Char<36>;
29+
const ROLE_EDITOR = 'role-editor' as Char<36>;
2930

3031
describe('integration/mn-nested-write', () => {
3132
// ===========================================================================

0 commit comments

Comments
 (0)