knex 1.0.7 → 2.0.0
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 +14 -3
- package/UPGRADING.md +4 -0
- package/lib/client.js +1 -4
- package/lib/dialects/sqlite3/index.js +1 -3
- package/package.json +8 -13
- package/scripts/runkit-example.js +1 -1
- package/types/index.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
1
|
# Master (Unreleased)
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# 2.0.0 - 21 April, 2022
|
|
4
|
+
|
|
5
|
+
### Breaking changes
|
|
6
|
+
|
|
7
|
+
- Restore sqlite3 package #5136
|
|
8
|
+
|
|
9
|
+
### Test / internal changes:
|
|
10
|
+
|
|
11
|
+
- Migrate Husky from 4 to 7 #5137
|
|
12
|
+
- Migrate Jake to 10.8.5 #5138
|
|
13
|
+
|
|
14
|
+
# 1.0.7 - 13 April, 2022
|
|
4
15
|
|
|
5
16
|
### Bug fixes:
|
|
6
17
|
|
|
7
18
|
- CLI: Fix cli migrate:make SQLite dependency #5106
|
|
8
19
|
|
|
9
|
-
# 1.0.6 - 12
|
|
20
|
+
# 1.0.6 - 12 April, 2022
|
|
10
21
|
|
|
11
22
|
### Bug fixes:
|
|
12
23
|
|
|
13
24
|
- PostgreSQL: Wait for search path to be set before returning connection #5107
|
|
14
25
|
- CLI: No client override during migrate:make #5109
|
|
15
26
|
|
|
16
|
-
# 1.0.5 - 05
|
|
27
|
+
# 1.0.5 - 05 April, 2022
|
|
17
28
|
|
|
18
29
|
### New features:
|
|
19
30
|
|
package/UPGRADING.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
## Upgrading to new knex.js versions
|
|
2
2
|
|
|
3
|
+
### Upgrading to version 2.0.0+
|
|
4
|
+
|
|
5
|
+
* Since `sqlite3` is maintained again, we switched back to it. If you are using `@vscode/sqlite3` driver dependency, please replace it with `sqlite3` in your `package.json`;
|
|
6
|
+
|
|
3
7
|
### Upgrading to version 1.0.0+
|
|
4
8
|
|
|
5
9
|
* Node.js older than 12 is no longer supported, make sure to update your environment;
|
package/lib/client.js
CHANGED
|
@@ -189,10 +189,7 @@ class Client extends EventEmitter {
|
|
|
189
189
|
try {
|
|
190
190
|
this.driver = this._driver();
|
|
191
191
|
} catch (e) {
|
|
192
|
-
const
|
|
193
|
-
? this.aliasDriverName
|
|
194
|
-
: this.driverName;
|
|
195
|
-
const message = `Knex: run\n$ npm install ${driverName} --save`;
|
|
192
|
+
const message = `Knex: run\n$ npm install ${this.driverName} --save`;
|
|
196
193
|
this.logger.error(`${message}\n${e.message}\n${e.stack}`);
|
|
197
194
|
throw new Error(`${message}\n${e.message}`);
|
|
198
195
|
}
|
|
@@ -30,7 +30,7 @@ class Client_SQLite3 extends Client {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
_driver() {
|
|
33
|
-
return require('
|
|
33
|
+
return require('sqlite3');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
schemaCompiler() {
|
|
@@ -232,8 +232,6 @@ Object.assign(Client_SQLite3.prototype, {
|
|
|
232
232
|
dialect: 'sqlite3',
|
|
233
233
|
|
|
234
234
|
driverName: 'sqlite3',
|
|
235
|
-
// SqlLite3 driver package name is different from driver name.
|
|
236
|
-
aliasDriverName: '@vscode/sqlite3',
|
|
237
235
|
});
|
|
238
236
|
|
|
239
237
|
module.exports = Client_SQLite3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knex",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A batteries-included SQL query & schema builder for PostgresSQL, MySQL, CockroachDB, MSSQL and SQLite3",
|
|
5
5
|
"main": "knex",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"db:stop:oracle": "docker-compose -f scripts/docker-compose.yml down",
|
|
52
52
|
"stress:init": "docker-compose -f scripts/stress-test/docker-compose.yml up --no-start && docker-compose -f scripts/stress-test/docker-compose.yml start",
|
|
53
53
|
"stress:test": "node scripts/stress-test/knex-stress-test.js | grep -A 5 -B 60 -- '- STATS '",
|
|
54
|
-
"stress:destroy": "docker-compose -f scripts/stress-test/docker-compose.yml stop"
|
|
54
|
+
"stress:destroy": "docker-compose -f scripts/stress-test/docker-compose.yml stop",
|
|
55
|
+
"prepare": "husky install"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"colorette": "2.0.16",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"pg-native": {
|
|
86
87
|
"optional": true
|
|
87
88
|
},
|
|
88
|
-
"
|
|
89
|
+
"sqlite3": {
|
|
89
90
|
"optional": true
|
|
90
91
|
},
|
|
91
92
|
"better-sqlite3": {
|
|
@@ -99,8 +100,7 @@
|
|
|
99
100
|
]
|
|
100
101
|
},
|
|
101
102
|
"devDependencies": {
|
|
102
|
-
"@types/node": "^
|
|
103
|
-
"@vscode/sqlite3": "^5.0.7",
|
|
103
|
+
"@types/node": "^17.0.25",
|
|
104
104
|
"better-sqlite3": "^7.5.1",
|
|
105
105
|
"chai": "^4.3.6",
|
|
106
106
|
"chai-as-promised": "^7.1.1",
|
|
@@ -113,8 +113,8 @@
|
|
|
113
113
|
"eslint-config-prettier": "^8.5.0",
|
|
114
114
|
"eslint-plugin-import": "^2.26.0",
|
|
115
115
|
"eslint-plugin-mocha-no-only": "^1.1.1",
|
|
116
|
-
"husky": "^
|
|
117
|
-
"jake": "^8.
|
|
116
|
+
"husky": "^7.0.4",
|
|
117
|
+
"jake": "^10.8.5",
|
|
118
118
|
"JSONStream": "^1.3.5",
|
|
119
119
|
"lint-staged": "^12.3.7",
|
|
120
120
|
"mocha": "^9.2.2",
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"sinon": "^13.0.1",
|
|
131
131
|
"sinon-chai": "^3.7.0",
|
|
132
132
|
"source-map-support": "^0.5.21",
|
|
133
|
+
"sqlite3": "^5.0.4",
|
|
133
134
|
"tap-spec": "^5.0.0",
|
|
134
135
|
"tape": "^5.5.3",
|
|
135
136
|
"tedious": "^14.4.0",
|
|
@@ -204,7 +205,6 @@
|
|
|
204
205
|
"pg-query-stream": false,
|
|
205
206
|
"oracle": false,
|
|
206
207
|
"sqlite3": false,
|
|
207
|
-
"@vscode/sqlite3": false,
|
|
208
208
|
"better-sqlite3": false,
|
|
209
209
|
"oracledb": false
|
|
210
210
|
},
|
|
@@ -242,11 +242,6 @@
|
|
|
242
242
|
"lib/dialects/oracledb"
|
|
243
243
|
]
|
|
244
244
|
},
|
|
245
|
-
"husky": {
|
|
246
|
-
"hooks": {
|
|
247
|
-
"pre-commit": "lint-staged"
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
245
|
"tsd": {
|
|
251
246
|
"directory": "test-tsd",
|
|
252
247
|
"compilerOptions": {
|
package/types/index.d.ts
CHANGED
|
@@ -2097,12 +2097,12 @@ export declare namespace Knex {
|
|
|
2097
2097
|
binary(columnName: string, length?: number): ColumnBuilder;
|
|
2098
2098
|
enum(
|
|
2099
2099
|
columnName: string,
|
|
2100
|
-
values: readonly Value[],
|
|
2100
|
+
values: (readonly Value[]) | null,
|
|
2101
2101
|
options?: EnumOptions
|
|
2102
2102
|
): ColumnBuilder;
|
|
2103
2103
|
enu(
|
|
2104
2104
|
columnName: string,
|
|
2105
|
-
values: readonly Value[],
|
|
2105
|
+
values: (readonly Value[]) | null,
|
|
2106
2106
|
options?: EnumOptions
|
|
2107
2107
|
): ColumnBuilder;
|
|
2108
2108
|
json(columnName: string): ColumnBuilder;
|