@types/node 24.9.2 → 24.10.1

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.
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 28 Oct 2025 17:37:26 GMT
11
+ * Last updated: Tue, 11 Nov 2025 23:33:13 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/console.d.ts CHANGED
@@ -431,9 +431,10 @@ declare module "node:console" {
431
431
  colorMode?: boolean | "auto" | undefined;
432
432
  /**
433
433
  * Specifies options that are passed along to
434
- * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options).
434
+ * `util.inspect()`. Can be an options object or, if different options
435
+ * for stdout and stderr are desired, a `Map` from stream objects to options.
435
436
  */
436
- inspectOptions?: InspectOptions | undefined;
437
+ inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
437
438
  /**
438
439
  * Set group indentation.
439
440
  * @default 2
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "24.9.2",
3
+ "version": "24.10.1",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -150,6 +150,6 @@
150
150
  "undici-types": "~7.16.0"
151
151
  },
152
152
  "peerDependencies": {},
153
- "typesPublisherContentHash": "7485e2b36dbca4bd6584c40d09cac326c54ac8847561c62753f014789000ec21",
153
+ "typesPublisherContentHash": "bf541e42e173a984f57b649839d3371001c98469b0e8944f7762074aed2acd2f",
154
154
  "typeScriptVersion": "5.2"
155
155
  }
node/process.d.ts CHANGED
@@ -1969,6 +1969,7 @@ declare module "process" {
1969
1969
  addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1970
1970
  addListener(event: "warning", listener: WarningListener): this;
1971
1971
  addListener(event: "message", listener: MessageListener): this;
1972
+ addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
1972
1973
  addListener(event: Signals, listener: SignalsListener): this;
1973
1974
  addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1974
1975
  addListener(event: "worker", listener: WorkerListener): this;
@@ -1981,6 +1982,7 @@ declare module "process" {
1981
1982
  emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1982
1983
  emit(event: "warning", warning: Error): boolean;
1983
1984
  emit(event: "message", message: unknown, sendHandle: SendHandle): this;
1985
+ emit(event: "workerMessage", value: any, source: number): this;
1984
1986
  emit(event: Signals, signal?: Signals): boolean;
1985
1987
  emit(
1986
1988
  event: "multipleResolves",
@@ -1998,6 +2000,7 @@ declare module "process" {
1998
2000
  on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1999
2001
  on(event: "warning", listener: WarningListener): this;
2000
2002
  on(event: "message", listener: MessageListener): this;
2003
+ on(event: "workerMessage", listener: (value: any, source: number) => void): this;
2001
2004
  on(event: Signals, listener: SignalsListener): this;
2002
2005
  on(event: "multipleResolves", listener: MultipleResolveListener): this;
2003
2006
  on(event: "worker", listener: WorkerListener): this;
@@ -2011,6 +2014,7 @@ declare module "process" {
2011
2014
  once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2012
2015
  once(event: "warning", listener: WarningListener): this;
2013
2016
  once(event: "message", listener: MessageListener): this;
2017
+ once(event: "workerMessage", listener: (value: any, source: number) => void): this;
2014
2018
  once(event: Signals, listener: SignalsListener): this;
2015
2019
  once(event: "multipleResolves", listener: MultipleResolveListener): this;
2016
2020
  once(event: "worker", listener: WorkerListener): this;
@@ -2024,6 +2028,7 @@ declare module "process" {
2024
2028
  prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2025
2029
  prependListener(event: "warning", listener: WarningListener): this;
2026
2030
  prependListener(event: "message", listener: MessageListener): this;
2031
+ prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2027
2032
  prependListener(event: Signals, listener: SignalsListener): this;
2028
2033
  prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2029
2034
  prependListener(event: "worker", listener: WorkerListener): this;
@@ -2036,6 +2041,7 @@ declare module "process" {
2036
2041
  prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2037
2042
  prependOnceListener(event: "warning", listener: WarningListener): this;
2038
2043
  prependOnceListener(event: "message", listener: MessageListener): this;
2044
+ prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2039
2045
  prependOnceListener(event: Signals, listener: SignalsListener): this;
2040
2046
  prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2041
2047
  prependOnceListener(event: "worker", listener: WorkerListener): this;
@@ -2048,6 +2054,7 @@ declare module "process" {
2048
2054
  listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
2049
2055
  listeners(event: "warning"): WarningListener[];
2050
2056
  listeners(event: "message"): MessageListener[];
2057
+ listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
2051
2058
  listeners(event: Signals): SignalsListener[];
2052
2059
  listeners(event: "multipleResolves"): MultipleResolveListener[];
2053
2060
  listeners(event: "worker"): WorkerListener[];
node/sqlite.d.ts CHANGED
@@ -329,6 +329,64 @@ declare module "node:sqlite" {
329
329
  func: (...args: SQLOutputValue[]) => SQLInputValue,
330
330
  ): void;
331
331
  function(name: string, func: (...args: SQLOutputValue[]) => SQLInputValue): void;
332
+ /**
333
+ * Sets an authorizer callback that SQLite will invoke whenever it attempts to
334
+ * access data or modify the database schema through prepared statements.
335
+ * This can be used to implement security policies, audit access, or restrict certain operations.
336
+ * This method is a wrapper around [`sqlite3_set_authorizer()`](https://sqlite.org/c3ref/set_authorizer.html).
337
+ *
338
+ * When invoked, the callback receives five arguments:
339
+ *
340
+ * * `actionCode` {number} The type of operation being performed (e.g.,
341
+ * `SQLITE_INSERT`, `SQLITE_UPDATE`, `SQLITE_SELECT`).
342
+ * * `arg1` {string|null} The first argument (context-dependent, often a table name).
343
+ * * `arg2` {string|null} The second argument (context-dependent, often a column name).
344
+ * * `dbName` {string|null} The name of the database.
345
+ * * `triggerOrView` {string|null} The name of the trigger or view causing the access.
346
+ *
347
+ * The callback must return one of the following constants:
348
+ *
349
+ * * `SQLITE_OK` - Allow the operation.
350
+ * * `SQLITE_DENY` - Deny the operation (causes an error).
351
+ * * `SQLITE_IGNORE` - Ignore the operation (silently skip).
352
+ *
353
+ * ```js
354
+ * import { DatabaseSync, constants } from 'node:sqlite';
355
+ * const db = new DatabaseSync(':memory:');
356
+ *
357
+ * // Set up an authorizer that denies all table creation
358
+ * db.setAuthorizer((actionCode) => {
359
+ * if (actionCode === constants.SQLITE_CREATE_TABLE) {
360
+ * return constants.SQLITE_DENY;
361
+ * }
362
+ * return constants.SQLITE_OK;
363
+ * });
364
+ *
365
+ * // This will work
366
+ * db.prepare('SELECT 1').get();
367
+ *
368
+ * // This will throw an error due to authorization denial
369
+ * try {
370
+ * db.exec('CREATE TABLE blocked (id INTEGER)');
371
+ * } catch (err) {
372
+ * console.log('Operation blocked:', err.message);
373
+ * }
374
+ * ```
375
+ * @since v24.10.0
376
+ * @param callback The authorizer function to set, or `null` to
377
+ * clear the current authorizer.
378
+ */
379
+ setAuthorizer(
380
+ callback:
381
+ | ((
382
+ actionCode: number,
383
+ arg1: string | null,
384
+ arg2: string | null,
385
+ dbName: string | null,
386
+ triggerOrView: string | null,
387
+ ) => number)
388
+ | null,
389
+ ): void;
332
390
  /**
333
391
  * Whether the database is currently open or not.
334
392
  * @since v22.15.0
@@ -826,5 +884,54 @@ declare module "node:sqlite" {
826
884
  * @since v22.12.0
827
885
  */
828
886
  const SQLITE_CHANGESET_ABORT: number;
887
+ /**
888
+ * Deny the operation and cause an error to be returned.
889
+ * @since v24.10.0
890
+ */
891
+ const SQLITE_DENY: number;
892
+ /**
893
+ * Ignore the operation and continue as if it had never been requested.
894
+ * @since 24.10.0
895
+ */
896
+ const SQLITE_IGNORE: number;
897
+ /**
898
+ * Allow the operation to proceed normally.
899
+ * @since v24.10.0
900
+ */
901
+ const SQLITE_OK: number;
902
+ const SQLITE_CREATE_INDEX: number;
903
+ const SQLITE_CREATE_TABLE: number;
904
+ const SQLITE_CREATE_TEMP_INDEX: number;
905
+ const SQLITE_CREATE_TEMP_TABLE: number;
906
+ const SQLITE_CREATE_TEMP_TRIGGER: number;
907
+ const SQLITE_CREATE_TEMP_VIEW: number;
908
+ const SQLITE_CREATE_TRIGGER: number;
909
+ const SQLITE_CREATE_VIEW: number;
910
+ const SQLITE_DELETE: number;
911
+ const SQLITE_DROP_INDEX: number;
912
+ const SQLITE_DROP_TABLE: number;
913
+ const SQLITE_DROP_TEMP_INDEX: number;
914
+ const SQLITE_DROP_TEMP_TABLE: number;
915
+ const SQLITE_DROP_TEMP_TRIGGER: number;
916
+ const SQLITE_DROP_TEMP_VIEW: number;
917
+ const SQLITE_DROP_TRIGGER: number;
918
+ const SQLITE_DROP_VIEW: number;
919
+ const SQLITE_INSERT: number;
920
+ const SQLITE_PRAGMA: number;
921
+ const SQLITE_READ: number;
922
+ const SQLITE_SELECT: number;
923
+ const SQLITE_TRANSACTION: number;
924
+ const SQLITE_UPDATE: number;
925
+ const SQLITE_ATTACH: number;
926
+ const SQLITE_DETACH: number;
927
+ const SQLITE_ALTER_TABLE: number;
928
+ const SQLITE_REINDEX: number;
929
+ const SQLITE_ANALYZE: number;
930
+ const SQLITE_CREATE_VTABLE: number;
931
+ const SQLITE_DROP_VTABLE: number;
932
+ const SQLITE_FUNCTION: number;
933
+ const SQLITE_SAVEPOINT: number;
934
+ const SQLITE_COPY: number;
935
+ const SQLITE_RECURSIVE: number;
829
936
  }
