bun-types-no-globals 1.2.21-canary.20250821T140634 → 1.2.21-canary.20250822T140708

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/lib/index.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
  /// <reference path="./shell.d.ts" />
21
21
  /// <reference path="./experimental.d.ts" />
22
22
  /// <reference path="./sql.d.ts" />
23
+ /// <reference path="./security.d.ts" />
23
24
  /// <reference path="./bun.ns.d.ts" />
24
25
  // @ts-ignore Must disable this so it doesn't conflict with the DOM onmessage type, but still
25
26
  // allows us to declare our own globals that Node's types can "see" and not conflict with
package/lib/sql.d.ts CHANGED
@@ -82,6 +82,13 @@ declare module "bun" {
82
82
  );
83
83
  }
84
84
 
85
+ class MySQLError extends SQLError {
86
+ public readonly code: string;
87
+ public readonly errno: number | undefined;
88
+ public readonly sqlState: string | undefined;
89
+ constructor(message: string, options: { code: string; errno: number | undefined; sqlState: string | undefined });
90
+ }
91
+
85
92
  class SQLiteError extends SQLError {
86
93
  public readonly code: string;
87
94
  public readonly errno: number;
@@ -128,7 +135,7 @@ declare module "bun" {
128
135
  onclose?: ((err: Error | null) => void) | undefined;
129
136
  }
130
137
 
131
- interface PostgresOptions {
138
+ interface PostgresOrMySQLOptions {
132
139
  /**
133
140
  * Connection URL (can be string or URL object)
134
141
  */
@@ -196,7 +203,7 @@ declare module "bun" {
196
203
  * Database adapter/driver to use
197
204
  * @default "postgres"
198
205
  */
199
- adapter?: "postgres";
206
+ adapter?: "postgres" | "mysql" | "mariadb";
200
207
 
201
208
  /**
202
209
  * Maximum time in seconds to wait for connection to become available
@@ -265,14 +272,11 @@ declare module "bun" {
265
272
  */
266
273
  ssl?: TLSOptions | boolean | undefined;
267
274
 
268
- // `.path` is currently unsupported in Bun, the implementation is
269
- // incomplete.
270
- //
271
- // /**
272
- // * Unix domain socket path for connection
273
- // * @default ""
274
- // */
275
- // path?: string | undefined;
275
+ /**
276
+ * Unix domain socket path for connection
277
+ * @default undefined
278
+ */
279
+ path?: string | undefined;
276
280
 
277
281
  /**
278
282
  * Callback executed when a connection attempt completes
@@ -332,7 +336,7 @@ declare module "bun" {
332
336
  * };
333
337
  * ```
334
338
  */
335
- type Options = SQLiteOptions | PostgresOptions;
339
+ type Options = SQLiteOptions | PostgresOrMySQLOptions;
336
340
 
337
341
  /**
338
342
  * Represents a SQL query that can be executed, with additional control
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-types-no-globals",
3
- "version": "1.2.21-canary.20250821T140634",
3
+ "version": "1.2.21-canary.20250822T140708",
4
4
  "main": "./generator/index.ts",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "MIT",