@types/node 24.9.1 → 24.10.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.
Potentially problematic release.
This version of @types/node might be problematic. Click here for more details.
- node/README.md +1 -1
- node/console.d.ts +3 -2
- node/package.json +2 -2
- node/process.d.ts +4 -4
- node/sqlite.d.ts +107 -0
- node/url.d.ts +32 -8
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:
|
|
11
|
+
* Last updated: Mon, 03 Nov 2025 01:29:59 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
|
-
*
|
|
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.
|
|
3
|
+
"version": "24.10.0",
|
|
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": "
|
|
153
|
+
"typesPublisherContentHash": "520eb7d36290a7656940213fbf34026408b9af9ff538455bf669b4ea7a21d5bf",
|
|
154
154
|
"typeScriptVersion": "5.2"
|
|
155
155
|
}
|
node/process.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module "process" {
|
|
2
|
-
import { Control, MessageOptions } from "node:child_process";
|
|
2
|
+
import { Control, MessageOptions, SendHandle } from "node:child_process";
|
|
3
3
|
import { PathLike } from "node:fs";
|
|
4
4
|
import * as tty from "node:tty";
|
|
5
5
|
import { Worker } from "node:worker_threads";
|
|
@@ -332,7 +332,7 @@ declare module "process" {
|
|
|
332
332
|
*/
|
|
333
333
|
type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
|
|
334
334
|
type WarningListener = (warning: Error) => void;
|
|
335
|
-
type MessageListener = (message: unknown, sendHandle:
|
|
335
|
+
type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
|
|
336
336
|
type SignalsListener = (signal: Signals) => void;
|
|
337
337
|
type MultipleResolveListener = (
|
|
338
338
|
type: MultipleResolveType,
|
|
@@ -1776,7 +1776,7 @@ declare module "process" {
|
|
|
1776
1776
|
*/
|
|
1777
1777
|
send?(
|
|
1778
1778
|
message: any,
|
|
1779
|
-
sendHandle?:
|
|
1779
|
+
sendHandle?: SendHandle,
|
|
1780
1780
|
options?: MessageOptions,
|
|
1781
1781
|
callback?: (error: Error | null) => void,
|
|
1782
1782
|
): boolean;
|
|
@@ -1980,7 +1980,7 @@ declare module "process" {
|
|
|
1980
1980
|
emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
|
|
1981
1981
|
emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
|
|
1982
1982
|
emit(event: "warning", warning: Error): boolean;
|
|
1983
|
-
emit(event: "message", message: unknown, sendHandle:
|
|
1983
|
+
emit(event: "message", message: unknown, sendHandle: SendHandle): this;
|
|
1984
1984
|
emit(event: Signals, signal?: Signals): boolean;
|
|
1985
1985
|
emit(
|
|
1986
1986
|
event: "multipleResolves",
|
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)
|
|
75
|
-
*
|
|
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
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
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
|
|
111
|
+
parseQueryString?: false,
|
|
88
112
|
slashesDenoteHost?: boolean,
|
|
89
113
|
): UrlWithStringQuery;
|
|
90
114
|
function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|