830
937
  }
node/url.d.ts CHANGED
@@ -71,20 +71,44 @@ declare module "url" {
71
71
  * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
72
72
  *
73
73
  * `url.parse()` uses a lenient, non-standard algorithm for parsing URL
74
- * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
75
- * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
74
+ * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487)
75
+ * and incorrect handling of usernames and passwords. Do not use with untrusted
76
+ * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the
77
+ * [WHATWG URL](https://nodejs.org/docs/latest-v24.x/api/url.html#the-whatwg-url-api) API instead, for example:
78
+ *
79
+ * ```js
80
+ * function getURL(req) {
81
+ * const proto = req.headers['x-forwarded-proto'] || 'https';
82
+ * const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com';
83
+ * return new URL(req.url || '/', `${proto}://${host}`);
84
+ * }
85
+ * ```
86
+ *
87
+ * The example above assumes well-formed headers are forwarded from a reverse
88
+ * proxy to your Node.js server. If you are not using a reverse proxy, you should
89
+ * use the example below:
90
+ *
91
+ * ```js
92
+ * function getURL(req) {
93
+ * return new URL(req.url || '/', 'https://example.com');
94
+ * }
95
+ * ```
76
96
  * @since v0.1.25
77
97
  * @deprecated Use the WHATWG URL API instead.
78
98
  * @param urlString The URL string to parse.
79
- * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
80
- * on the returned URL object will be an unparsed, undecoded string.
81
- * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
82
- * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
99
+ * @param parseQueryString If `true`, the `query` property will always
100
+ * be set to an object returned by the [`querystring`](https://nodejs.org/docs/latest-v24.x/api/querystring.html) module's `parse()`
101
+ * method. If `false`, the `query` property on the returned URL object will be an
102
+ * unparsed, undecoded string. **Default:** `false`.
103
+ * @param slashesDenoteHost If `true`, the first token after the literal
104
+ * string `//` and preceding the next `/` will be interpreted as the `host`.
105
+ * For instance, given `//foo/bar`, the result would be
106
+ * `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
107
+ * **Default:** `false`.
83
108
  */
84
- function parse(urlString: string): UrlWithStringQuery;
85
109
  function parse(
86
110
  urlString: string,
87
- parseQueryString: false | undefined,
111
+ parseQueryString?: false,
88
112
  slashesDenoteHost?: boolean,
89
113
  ): UrlWithStringQuery;
90
114
  function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;