kysely 0.29.3 → 0.29.4
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/README.md +1 -1
- package/dist/dialect/postgres/postgres-driver.js +5 -1
- package/dist/driver/driver.d.ts +2 -2
- package/dist/plugin/camel-case/camel-case.d.ts +1 -1
- package/dist/query-compiler/default-query-compiler.js +4 -4
- package/dist/util/log.d.ts +1 -1
- package/dist/util/type-utils.d.ts +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[](https://stand-with-ukraine.pp.ua)
|
|
2
2
|
|
|
3
3
|
[](https://github.com/kysely-org/kysely/releases/latest)
|
|
4
|
-
[](https://socket.dev/npm/package/kysely/overview/0.29.4)
|
|
5
5
|
[](https://github.com/kysely-org/kysely)
|
|
6
6
|
[](https://github.com/kysely-org/kysely/blob/master/LICENSE)
|
|
7
7
|
[](https://github.com/kysely-org/kysely/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
|
|
@@ -177,7 +177,11 @@ class PostgresConnection {
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
const controlClient = new Client({
|
|
180
|
+
const controlClient = new Client({
|
|
181
|
+
...poolOptions,
|
|
182
|
+
// `password` is not enumerable, so we have to explicitly set it after the spread.
|
|
183
|
+
password: 'password' in poolOptions ? poolOptions.password : undefined,
|
|
184
|
+
});
|
|
181
185
|
try {
|
|
182
186
|
await controlClient.connect();
|
|
183
187
|
// by the time we get the connection, another query might have been executed.
|
package/dist/driver/driver.d.ts
CHANGED
|
@@ -55,8 +55,8 @@ export interface TransactionSettings {
|
|
|
55
55
|
readonly accessMode?: AccessMode;
|
|
56
56
|
readonly isolationLevel?: IsolationLevel;
|
|
57
57
|
}
|
|
58
|
-
export declare const TRANSACTION_ACCESS_MODES: readonly [
|
|
58
|
+
export declare const TRANSACTION_ACCESS_MODES: readonly ['read only', 'read write'];
|
|
59
59
|
export type AccessMode = ArrayItemType<typeof TRANSACTION_ACCESS_MODES>;
|
|
60
|
-
export declare const TRANSACTION_ISOLATION_LEVELS: readonly [
|
|
60
|
+
export declare const TRANSACTION_ISOLATION_LEVELS: readonly ['read uncommitted', 'read committed', 'repeatable read', 'serializable', 'snapshot'];
|
|
61
61
|
export type IsolationLevel = ArrayItemType<typeof TRANSACTION_ISOLATION_LEVELS>;
|
|
62
62
|
export declare function validateTransactionSettings(settings: TransactionSettings): void;
|
|
@@ -3,9 +3,9 @@ export type StringMapper = (str: string) => string;
|
|
|
3
3
|
* Creates a function that transforms camel case strings to snake case.
|
|
4
4
|
*/
|
|
5
5
|
export declare function createSnakeCaseMapper({ upperCase, underscoreBeforeDigits, underscoreBetweenUppercaseLetters, }?: {
|
|
6
|
-
upperCase?: boolean | undefined;
|
|
7
6
|
underscoreBeforeDigits?: boolean | undefined;
|
|
8
7
|
underscoreBetweenUppercaseLetters?: boolean | undefined;
|
|
8
|
+
upperCase?: boolean | undefined;
|
|
9
9
|
}): StringMapper;
|
|
10
10
|
/**
|
|
11
11
|
* Creates a function that transforms snake case strings to camel case.
|
|
@@ -254,6 +254,10 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
|
|
|
254
254
|
this.append(' ');
|
|
255
255
|
this.visitNode(node.where);
|
|
256
256
|
}
|
|
257
|
+
if (node.returning) {
|
|
258
|
+
this.append(' ');
|
|
259
|
+
this.visitNode(node.returning);
|
|
260
|
+
}
|
|
257
261
|
if (node.orderBy) {
|
|
258
262
|
this.append(' ');
|
|
259
263
|
this.visitNode(node.orderBy);
|
|
@@ -262,10 +266,6 @@ export class DefaultQueryCompiler extends OperationNodeVisitor {
|
|
|
262
266
|
this.append(' ');
|
|
263
267
|
this.visitNode(node.limit);
|
|
264
268
|
}
|
|
265
|
-
if (node.returning) {
|
|
266
|
-
this.append(' ');
|
|
267
|
-
this.visitNode(node.returning);
|
|
268
|
-
}
|
|
269
269
|
if (wrapInParens) {
|
|
270
270
|
this.append(')');
|
|
271
271
|
}
|
package/dist/util/log.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CompiledQuery } from '../query-compiler/compiled-query.js';
|
|
2
2
|
import type { ArrayItemType } from './type-utils.js';
|
|
3
|
-
declare const logLevels: readonly [
|
|
3
|
+
declare const logLevels: readonly ['query', 'error'];
|
|
4
4
|
export declare const LOG_LEVELS: Readonly<typeof logLevels>;
|
|
5
5
|
export type LogLevel = ArrayItemType<typeof LOG_LEVELS>;
|
|
6
6
|
export interface QueryLogEvent {
|
|
@@ -119,7 +119,7 @@ export type IsAny<T> = 0 extends T & 1 ? true : false;
|
|
|
119
119
|
/**
|
|
120
120
|
* Evaluates to `true` if the types `T` and `U` are equal.
|
|
121
121
|
*/
|
|
122
|
-
export type Equals<T, U> = (<G>() => G extends T ? 1 : 2) extends <G>() => G extends U ? 1 : 2 ? true : false;
|
|
122
|
+
export type Equals<T, U> = (<G>() => G extends T ? 1 : 2) extends <G>() => (G extends U ? 1 : 2) ? true : false;
|
|
123
123
|
export type NarrowPartial<O, T> = T extends object ? DrainOuterGeneric<{
|
|
124
124
|
[K in keyof O & string]: K extends keyof T ? T[K] extends NotNull ? Exclude<O[K], null> : T[K] extends O[K] ? T[K] : T[K] extends object ? SimplifyDeep<O[K] & NarrowPartial<O[K], T[K]>> : KyselyTypeError<`$narrowType() call failed: passed type does not exist in '${K}'s type union`> : O[K];
|
|
125
125
|
}> : never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kysely",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.4",
|
|
4
4
|
"description": "Type safe SQL query builder",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -61,14 +61,13 @@
|
|
|
61
61
|
"Igal Klebanov <igalklebanov@gmail.com>"
|
|
62
62
|
],
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@arethetypeswrong/cli": "0.18.
|
|
65
|
-
"@
|
|
66
|
-
"@electric-sql/pglite": "0.5.3",
|
|
64
|
+
"@arethetypeswrong/cli": "0.18.5",
|
|
65
|
+
"@electric-sql/pglite": "0.5.4",
|
|
67
66
|
"@types/better-sqlite3": "7.6.13",
|
|
68
67
|
"@types/chai": "5.2.3",
|
|
69
68
|
"@types/chai-as-promised": "8.0.2",
|
|
70
69
|
"@types/mocha": "10.0.10",
|
|
71
|
-
"@types/node": "26.1.
|
|
70
|
+
"@types/node": "26.1.1",
|
|
72
71
|
"@types/pg": "8.20.0",
|
|
73
72
|
"@types/pg-cursor": "2.7.2",
|
|
74
73
|
"@types/prototype-pollution-vulnerable-lodash.merge-dont-upgrade": "npm:@types/lodash.merge@4.6.1",
|
|
@@ -80,22 +79,23 @@
|
|
|
80
79
|
"esbuild": "0.28.1",
|
|
81
80
|
"jsr": "0.14.3",
|
|
82
81
|
"mocha": "11.7.6",
|
|
83
|
-
"mysql2": "3.
|
|
82
|
+
"mysql2": "3.23.0",
|
|
84
83
|
"pathe": "2.0.3",
|
|
85
84
|
"pg": "8.22.0",
|
|
86
85
|
"pg-cursor": "2.21.0",
|
|
87
86
|
"playwright": "1.61.1",
|
|
88
|
-
"prettier": "3.9.
|
|
87
|
+
"prettier": "3.9.5",
|
|
89
88
|
"prototype-pollution-vulnerable-lodash.merge-dont-upgrade": "npm:lodash.merge@4.6.1",
|
|
90
89
|
"remeda": "2.39.0",
|
|
91
90
|
"semver": "7.8.5",
|
|
92
91
|
"sinon": "22.0.0",
|
|
93
|
-
"std-env": "4.
|
|
94
|
-
"tarn": "3.1.
|
|
92
|
+
"std-env": "4.2.0",
|
|
93
|
+
"tarn": "3.1.2",
|
|
95
94
|
"tedious": "20.0.0",
|
|
96
95
|
"tsd": "0.33.0",
|
|
97
|
-
"tsx": "4.
|
|
98
|
-
"typescript": "
|
|
96
|
+
"tsx": "4.23.1",
|
|
97
|
+
"typescript": "7.0.2",
|
|
98
|
+
"typescript-6": "npm:typescript@6.0.3"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"clean": "rm -rf dist & rm -rf test/node/dist & rm -rf test/browser/bundle.js",
|