Skip to content

chore(deps): update dependency kysely-codegen to v0.20.0 - #77

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/kysely-codegen-0.x
Closed

chore(deps): update dependency kysely-codegen to v0.20.0#77
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/kysely-codegen-0.x

Conversation

@renovate

@renovaterenovateBot commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

PackageChangeAgeConfidence
kysely-codegen0.18.50.20.0ageconfidence

Release Notes

RobinBlomberg/kysely-codegen (kysely-codegen)

v0.20.0

Compare Source

Many great contributions, bug fixes and new features.

Resolves #​284, #​287, #​307, #​308, #​72, #​301, #​275, #​283.

defineConfig() and postprocess()

kysely-codegen@​0.20.0 adds a defineConfig function that makes it easy to configure kysely-codegen in a type-safe way. It also adds a new Config#postprocess function that makes it possible to process the introspected metadata before generating code. This function allows you to reuse the active kysely-codegen connection to further introspect the database and modify the metadata as needed.

Example of generating enum types from PostGraphile enum tables:

import{sql}from"kysely";import{defineConfig}from"kysely-codegen";importpluralizefrom"pluralize";exportdefaultdefineConfig({camelCase: false,dateParser: "timestamp",dialect: "postgres",excludePattern: "(graphile_migrate.*|graphile_worker._private_*)",outFile: "./types/database-types.ts",postprocess: async({ db, metadata })=>{constrows=awaitdb.selectFrom("pg_catalog.pg_constraint as foreign_key_constraint").innerJoin("pg_catalog.pg_class as from_table","from_table.oid","foreign_key_constraint.conrelid",).innerJoin("pg_catalog.pg_namespace as from_table_namespace","from_table_namespace.oid","from_table.relnamespace",).innerJoin("pg_catalog.pg_attribute as from_column",(join)=>join.onRef("from_column.attrelid","=","from_table.oid").on(sql`from_column.attnum = any(foreign_key_constraint.conkey)`),).innerJoin("pg_catalog.pg_class as to_table","to_table.oid","foreign_key_constraint.confrelid",).innerJoin("pg_catalog.pg_namespace as to_table_namespace","to_table_namespace.oid","to_table.relnamespace",).innerJoin("pg_catalog.pg_attribute as to_column",(join)=>join.onRef("to_column.attrelid","=","to_table.oid").on(sql`to_column.attnum = any(foreign_key_constraint.confkey)`),).select(["from_table_namespace.nspname as fromSchema","from_table.relname as fromTable","from_column.attname as fromColumn","to_table_namespace.nspname as enumSchema","to_table.relname as enumTable","to_column.attname as enumColumn",]).where("foreign_key_constraint.contype","=","f").where(sql<any>`obj_description(to_table.oid, 'pg_class') like '%@enum%'`).execute();awaitPromise.all(rows.map(async({
fromColumn,
fromSchema,
fromTable,
enumColumn,
enumSchema,
enumTable,})=>{constfromTableMetadata=metadata.tables.find((table)=>table.schema===fromSchema&&table.name===fromTable,);constfromColumnMetadata=fromTableMetadata?.columns.find((column)=>column.name===fromColumn,);constenumTableMetadata=metadata.tables.find((table)=>table.schema===enumSchema&&table.name===enumTable,);constenumColumnMetadata=enumTableMetadata?.columns.find((column)=>column.name===enumColumn,);if(fromColumnMetadata||enumColumnMetadata){constdataType=`${pluralize.singular(enumTable)}.${enumColumn}`;constenumValues=awaitdb.selectFrom(`${enumSchema}.${enumTable}`).select(enumColumn).execute().then((rows)=>rows.map((row)=>(rowasRecord<string,string>)[enumColumn]),);metadata.enums.set(`${enumSchema}.${dataType}`,enumValues);if(fromColumnMetadata){fromColumnMetadata.dataTypeSchema=enumSchema;fromColumnMetadata.dataType=dataType;}if(enumColumnMetadata){enumColumnMetadata.dataTypeSchema=enumSchema;enumColumnMetadata.dataType=dataType;}}},),);returnmetadata;},singularize: true,url: process.env.DATABASE_URL,});

Example output:

