knex
3.3.0 · 26 Jun 2026MIT7.3M / weekRepositoryHomepagenpmAtom feed
0.95.15 is the newest release of 0.16.x.
In short
4 breaking26 new12 fixed4 changed1 internal
- Breaking
Use datetime2 for MSSQL datetime + timestamp types. This change is incompatible with MSSQL older than 2008 #2757
- Breaking
Knex.VERSION() method was removed, run "require('knex/package').version" instead #2776
- Breaking
Knex transpilation now targets Node.js 6, meaning it will no longer run on older Node.js versions #2813
- Breaking
Add json type support for SQLite 3.9+ (tested to work with Node package 'sqlite3' 4.0.2+) #2814
Security
2 advisories affect 0.16.1; 2.4.0 fixes them
- CriticalSQL Injection in knexGHSA-58v4-qwx5-7f59 · 21 Oct 2019Fixed in 0.19.5
- HighKnex.js has a limited SQL injection vulnerabilityGHSA-4jv9-3563-23j3 · 19 Dec 2022Fixed in 2.4.0
Release note
0.16.1 - 28 Nov, 2018
Breaking Changes
- Breaking
Use datetime2 for MSSQL datetime + timestamp types. This change is incompatible with MSSQL older than 2008 #2757
- Breaking
Knex.VERSION() method was removed, run "require('knex/package').version" instead #2776
- Breaking
Knex transpilation now targets Node.js 6, meaning it will no longer run on older Node.js versions #2813
- Breaking
Add json type support for SQLite 3.9+ (tested to work with Node package 'sqlite3' 4.0.2+) #2814
New features
Support passing explicit connection to query builder
Introduced abstraction for getting migrations to make migration bundling easier #2775
Allow timestamp with timezone on mssql databases #2724
Allow specifying multiple migration directories #2735
Allow cloning query builder with .userParams({}) assigned to it #2802
Allow chaining of increment, decrement, and update #2740
Allow table names with
forUpdate/forShare#2834Added
whereColumnand the associatednot/and/ormethods for using columns on the right side of a where clause #2837Added
whereRecursivemethod to make self-referential CTEs possible #2889Added support for named unique, primary and foreign keys to SQLite3 #2840
Added support for generating new migration and seed files without knexfile #2884 #2905 #2935
Added support for multiple columns in
.orderBy()#2881Added option of
existingTypeto.enum()method to support repeated use of enums #2719Added option to pass
indexTypefor MySQL dialect #2890Added
onValand the associatednot/and/ormethods for using values inonclauses within joins #2746Kill queries after timeout for PostgreSQL #2636
Manage TypeScript types internally #2845
Support 5.0.0+ versions of mssql driver #2861
Typescript migration stub #2816
Options object for passing timestamp parameters + regression tests #2919
Bug fixes
Implement fail-fast logic for dialect resolution #2776
Fixed identifier wrapping for
using(). Use columnize instead of wrap in using() #2713Fix issues with warnPromise when migration does not return a promise #2730
Compile with before update so that bindings are put in correct order #2733
Fix join using builder withSchema #2744
Throw instead of process.exit when client module missing #2843
Display correct filename of a migration that failed #2910
Fixed support of knexSnakeCaseWrappers in migrations #2914
SQlite3 renameColunm quote fix #2833
Adjust typing for forUpdate()/forShare() variant with table names #2858
Fix execution of Oracle tests on Node 11 #2920
Fix failures in oracle test bench and added it back to mandatory CI tests #2924
Knex client knexfile resolution fix #2923
Add queryContext to type declarations #2931
Test / internal changes
Add tests for multiple union arguments with callbacks and builders #2749
Separate migration generator #2786
Use Babel 7 #2813
Introduce LGTM.com badge #2755
Add test for retrieving null dates #2865
Add link to wiki #2866
Add tests for specifying explicit pg version #2895
Execute tests on Node.js 11 #2873
Version upgrade guide #2894
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.