eslint-plugin-slonik 1.5.0 → 1.6.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/README.md +1 -1
- package/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/dist/shared/{eslint-plugin-slonik.1m1xlVmw.d.cts → eslint-plugin-slonik.uSZXmGoY.d.cts} +6 -0
- package/dist/shared/{eslint-plugin-slonik.1m1xlVmw.d.mts → eslint-plugin-slonik.uSZXmGoY.d.mts} +6 -0
- package/dist/shared/{eslint-plugin-slonik.1m1xlVmw.d.ts → eslint-plugin-slonik.uSZXmGoY.d.ts} +6 -0
- package/dist/workers/check-sql.worker.cjs +11 -4
- package/dist/workers/check-sql.worker.cjs.map +1 -1
- package/dist/workers/check-sql.worker.d.cts +1 -1
- package/dist/workers/check-sql.worker.d.mts +1 -1
- package/dist/workers/check-sql.worker.d.ts +1 -1
- package/dist/workers/check-sql.worker.mjs +11 -4
- package/dist/workers/check-sql.worker.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1119,6 +1119,11 @@ const zBaseSchema = z__default.object({
|
|
|
1119
1119
|
* Whether or not keep the connection alive. Change it only if you know what you're doing.
|
|
1120
1120
|
*/
|
|
1121
1121
|
keepAlive: z__default.boolean().optional(),
|
|
1122
|
+
/**
|
|
1123
|
+
* Connection timeout in milliseconds. If the connection is not established within this time,
|
|
1124
|
+
* an error will be thrown. Defaults to 5000 (5 seconds).
|
|
1125
|
+
*/
|
|
1126
|
+
connectionTimeout: z__default.number().optional(),
|
|
1122
1127
|
/**
|
|
1123
1128
|
* Override defaults
|
|
1124
1129
|
*/
|
|
@@ -1281,14 +1286,23 @@ function reportCheck(params) {
|
|
|
1281
1286
|
{ _tag: "InvalidMigrationError" },
|
|
1282
1287
|
{ _tag: "InvalidMigrationsPathError" },
|
|
1283
1288
|
{ _tag: "DatabaseInitializationError" },
|
|
1284
|
-
{ _tag: "InternalError" },
|
|
1285
1289
|
(error2) => {
|
|
1286
1290
|
if (params.connection.keepAlive === true) {
|
|
1287
1291
|
fatalError = error2;
|
|
1288
1292
|
}
|
|
1289
1293
|
return checkSql_utils.reportBaseError({ context, error: error2, tag });
|
|
1290
1294
|
}
|
|
1291
|
-
).
|
|
1295
|
+
).with({ _tag: "InternalError" }, (error2) => {
|
|
1296
|
+
const isConfigError = error2.message.includes("Invalid override column key");
|
|
1297
|
+
if (isConfigError) {
|
|
1298
|
+
return checkSql_utils.reportBaseError({ context, error: error2, tag });
|
|
1299
|
+
}
|
|
1300
|
+
console.warn(
|
|
1301
|
+
`[eslint-plugin-slonik] Skipping query due to unsupported SQL syntax: ${error2.message}
|
|
1302
|
+
If you believe this query should be supported, please open an issue at https://github.com/gajus/eslint-plugin-slonik/issues`
|
|
1303
|
+
);
|
|
1304
|
+
return;
|
|
1305
|
+
}).exhaustive();
|
|
1292
1306
|
},
|
|
1293
1307
|
({ result, checker, parser }) => {
|
|
1294
1308
|
if (result === null) {
|