+type EventTypeName = "TICKET_CREATED" | "TICKET_DELETED" | "TICKET_UPDATED";+
type Event = {
createdAt: Generated<Timestamp>;
data: JsonValue;
- type: string;+ type: EventTypeName;
};
type EventType = {
description: string;
- name: string;+ name: EventTypeName;
};

What's Changed

New Contributors

Full Changelog: RobinBlomberg/kysely-codegen@0.19.0...0.20.0

v0.19.0

New features

Thanks to amazing contributions from @​kevinmichaelchen in #​274, you can now override types on a global level:

.kysely-codegenrc.json

{
"customImports": {
"InstantRange": "./custom-types",
"CustomDuration": "@my-org/custom-types#Duration",
"Temporal": "@js-temporal/polyfill",
},
"typeMapping": {
"timestamptz": "Temporal.Instant",
"tstzrange": "InstantRange",
"date": "Temporal.PlainDate",
"interval": "CustomDuration"
}
}

Example of generated output:

importtype{InstantRange}from'./custom-types';importtype{DurationasCustomDuration}from'@my-org/custom-types';importtype{Temporal}from'@js-temporal/polyfill';exportinterfaceEventModel{createdAt: Temporal.Instant;dateRange: ColumnType<InstantRange,InstantRange,never>;eventDate: Temporal.PlainDate;interval: CustomDuration;}exportinterfaceDB{events: EventModel;}

What's Changed

New Contributors

Full Changelog: RobinBlomberg/kysely-codegen@0.18.0...0.19.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovateBot requested a review from a team as a code ownerSeptember 9, 2025 21:30
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 3 times, most recently from b2ed715 to a2e8323CompareSeptember 29, 2025 07:52
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 4 times, most recently from 93357ee to 16da347CompareOctober 8, 2025 06:50
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 2 times, most recently from e8c77b4 to 01665beCompareOctober 22, 2025 07:06
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 01665be to 7661da8CompareNovember 10, 2025 21:37
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 7661da8 to 00ed11cCompareNovember 18, 2025 22:58
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 00ed11c to fa0e59bCompareDecember 3, 2025 19:08
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from fa0e59b to 5c21727CompareDecember 31, 2025 12:56
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 5c21727 to 6c95fe3CompareJanuary 8, 2026 20:24
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 6c95fe3 to edd7fcfCompareJanuary 23, 2026 18:43
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from edd7fcf to b1b86c2CompareFebruary 2, 2026 17:40
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 3 times, most recently from dfb7b1b to d12c1d1CompareFebruary 19, 2026 08:49
@renovaterenovateBot changed the title chore(deps): update dependency kysely-codegen to v0.19.0chore(deps): update dependency kysely-codegen to v0.20.0Feb 19, 2026
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from d12c1d1 to 272aac6CompareFebruary 20, 2026 03:51
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 3 times, most recently from b69557e to 2bd549dCompareMarch 11, 2026 04:15
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 2bd549d to 43259faCompareMarch 17, 2026 06:37
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 2 times, most recently from f7c10d4 to 4a1c5b7CompareApril 1, 2026 19:30
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 2 times, most recently from a4a9153 to 18eedcaCompareApril 9, 2026 01:22
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 18eedca to 46c11fdCompareApril 13, 2026 06:12
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 46c11fd to 9c1b01fCompareApril 29, 2026 15:16
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 9c1b01f to 19e16b4CompareMay 12, 2026 05:39
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 19e16b4 to 2d7b1f1CompareJune 1, 2026 23:03
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 2d7b1f1 to 2b7b695CompareJune 11, 2026 18:39
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 2b7b695 to 2a6ed27CompareJuly 2, 2026 00:10
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch 2 times, most recently from db92949 to 28f1e77CompareJuly 16, 2026 15:02
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 28f1e77 to 68a63d1CompareJuly 27, 2026 08:11
@renovate
renovateBotforce-pushed the renovate/kysely-codegen-0.x branch from 68a63d1 to 9bb90cbCompareAugust 3, 2026 03:17
@jackchuka

Copy link
Copy Markdown
Member

Closing: this repo is deprecated and no longer taking dependency updates.

@renovate

renovateBot commented Aug 24, 2026

Copy link
Copy Markdown
ContributorAuthor

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.20.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate
renovateBot deleted the renovate/kysely-codegen-0.x branch August 24, 2026 02:34
Sign up for freeto 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

@jackchuka