This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| kysely (source) | ^0.28.14 → ^0.29.5 |
Release Notes
kysely-org/kysely (kysely)
v0.29.5
v0.29.4: 0.29.4
Hey 👋
A small batch of bug fixes. Please report any issues. 🤞😰🤞
🚀 Features
🐞 Bugfixes
PostgreSQL 🐘
- fix: fix postgres password not being passed to control client by @CakeWithDivinity & @igalklebanov in #1944
SQLite 📘
- fix(sqlite): returning clauses wrongfuly output after order by and limit in delete queries. by @igalklebanov in #1946
📖 Documentation
📦 CICD & Tooling
- chore: bump dependencies. by @igalklebanov in #1945
⚠️ Breaking Changes
🐤 New Contributors
- @CakeWithDivinity made their first contribution in #1944
What's Changed
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.29.3...v0.29.4
v0.29.3: 0.29.3
Hey 👋
A small batch of bug fixes. Please report any issues. 🤞😰🤞
🚀 Features
🐞 Bugfixes
PostgreSQL 🐘 / MSSQL 🥅
- fix: PostgreSQL and MSSQL migrations are not running exclusively when
disableTransactions: true. by @morgan-coded & @igalklebanov in #1919
📖 Documentation
- docs: add kysely-durable-objects to community dialects by @jeffwilde in #1805
- docs: use new play.kysely.dev domain for the playground. by @igalklebanov in #1874
- docs(#1892): add marshift/kysely-deno-sqlite3 to community dialects by @ltianyi992 in #1901
📦 CICD & Tooling
- chore(deps-dev): bump tsx from 4.22.0 to 4.22.1 by @dependabot[bot] in #1855
- chore(deps): bump hono from 4.12.18 to 4.12.19 by @dependabot[bot] in #1854
- chore(deps): bump zizmorcore/zizmor-action from 0.5.4 to 0.5.6 by @dependabot[bot] in #1853
- chore(deps): bump github/codeql-action from 4.35.4 to 4.35.5 by @dependabot[bot] in #1850
- chore(deps-dev): bump @types/node from 25.8.0 to 25.9.0 by @dependabot[bot] in #1860
- chore(deps-dev): bump pg from 8.20.0 to 8.21.0 by @dependabot[bot] in #1858
- chore(deps-dev): bump tsx from 4.22.1 to 4.22.3 by @dependabot[bot] in #1863
- chore(deps): bump hono from 4.12.19 to 4.12.21 by @dependabot[bot] in #1862
- chore(deps-dev): bump pg-cursor from 2.19.0 to 2.20.0 by @dependabot[bot] in #1857
- chore(deps-dev): bump @types/node from 25.9.0 to 25.9.1 by @dependabot[bot] in #1866
- chore(ci): use pedantic
zizmorpersona. by @igalklebanov in #1869 - chore(deps-dev): bump @electric-sql/pglite from 0.4.5 to 0.4.6 by @dependabot[bot] in #1881
- chore(deps): bump hono from 4.12.21 to 4.12.23 by @dependabot[bot] in #1880
- chore: resolve audit vulnerabilities. by @igalklebanov in #1882
- chore(ci): audit npm packages. by @igalklebanov in #1883
- chore(deps-dev): bump mysql2 from 3.22.3 to 3.22.4 by @dependabot[bot] in #1888
- chore(deps): bump github/codeql-action from 4.35.5 to 4.36.1 by @dependabot[bot] in #1900
- chore(deps-dev): bump @arethetypeswrong/cli from 0.18.2 to 0.18.3 by @dependabot[bot] in #1899
- chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 by @dependabot[bot] in #1896
- chore(deps): bump step-security/harden-runner from 2.19.3 to 2.19.4 by @dependabot[bot] in #1870
- chore(deps-dev): bump semver from 7.8.0 to 7.8.1 by @dependabot[bot] in #1877
- chore: bump dependencies. by @igalklebanov in #1920
- chore(deps-dev): bump @types/node from 26.0.1 to 26.1.0 by @dependabot[bot] in #1926
- chore(deps-dev): bump @ark/attest from 0.56.1 to 0.56.2 by @dependabot[bot] in #1925
- chore(deps-dev): bump @types/sinon from 21.0.1 to 22.0.0 by @dependabot[bot] in #1924
- chore(deps-dev): bump prettier from 3.9.1 to 3.9.4 by @dependabot[bot] in #1923
⚠️ Breaking Changes
🐤 New Contributors
- @jeffwilde made their first contribution in #1805
- @ltianyi992 made their first contribution in #1901
- @morgan-coded made their first contribution in #1919
What's Changed
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.29.2...v0.29.3
v0.29.2: 0.29.2
Hey 👋
A small batch of bug fixes. Please report any issues. 🤞😰🤞
🚀 Features
🐞 Bugfixes
- fix:
$narrowTypemishandling branded types. by @igalklebanov in #1851
📖 Documentation
📦 CICD & Tooling
⚠️ Breaking Changes
🐤 New Contributors
What's Changed
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.29.1...v0.29.2
v0.29.1: 0.29.1
Hey 👋
A small batch of bug fixes. Please report any issues. 🤞😰🤞
🚀 Features
🐞 Bugfixes
- fix: regression in piping of plugins' result transformations. by @igalklebanov in #1840
📖 Documentation
📦 CICD & Tooling
- ci: test node.js v26. by @igalklebanov in #1841
- ci: harden github workflows with the help of
zizmorscans. by @igalklebanov in #1843 - ci: split node tests by variant. by @igalklebanov in #1848
⚠️ Breaking Changes
🐤 New Contributors
What's Changed
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.29.0...v0.29.1
v0.29.0: 0.29.0
Hey 👋
This one's a banger! 💥 💥 💥
We got $pickTables, $omitTables compile-time helpers to narrow the world view of downstream queries, cutting down on compilation complexity/time while at it!
const results = await db
.$pickTables<'person' | 'pet'>() // <----- now `DB` is only { person: {...}, pet: {...} } for following methods.
.selectFrom('person')
.innerJoin('pet', 'pet.owner_id', 'person.id')
.selectAll()
.execute()
const results = await db
.$omitTables<'toy'>() // <----- now `DB` doesn't have a "toy" table description for following methods.
.selectFrom('person')
.innerJoin('pet', 'pet.owner_id', 'person.id')
.selectAll()
.execute()We got a new ReadonlyKysely<DB> helper type that turns your instance into a compile-time readonly instance!
import { Kysely } from 'kysely'
import type { ReadonlyKysely } from 'kysely/readonly'
export const db = new Kysely<Database>({...}) as never as ReadonlyKysely<Database>
db.selectFrom('person').selectAll() // no problem.
db.selectNoFrom(sql`now()`.as('now')) // no problem.
db.deleteFrom('person') // compilation error + deprecation!
db.insertInto('person').values({...}) // compilation error + deprecation!
db.mergeInto('person')... // compilation error + deprecation!
db.updateTable('person').set('first_name', 'Timmy') // compilation error + deprecation!
sql`...`.execute(db) // compilation error!
// etc. etc.We got a brand new PGlite dialect. With it comes a new supportsMultipleConnections adapter flag that uses a new centralized connection mutex when false - should help simplify all SQLite dialects out here!
import { PGlite } from '@electric-sql/pglite'
import { Kysely, PGliteDialect } from 'kysely'
const db = new Kysely<DB>({
// ...
dialect: new PGliteDialect({
pglite: new PGlite(),
}),
// ...
})We got $narrowType supporting nested narrowing and discriminated unions!
db.selectFrom('person_metadata')
.select(['discriminatedUnionProfile'])
// output type inferred as:
//
// {
// discriminatedUnionProfile: {
// auth:
// | { type: 'token'; token: string }
// | { type: 'session'; session_id: string }
// tags: string[]
// }
// }[]
.$narrowType<{ discriminatedUnionProfile: { auth: { type: 'token' } } }>()
// output type narrowed to:
//
// {
// discriminatedUnionProfile: {
// auth: { type: 'token'; token: string }
// tags: string[]
// }
// }[]
.execute()We got web standards driven query cancellation support. Pass an abort signal to execute* methods and similar. Pick between different inflight query abort strategies - ignore the query, cancel it on the database side or even kill the session on the database side.
import { Kysely, PostgresDialect } from 'kysely'
import { Client, ... } from 'pg'
const db = new Kysely<Database>({
dialect: new PostgresDialect({
// ...
controlClient: Client, // optional, for out-of-pool connections for database side query aborts.
// ...
})
})
const options = { signal: AbortSignal.timeout(3_000) } // throw abort/timeout errors and ignore query reuslts
query.execute(options)
query.stream(options)
sql`...`.execute(db, options)
db.executeQuery(compiledQuery, options)
// etc. etc.
query.execute({ ...options, inflightQueryAbortStrategy: 'cancel query' }) // also cancel query database side
query.execute({ ...options, inflightQueryAbortStrategy: 'kill session' }) // also kill session database sideWe got SafeNullComparisonPlugin to flip (in)equality operators to is and is not when right hand side argument is null.
import { Kysely, SafeNullComparisonPlugin } from 'kysely'
const db = new Kysely<DB>({
// ...
plugins: [new SafeNullComparisonPlugin()],
// ...
})
db.selectFrom('pet')
.where('name', '=', null) // outputs: "name" is null
.where('owner_id', '!=', null) // outputs: "owner_id" is not null
.selectAll()We got a new shouldParse(value, path) option in ParseJSONResultsPlugin for granular control of what gets JSON.parse'd and what stays a string using JSON paths.
import { JSONParseResultsPlugin } from 'kysely'
db.selectFrom('person')
.select((eb) => jsonArrayFrom(
eb.selectFrom('pet')
.where('pet.owner_id', '=', 'person.id')
.selectAll()
).as('pets'))
.withPlugin(new JSONParseResultsPlugin({
shouldParse: (_value, path) => {
// parse only the pets array
if (path.endsWith('."pets"')) {
return true
}
return false
}
}))🚀 Features
- feat(utils): Allow explicit undefined in Updateable type (for exactOptionalPropertyTypes support) by @y-hsgw in #1496
- feat(migrator): allow disabling transactions in migrate methods. by @igalklebanov in #1517
- feat: add
thenRefmethod ineb.caseby @ericsodev in #1531 - feat: add
whenRef(lhs, op, rhs)ineb.case. by @iam-abdul in #1598 - feat: add
elseRefineb.case()by @iam-abdul in #1601 - feat: add
$pickTables,$omitTablesand$extendTables, deprecatewithTables. by @igalklebanov in #1582 - feat: add
SafeNullComparisonPluginplugin by @rafaelalmeidatk in #1338 - feat: add more control through configuration @
ParseJSONResultsPlugin. by @igalklebanov in #1453 - feat: allow expressions in create/add index's
columnandcolumnsfunctions, deprecate theirexpressionfunctions. by @igalklebanov in #1664 - feat: add
with(name, query). by @igalklebanov in #1702 - feat: expose migrations from 'kysely/migration'. deprecate migration exports in root. by @igalklebanov in #1618
- refactor: bump minimum TypeScript version to 4.7. by @igalklebanov in #1696
- refactor: bump minimum TypeScript version to 4.8. by @igalklebanov in #1756
- refactor: bump minimum TypeScript version to 4.9. by @igalklebanov in #1759
- refactor: bump minimum TypeScript version to 5.0. by @igalklebanov in #1761
- refactor: bump minimum TypeScript version to 5.1. by @igalklebanov in #1770
- refactor: bump minimum TypeScript version to 5.2. by @igalklebanov in #1771
- refactor: bump minimum TypeScript version to 5.3. by @igalklebanov in #1772
- refactor: bump minimum TypeScript version to 5.4. by @igalklebanov in #1773
- feat: support narrowing by deep object keys in
NarrowPartialby @ethanresnick in #1667 - feat: add
ReadonlyKysely<DB>helper. by @igalklebanov in #218 - refactor: replace
requireAllProps<T>(obj)usage withsatisfies AllProps<T>. by @igalklebanov in #1787 - feat: allow overriding file import function @
FileMigrationProvider. by @igalklebanov in #1661 - feat: query cancellation. by @igalklebanov in #1796 & #1797 & #1798 &
33e60df&b739e02&4d7064f - refactor: remove long deprecated things. by @igalklebanov in #1799
- fix(ParseJSONResultsPlugin): wrap object keys in quotes. by @igalklebanov in
1e051c8
PostgreSQL 🐘 / MySQL 🐬
- feat(Introspect): add support for postgres & mysql foreign tables by @williamluke4 in #1494
PostgreSQL 🐘 / MSSQL 🥅
- feat(Migrator): allow passing transactions to
Migrator. by @jlucaso1 in #1480 - feat: support IF EXISTS in DROP COLUMN by @shuaixr in #1692
PostgreSQL 🐘
- feat: support dropping multiple types with schema.dropType(), cascade. by @aantia in #1516
- feat: add alter type query support. by @lucianolix in #1363
- refactor(postgres): refactor: optimize table metadata parsing in PostgresIntrospector by @rubenferreira97 in
ba89cc3
MySQL 🐬
- feat: allow expressions in unique constraint by @ericsodev in #1518
- feat: Add support for dropping temporary tables with temporary() modifier by @szalonna in #1615
- feat: add
addIndextoCreateTableBuilderby @alenap93 in #1352
MSSQL 🥅
- feat: add
datetime2data type support. by @igalklebanov in #1792
PGlite 🟨
- feat: add PGlite dialect. by @igalklebanov in #1510
🐞 Bugfixes
📖 Documentation
📦 CICD & Tooling
- chore: improve TypeScript benchmarks. by @igalklebanov in #1757
- chore: add returning.bench.ts by @igalklebanov in
65b6ec4 - chore: enhance returning benchmarks. by @igalklebanov in
b23085a - chore: add selectNoFrom benchmarks. @igalklebanov in
8193d37 - test: fix TypeScript 5.4.0 test following target bump to es2023. by @igalklebanov in #1780
- chore: drop CommonJS distribution. by @igalklebanov in #1782
- chore(ci): support rc publishes from next branch. by @igalklebanov in
585bf60 - chore: bump dependencies. by @igalklebanov in #1810
- chore: migrate to pnpm 11. by @igalklebanov in #1811
- add dependabot. by @igalklebanov in
7f98851 - chore: remove npm bump in publish workflow. by @igalklebanov in
9e0bfc0 - fix(ci): better-sqlite3 node.js version mismatches since pnpm action bump. by @igalklebanov in #1820
⚠️ Breaking Changes
Migrator,FileMigrationProviderand other migration related things are now exported from'kysely/migration'. Importing from'kysely'will provide an informative error message at compilation time.-import { Migrator, FileMigrationProvider } from 'kysely' +import { Migrator, FileMigrationProvider } from 'kysely/migration'Minimum TypeScript version is now 5.4. Versions 5.3 and older will get a very aggressive compilation error.
The library no longer ships CommonJS files. Use a Node.js version that supports
require(esm), or use dynamic imports. ES Modules files have moved from/dist/esm/to/dist/.TypeScript build target was bumped to
'es2023'.sql.valueandsql.literalwere removed after spending a long time in deprecation. Usesql.valandsql.litinstead.db.executeQuery'squeryId2nd argument has been replaced withoptions?: AbortableQueryOptionsafter spending a long time in deprecation.QueryResult.numUpdatedOrDeletedRowshas been removed after spending a long time in deprecation. Dialects that use it need to be updated to useQueryResult.numAffectedRowsinstead.UniqueConstraintNode.columnswidened fromReadonlyArray<ColumnNode>toReadonlyArray<OperationNode>.ExpressionBuilder.withSchemahas been removed after spending a long time in deprecation.DatabaseIntrospector.getMetadatahas been removed after spending a long time in deprecation. UseDatabaseIntrospector.getTablesinstead.MssqlDialectConfig.Tedious.resetConnectionOnReleasehas been removed after spending a long time in deprecation. UseMssqlDialectConfig.resetConnectionsOnReleaseinstead.MssqlDialectConfig.Tarn.options.validateConnectionshas been removed after spending a long time in deprecation. UseMssqlDialectConfig.validateConnectionsinstead.InsertQueryNode.ignorehas been removed after spending a long time in deprecation. UseInsertQueryNode.orActioninstead.PrimaryConstraintNodehas been removed after spending a long time in deprecation. UsePrimaryKeyConstraintNodeinstead.DropTablexNodeParamshas been removed after spending a long time in deprecation. UseDropTableNodeParamsinstead.
🐤 New Contributors
- @y-hsgw made their first contribution in #1496
- @williamluke4 made their first contribution in #1494
- @ericsodev made their first contribution in #1518
- @aantia made their first contribution in #1516
- @iam-abdul made their first contribution in #1598
- @szalonna made their first contribution in #1615
- @rafaelalmeidatk made their first contribution in #1338
- @jlucaso1 made their first contribution in #1480
- @lucianolix made their first contribution in #1363
- @shuaixr made their first contribution in #1692
- @rubenferreira97 made their first contribution in
ba89cc3
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.28.17...v0.29.0
v0.28.17: 0.28.17
Hey 👋
A small batch of bug fixes. Please report any issues. 🤞😰🤞
0.29 is right around the corner. Try the latest RC version!
🚀 Features
🐞 Bugfixes
- fix: further harden JSON path
.key(...)and.at(...)against SQL injections and exfiltrations. by @igalklebanov in #1804
📖 Documentation
- docs(returning): remove outdated SQLite alias workaround by @aymenhmaidiwastaken in #1793
📦 CICD & Tooling
⚠️ Breaking Changes
🐤 New Contributors
- @aymenhmaidiwastaken made their first contribution in #1793
What's Changed
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.28.16...v0.28.17
v0.28.16: 0.28.16
Hey 👋
A small batch of bug fixes. Please report any issues. 🤞😰🤞
0.29 is getting closer btw. 🌶️
🚀 Features
🐞 Bugfixes
- fix:
FilterObjectallows any defined value when query context has no tables (TBisnever). by @igalklebanov in #1791
📖 Documentation
- add socket security badge. by @igalklebanov in
db646ac - chore: make socket security badge reflect current specific version. by @igalklebanov in
5597144 - support multi-entry point tsdoc without index module. by @igalklebanov in
6998915 - fix broken tsdoc references. by @igalklebanov in
5a0f14b
📦 CICD & Tooling
- chore(pnpm): add strictDepBuilds: true. by @igalklebanov in
2301610 - chore: harden dependencies, pnpm. by @igalklebanov in
f4f1d9e - chore: re-add ignore-workspace-root-check. by @igalklebanov in
ab6d00e - add openssf scorecard. by @igalklebanov in
521156b - chore: bump dependencies and github actions. by @igalklebanov in #1789
- chore: change
verifyDepsBeforeRunto "prompt". by @igalklebanov in20548bc
⚠️ Breaking Changes
🐤 New Contributors
What's Changed
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.28.15...v0.28.16
v0.28.15: 0.28.15
Hey 👋
The introduction of dehydration in JSON functions/helpers caused an unexpected bug for consumers that have some columns defined as '${number}', e.g. '1' | '2' (also when wrapped in ColumnType or similar). Such columns, when participating in a JSON function/helper would dehydrate to number instead of staying as string.
Why dehydrate numeric strings to numbers in the first place? Select types in kysely describe the data after underlying driver's (e.g. pg) data transformation. Some drivers transform numeric columns to strings to be safe. When these columns participate in JSON functions, they lose original column data types - drivers don't know they need to transform to string - they return as-is.
This release introduces a special helper type that wraps your column type definition and tells kysely to NOT dehydrate it in JSON functions/helpers.
import type { NonDehydrateable } from 'kysely'
interface Database {
my_table: {
a_column: '1' | '2' | '3', // dehydrates to `number`
another_column: NonDehydrateable<'1' | '2' | '3'>, // stays `'1' | '2' | '3'`
column_too: NonDehydrateable<ColumnType<'1' | '2' | '3'>> // stays `'1' | '2' | '3'`
}
}🚀 Features
- feat: add
NonDehydrateable<T>to allow opt-out from dehydration in JSON functions/helpers. by @igalklebanov in #1697
🐞 Bugfixes
PostgreSQL 🐘
- fix: PostgreSQL introspector unnecessarily slow in result processing. by @igalklebanov & @rubenferreira97 in #1774
📖 Documentation
- Add complex function helpers section to documentation by @mifi & @igalklebanov in #1758
📦 CICD & Tooling
- chore: bump TypeScript to 6. by @igalklebanov in #1769
- chore: bump dependencies. by @igalklebanov in #1775
⚠️ Breaking Changes
🐤 New Contributors
- @rubenferreira97 made their first contribution in #1774
Full Changelog: https://github.com/kysely-org/kysely/compare/v0.28.14...v0.28.15
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.