Packages

knex

3.3.0 · 26 Jun 2026MIT7.2M / weekRepositoryHomepagenpmAtom feed

Your version

3.2.0

22 Mar 2026Where it was published

3.3.0 is the newest release of 3.x.

In short

11 new14 fixed5 changed4 internal

Release note

3.2.0 - 22 March, 2026

New features

  • Add migration lifecycle hooks

  • Add SIMILAR TO operator

  • Add dropUniqueIfExists

  • Add 'validate' pool option

  • PostgreSQL: Default datetime/timestamp precision setting added

  • Better-SQLite3: Support defaultSafeIntegers option

  • Better-SQLite3: Improve safeIntegers support

  • SQLite: Refactor transactions to allow setting the foreign_keys pragma for a transaction

Bug fixes

  • Fix where in query with raw column

  • Fix migrate up with completed migration

  • Fix ESM export and typings

  • Fix migration CLI and cli tests

  • Fix recover from broken connection

  • Prevent unexpected combinations of statements and clauses groups from executing

  • Improve CLI error reporting in some edge cases

  • PostgreSQL: Clearer error when pg-query-stream is missing

  • PostgreSQL: Fix streaming compatibility with pg-query-stream 4.14+

  • MySQL: Fix the operator "<=>" is not permitted

  • MSSQL: Optimize stream.write

  • SQLite: Fix whereILike issue

Types

  • Fix usage of object type that is too broad

  • Fix pluck typing issue when CompositeTableType is used

  • Make types no longer allow knex to be called without tablename

  • Add missing type definition for orderBy with a raw column/expression

  • Add additional typing for column.index

  • Update typings for increment/decrement

  • Use syntax import from instead of import = require()

  • Import knex as type in TS seed template

  • Update index.d.ts

  • Add @types/minimatch v5 to fix TypeScript build

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.