Skip to content

feat: Omit Knex types when generate_knex_types is false - #22

Merged
louis-pre merged 2 commits into
mainfrom
claude/dbtypr-generate-knex-types-false-abf894
Oct 5, 2026
Merged

louis-pre merged 2 commits into
mainfrom
claude/dbtypr-generate-knex-types-false-abf894

Conversation

@louis-pre

@louis-pre louis-pre commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Bug: with generate_knex_types: false, generated/utils.ts still emitted import { Knex } from "knex", KnexInsertableTable and KnexTable, and each generated/<schema>/index.ts still imported KnexTable. Consumers without knex installed failed to typecheck.

Fix: emit those only when generate_knex_types === true. Output for true is byte-for-byte unchanged.

This unblocks removing Knex from seam-connect (seamapi/seam-connect#18298) and lets that PR drop its post-processing workaround.

🤖 Generated with Claude Code

louis-pre and others added 2 commits October 5, 2026 12:31
generated/utils.ts always imported `knex` and declared KnexTable, and each
schema index always imported KnexTable, even with generate_knex_types false.
Emit them only when generate_knex_types is true; output for true is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@louis-pre
louis-pre marked this pull request as ready for review October 5, 2026 19:34
@louis-pre
louis-pre merged commit 829e9ff into main Oct 5, 2026
6 of 10 checks passed
@louis-pre
louis-pre deleted the claude/dbtypr-generate-knex-types-false-abf894 branch October 5, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant