knex 3.2.4 → 3.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # Master (Unreleased)
2
2
 
3
+ # 3.2.6 - 24 March, 2026
4
+
5
+ ### Bug fixes
6
+
7
+ - Fix module exports [#6406](https://github.com/knex/knex/issues/6406)
8
+
9
+ # 3.2.5 - 23 March, 2026
10
+
11
+ ### Bug fixes
12
+
13
+ - Fix ESM exports [#6405](https://github.com/knex/knex/issues/6405)
14
+
3
15
  # 3.2.4 - 23 March, 2026
4
16
 
5
17
  ### Bug fixes
6
18
 
7
- - Fix ESM type exports
19
+ - Fix ESM type exports [#6404](https://github.com/knex/knex/issues/6404)
8
20
 
9
21
  # 3.2.1 - 22 March, 2026
10
22
 
package/README.md CHANGED
@@ -37,6 +37,27 @@ For knex-based Object Relational Mapper, see:
37
37
 
38
38
  To see the SQL that Knex will generate for a given query, you can use [Knex Query Lab](https://michaelavila.com/knex-querylab/)
39
39
 
40
+ ## Local Development Setup
41
+
42
+ ### Prerequisites
43
+
44
+ - Node.js 16+
45
+ - Python 3.x with `setuptools` installed (required for building native dependencies like `better-sqlite3`)
46
+
47
+ Python 3.12+ removed the built-in `distutils` module. If you encounter a `ModuleNotFoundError: No module named 'distutils'` error during `npm install`, install `setuptools` for the Python version used by node-gyp:
48
+
49
+ ```bash
50
+ pip install setuptools
51
+ ```
52
+
53
+ - **Windows only:** [Visual Studio Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) with the "Desktop development with C++" workload
54
+
55
+ ### Install dependencies
56
+
57
+ ```bash
58
+ npm install
59
+ ```
60
+
40
61
  ## Examples
41
62
 
42
63
  We have several examples [on the website](http://knexjs.org). Here is the first one to get you started:
package/bin/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knex",
3
- "version": "3.2.4",
3
+ "version": "3.2.6",
4
4
  "description": "A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3",
5
5
  "main": "knex.js",
6
6
  "types": "types/index.d.ts",
@@ -15,6 +15,10 @@
15
15
  "default": "./knex.js"
16
16
  }
17
17
  },
18
+ "./bin/*.js": "./bin/*.js",
19
+ "./bin/*": "./bin/*",
20
+ "./types/*.d.ts": "./types/*.d.ts",
21
+ "./types/*": "./types/*.d.ts",
18
22
  "./lib/*.js": "./lib/*.js",
19
23
  "./lib/*": "./lib/*.js",
20
24
  "./knex": "./knex.js",
@@ -36,7 +40,8 @@
36
40
  "coveralls": "nyc report --reporter=lcov",
37
41
  "lint": "eslint --cache .",
38
42
  "lint:fix": "eslint --cache --fix .",
39
- "lint:types": "tsd",
43
+ "prelint:types": "cd test-tstyche && npm i",
44
+ "lint:types": "tsd && tstyche --target 5.4",
40
45
  "lint:everything": "npm run lint && npm run lint:types",
41
46
  "lint:fix:everything": "npm run lint:fix && npm run lint:types",
42
47
  "test:unit": "npm run test:unit-only && npm run test:cli",
@@ -170,7 +175,8 @@
170
175
  "toxiproxy-node-client": "^4.0.0",
171
176
  "ts-node": "^10.9.1",
172
177
  "tsd": "^0.28.1",
173
- "typescript": "5.0.4"
178
+ "tstyche": "^6.2.0",
179
+ "typescript": "5.4.5"
174
180
  },
175
181
  "buildDependencies": [
176
182
  "rimraf"
File without changes
File without changes
package/scripts/clean.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/types/index.d.mts CHANGED
@@ -2,10 +2,13 @@
2
2
  // This file provides ESM type definitions that wrap the CJS types from index.d.ts
3
3
  // to match the exports defined in knex.mjs
4
4
 
5
- import type knexCjs from './index.d.ts';
5
+ import type { Knex } from './index.d.ts';
6
6
 
7
- // Re-export the named export as defined in knex.mjs, without circular self-reference
8
- export const knex: Omit<typeof knexCjs, 'default' | 'knex'>;
7
+ // Re-declare the knex factory function for ESM consumers.
8
+ // This matches the call signature from the CJS types.
9
+ declare function knex<TRecord extends {} = any, TResult = unknown[]>(
10
+ config: Knex.Config | string
11
+ ): Knex<TRecord, TResult>;
9
12
 
10
- // Re-export the default export as defined in knex.mjs: export default knex
13
+ export { knex, Knex };
11
14
  export default knex;