Update Fix

This commit is contained in:
2026-03-15 12:30:40 +01:00
parent 311ba5e7f3
commit 50be8e25f3
176 changed files with 4075 additions and 3013 deletions

2
node_modules/@types/node/README.md generated vendored
View File

@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
### Additional Details
* Last updated: Sun, 08 Feb 2026 00:09:19 GMT
* Last updated: Thu, 12 Mar 2026 15:47:58 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
# Credits

View File

@@ -253,10 +253,10 @@ declare module "node:assert" {
* import assert from 'node:assert/strict';
*
* // Using `assert()` works the same:
* assert(0);
* assert(2 + 2 > 5);;
* // AssertionError: The expression evaluated to a falsy value:
* //
* // assert(0)
* // assert(2 + 2 > 5)
* ```
* @since v0.1.21
*/

View File

@@ -228,6 +228,11 @@ declare module "node:child_process" {
/**
* The `subprocess.exitCode` property indicates the exit code of the child process.
* If the child process is still running, the field will be `null`.
*
* When the child process is terminated by a signal, `subprocess.exitCode` will be
* `null` and `subprocess.signalCode` will be set. To get the corresponding
* POSIX exit code, use
* `util.convertProcessSignalToExitCode(subprocess.signalCode)`.
*/
readonly exitCode: number | null;
/**

19
node_modules/@types/node/events.d.ts generated vendored
View File

@@ -638,24 +638,17 @@ declare module "node:events" {
*/
function getMaxListeners(emitter: EventEmitter | EventTarget): number;
/**
* A class method that returns the number of listeners for the given `eventName`
* registered on the given `emitter`.
* Returns the number of registered listeners for the event named `eventName`.
*
* ```js
* import { EventEmitter, listenerCount } from 'node:events';
* For `EventEmitter`s this behaves exactly the same as calling `.listenerCount`
* on the emitter.
*
* const myEmitter = new EventEmitter();
* myEmitter.on('event', () => {});
* myEmitter.on('event', () => {});
* console.log(listenerCount(myEmitter, 'event'));
* // Prints: 2
* ```
* For `EventTarget`s this is the only way to obtain the listener count. This can
* be useful for debugging and diagnostic purposes.
* @since v0.9.12
* @deprecated Use `emitter.listenerCount()` instead.
* @param emitter The emitter to query
* @param eventName The event name
*/
function listenerCount(emitter: EventEmitter, eventName: string | symbol): number;
function listenerCount(emitter: EventTarget, eventName: string): number;
interface OnOptions extends Abortable {
/**
* Names of events that will end the iteration.

2
node_modules/@types/node/fs.d.ts generated vendored
View File

@@ -3553,10 +3553,12 @@ declare module "node:fs" {
*/
function unwatchFile(filename: PathLike, listener?: StatsListener): void;
function unwatchFile(filename: PathLike, listener?: BigIntStatsListener): void;
type WatchIgnorePredicate = string | RegExp | ((filename: string) => boolean);
interface WatchOptions extends Abortable {
encoding?: BufferEncoding | "buffer" | undefined;
persistent?: boolean | undefined;
recursive?: boolean | undefined;
ignore?: WatchIgnorePredicate | readonly WatchIgnorePredicate[] | undefined;
}
interface WatchOptionsWithBufferEncoding extends WatchOptions {
encoding: "buffer";

23
node_modules/@types/node/http.d.ts generated vendored
View File

@@ -954,7 +954,7 @@ declare module "node:http" {
* been transmitted are equal or not.
*
* Attempting to set a header field name or value that contains invalid characters
* will result in a \[`Error`\]\[\] being thrown.
* will result in a `Error` being thrown.
* @since v0.1.30
*/
writeHead(
@@ -2136,6 +2136,27 @@ declare module "node:http" {
* @param [max=1000]
*/
function setMaxIdleHTTPParsers(max: number): void;
/**
* Dynamically resets the global configurations to enable built-in proxy support for
* `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative
* to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable.
* It can also be used to override settings configured from the environment variables.
*
* As this function resets the global configurations, any previously configured
* `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be
* overridden after this function is invoked. It's recommended to invoke it before any
* requests are made and avoid invoking it in the middle of any requests.
*
* See [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY`
* syntax.
* @since v25.4.0
* @param proxyEnv An object containing proxy configuration. This accepts the
* same options as the `proxyEnv` option accepted by {@link Agent}. **Default:**
* `process.env`.
* @returns A function that restores the original agent and dispatcher
* settings to the state before this `http.setGlobalProxyFromEnv()` is invoked.
*/
function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void;
/**
* Global instance of `Agent` which is used as the default for all HTTP client
* requests. Diverges from a default `Agent` configuration by having `keepAlive`

View File

@@ -218,6 +218,51 @@ declare module "node:inspector" {
*/
function put(url: string, data: string): void;
}
namespace DOMStorage {
/**
* This feature is only available with the
* `--experimental-storage-inspection` flag enabled.
*
* Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
* This event indicates that a new item has been added to the storage.
* @since v25.5.0
*/
function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void;
/**
* This feature is only available with the
* `--experimental-storage-inspection` flag enabled.
*
* Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
* This event indicates that an item has been removed from the storage.
* @since v25.5.0
*/
function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void;
/**
* This feature is only available with the
* `--experimental-storage-inspection` flag enabled.
* Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
* This event indicates that a storage item has been updated.
* @since v25.5.0
*/
function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void;
/**
* This feature is only available with the
* `--experimental-storage-inspection` flag enabled.
*
* Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
* frontends. This event indicates that all items have been cleared from the
* storage.
* @since v25.5.0
*/
function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void;
/**
* This feature is only available with the
* `--experimental-storage-inspection` flag enabled.
* @since v25.5.0
*/
function registerStorage(params: unknown): void;
}
}
declare module "inspector" {
export * from "node:inspector";

File diff suppressed because it is too large Load Diff

62
node_modules/@types/node/module.d.ts generated vendored
View File

@@ -383,59 +383,18 @@ declare module "node:module" {
| "module-typescript"
| "wasm";
type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
/**
* The `initialize` hook provides a way to define a custom function that runs in
* the hooks thread when the hooks module is initialized. Initialization happens
* when the hooks module is registered via {@link register}.
*
* This hook can receive data from a {@link register} invocation, including
* ports and other transferable objects. The return value of `initialize` can be a
* `Promise`, in which case it will be awaited before the main application thread
* execution resumes.
*/
type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
interface ResolveHookContext {
/**
* Export conditions of the relevant `package.json`
*/
conditions: string[];
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAttributes: ImportAttributes;
/**
* The module importing this one, or undefined if this is the Node.js entry point
*/
parentURL: string | undefined;
}
interface ResolveFnOutput {
/**
* A hint to the load hook (it might be ignored); can be an intermediary value.
*/
format?: string | null | undefined;
/**
* The import attributes to use when caching the module (optional; if excluded the input will be used)
*/
importAttributes?: ImportAttributes | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.
* @default false
*/
shortCircuit?: boolean | undefined;
/**
* The absolute URL to which this input resolves
*/
url: string;
}
/**
* The `resolve` hook chain is responsible for telling Node.js where to find and
* how to cache a given `import` statement or expression, or `require` call. It can
* optionally return a format (such as `'module'`) as a hint to the `load` hook. If
* a format is specified, the `load` hook is ultimately responsible for providing
* the final `format` value (and it is free to ignore the hint provided by
* `resolve`); if `resolve` provides a `format`, a custom `load` hook is required
* even if only to pass the value to the Node.js default `load` hook.
*/
type ResolveHook = (
specifier: string,
context: ResolveHookContext,
@@ -453,36 +412,15 @@ declare module "node:module" {
) => ResolveFnOutput,
) => ResolveFnOutput;
interface LoadHookContext {
/**
* Export conditions of the relevant `package.json`
*/
conditions: string[];
/**
* The format optionally supplied by the `resolve` hook chain (can be an intermediary value).
*/
format: string | null | undefined;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAttributes: ImportAttributes;
}
interface LoadFnOutput {
format: string | null | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.
* @default false
*/
shortCircuit?: boolean | undefined;
/**
* The source for Node.js to evaluate
*/
source?: ModuleSource | undefined;
}
/**
* The `load` hook provides a way to define a custom method of determining how a
* URL should be interpreted, retrieved, and parsed. It is also in charge of
* validating the import attributes.
*/
type LoadHook = (
url: string,
context: LoadHookContext,

8
node_modules/@types/node/net.d.ts generated vendored
View File

@@ -34,6 +34,10 @@ declare module "node:net" {
readable?: boolean | undefined;
writable?: boolean | undefined;
signal?: AbortSignal | undefined;
noDelay?: boolean | undefined;
keepAlive?: boolean | undefined;
keepAliveInitialDelay?: number | undefined;
blockList?: BlockList | undefined;
}
interface OnReadOpts {
buffer: Uint8Array | (() => Uint8Array);
@@ -52,9 +56,6 @@ declare module "node:net" {
hints?: number | undefined;
family?: number | undefined;
lookup?: LookupFunction | undefined;
noDelay?: boolean | undefined;
keepAlive?: boolean | undefined;
keepAliveInitialDelay?: number | undefined;
/**
* @since v18.13.0
*/
@@ -63,7 +64,6 @@ declare module "node:net" {
* @since v18.13.0
*/
autoSelectFamilyAttemptTimeout?: number | undefined;
blockList?: BlockList | undefined;
}
interface IpcSocketConnectOpts {
path: string;

View File

@@ -1,6 +1,6 @@
{
"name": "@types/node",
"version": "25.2.2",
"version": "25.5.0",
"description": "TypeScript definitions for node",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
"license": "MIT",
@@ -147,9 +147,9 @@
},
"scripts": {},
"dependencies": {
"undici-types": "~7.16.0"
"undici-types": "~7.18.0"
},
"peerDependencies": {},
"typesPublisherContentHash": "765ef440300302cdea004b925c35f2813d0883562f317541c7ef8e960501af28",
"typesPublisherContentHash": "4b6968335abe1dc64bd6086fd546d6e9c50f986c37d49de8073f4ed1c900057c",
"typeScriptVersion": "5.2"
}

View File

@@ -465,12 +465,7 @@ declare module "node:process" {
isTTY?: true | undefined;
}
// Alias for compatibility
interface ProcessEnv extends Dict<string> {
/**
* Can be used to change the default timezone at runtime
*/
TZ?: string | undefined;
}
interface ProcessEnv extends Dict<string> {}
interface HRTime {
/**
* This is the legacy version of {@link process.hrtime.bigint()}
@@ -734,7 +729,8 @@ declare module "node:process" {
* arguments passed when the Node.js process was launched. The first element will
* be {@link execPath}. See `process.argv0` if access to the original value
* of `argv[0]` is needed. The second element will be the path to the JavaScript
* file being executed. The remaining elements will be any additional command-line
* file being executed. If a [program entry point](https://nodejs.org/docs/latest-v25.x/api/cli.html#program-entry-point) was provided, the second element
* will be the absolute path to it. The remaining elements are additional command-line
* arguments.
*
* For example, assuming the following script for `process-args.js`:
@@ -1866,6 +1862,24 @@ declare module "node:process" {
*/
readonly release: ProcessRelease;
readonly features: ProcessFeatures;
/**
* The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
* is set on the current Node.js process. This property allows programmatic control over the
* tracing of warnings, enabling or disabling stack traces for warnings at runtime.
*
* ```js
* // Enable trace warnings
* process.traceProcessWarnings = true;
*
* // Emit a warning with a stack trace
* process.emitWarning('Warning with stack trace');
*
* // Disable trace warnings
* process.traceProcessWarnings = false;
* ```
* @since v6.10.0
*/
traceProcessWarnings: boolean;
/**
* `process.umask()` returns the Node.js process's file mode creation mask. Child
* processes inherit the mask from the parent process.

View File

@@ -44,6 +44,7 @@ declare module "node:readline" {
}
interface InterfaceEventMap {
"close": [];
"error": [error: Error];
"history": [history: string[]];
"line": [input: string];
"pause": [];

146
node_modules/@types/node/sqlite.d.ts generated vendored
View File

@@ -128,7 +128,7 @@ declare module "node:sqlite" {
* language features that allow ordinary SQL to deliberately corrupt the database file are disabled.
* The defensive flag can also be set using `enableDefensive()`.
* @since v25.1.0
* @default false
* @default true
*/
defensive?: boolean | undefined;
}
@@ -233,6 +233,28 @@ declare module "node:sqlite" {
*/
inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined;
}
interface PrepareOptions {
/**
* If `true`, integer fields are read as `BigInt`s.
* @since v25.5.0
*/
readBigInts?: boolean | undefined;
/**
* If `true`, results are returned as arrays.
* @since v25.5.0
*/
returnArrays?: boolean | undefined;
/**
* If `true`, allows binding named parameters without the prefix character.
* @since v25.5.0
*/
allowBareNamedParameters?: boolean | undefined;
/**
* If `true`, unknown named parameters are ignored.
* @since v25.5.0
*/
allowUnknownNamedParameters?: boolean | undefined;
}
/**
* This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs
* exposed by this class execute synchronously.
@@ -425,19 +447,73 @@ declare module "node:sqlite" {
* around [`sqlite3_prepare_v2()`](https://www.sqlite.org/c3ref/prepare.html).
* @since v22.5.0
* @param sql A SQL string to compile to a prepared statement.
* @param options Optional configuration for the prepared statement.
* @return The prepared statement.
*/
prepare(sql: string): StatementSync;
prepare(sql: string, options?: PrepareOptions): StatementSync;
/**
* Creates a new `SQLTagStore`, which is an LRU (Least Recently Used) cache for
* storing prepared statements. This allows for the efficient reuse of prepared
* statements by tagging them with a unique identifier.
* Creates a new {@link SQLTagStore}, which is a Least Recently Used (LRU) cache
* for storing prepared statements. This allows for the efficient reuse of
* prepared statements by tagging them with a unique identifier.
*
* When a tagged SQL literal is executed, the `SQLTagStore` checks if a prepared
* statement for that specific SQL string already exists in the cache. If it does,
* the cached statement is used. If not, a new prepared statement is created,
* executed, and then stored in the cache for future use. This mechanism helps to
* avoid the overhead of repeatedly parsing and preparing the same SQL statements.
* statement for the corresponding SQL query string already exists in the cache.
* If it does, the cached statement is used. If not, a new prepared statement is
* created, executed, and then stored in the cache for future use. This mechanism
* helps to avoid the overhead of repeatedly parsing and preparing the same SQL
* statements.
*
* Tagged statements bind the placeholder values from the template literal as
* parameters to the underlying prepared statement. For example:
*
* ```js
* sqlTagStore.get`SELECT ${value}`;
* ```
*
* is equivalent to:
*
* ```js
* db.prepare('SELECT ?').get(value);
* ```
*
* However, in the first example, the tag store will cache the underlying prepared
* statement for future use.
*
* > **Note:** The `${value}` syntax in tagged statements _binds_ a parameter to
* > the prepared statement. This differs from its behavior in _untagged_ template
* > literals, where it performs string interpolation.
* >
* > ```js
* > // This a safe example of binding a parameter to a tagged statement.
* > sqlTagStore.run`INSERT INTO t1 (id) VALUES (${id})`;
* >
* > // This is an *unsafe* example of an untagged template string.
* > // `id` is interpolated into the query text as a string.
* > // This can lead to SQL injection and data corruption.
* > db.run(`INSERT INTO t1 (id) VALUES (${id})`);
* > ```
*
* The tag store will match a statement from the cache if the query strings
* (including the positions of any bound placeholders) are identical.
*
* ```js
* // The following statements will match in the cache:
* sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
* sqlTagStore.get`SELECT * FROM t1 WHERE id = ${12345} AND active = 1`;
*
* // The following statements will not match, as the query strings
* // and bound placeholders differ:
* sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
* sqlTagStore.get`SELECT * FROM t1 WHERE id = 12345 AND active = 1`;
*
* // The following statements will not match, as matches are case-sensitive:
* sqlTagStore.get`SELECT * FROM t1 WHERE id = ${id} AND active = 1`;
* sqlTagStore.get`select * from t1 where id = ${id} and active = 1`;
* ```
*
* The only way of binding parameters in tagged statements is with the `${value}`
* syntax. Do not add parameter binding placeholders (`?` etc.) to the SQL query
* string itself.
*
* ```js
* import { DatabaseSync } from 'node:sqlite';
@@ -453,8 +529,8 @@ declare module "node:sqlite" {
* sql.run`INSERT INTO users VALUES (2, 'Bob')`;
*
* // Using the 'get' method to retrieve a single row.
* const id = 1;
* const user = sql.get`SELECT * FROM users WHERE id = ${id}`;
* const name = 'Alice';
* const user = sql.get`SELECT * FROM users WHERE name = ${name}`;
* console.log(user); // { id: 1, name: 'Alice' }
*
* // Using the 'all' method to retrieve all rows.
@@ -543,26 +619,39 @@ declare module "node:sqlite" {
* [`sqlite3session_delete()`](https://www.sqlite.org/session/sqlite3session_delete.html).
*/
close(): void;
/**
* Closes the session. If the session is already closed, does nothing.
* @since v24.9.0
*/
[Symbol.dispose](): void;
}
/**
* This class represents a single LRU (Least Recently Used) cache for storing
* prepared statements.
*
* Instances of this class are created via the database.createSQLTagStore() method,
* not by using a constructor. The store caches prepared statements based on the
* provided SQL query string. When the same query is seen again, the store
* Instances of this class are created via the `database.createTagStore()`
* method, not by using a constructor. The store caches prepared statements based
* on the provided SQL query string. When the same query is seen again, the store
* retrieves the cached statement and safely applies the new values through
* parameter binding, thereby preventing attacks like SQL injection.
*
* The cache has a maxSize that defaults to 1000 statements, but a custom size can
* be provided (e.g., database.createSQLTagStore(100)). All APIs exposed by this
* be provided (e.g., `database.createTagStore(100)`). All APIs exposed by this
* class execute synchronously.
* @since v24.9.0
*/
interface SQLTagStore {
/**
* Executes the given SQL query and returns all resulting rows as an array of objects.
* Executes the given SQL query and returns all resulting rows as an array of
* objects.
*
* This function is intended to be used as a template literal tag, not to be
* called directly.
* @since v24.9.0
* @param stringElements Template literal elements containing the SQL
* query.
* @param boundParameters Parameter values to be bound to placeholders in the template string.
* @returns An array of objects representing the rows returned by the query.
*/
all(
stringElements: TemplateStringsArray,
@@ -570,7 +659,15 @@ declare module "node:sqlite" {
): Record<string, SQLOutputValue>[];
/**
* Executes the given SQL query and returns the first resulting row as an object.
*
* This function is intended to be used as a template literal tag, not to be
* called directly.
* @since v24.9.0
* @param stringElements Template literal elements containing the SQL
* query.
* @param boundParameters Parameter values to be bound to placeholders in the template string.
* @returns An object representing the first row returned by
* the query, or `undefined` if no rows are returned.
*/
get(
stringElements: TemplateStringsArray,
@@ -578,7 +675,14 @@ declare module "node:sqlite" {
): Record<string, SQLOutputValue> | undefined;
/**
* Executes the given SQL query and returns an iterator over the resulting rows.
*
* This function is intended to be used as a template literal tag, not to be
* called directly.
* @since v24.9.0
* @param stringElements Template literal elements containing the SQL
* query.
* @param boundParameters Parameter values to be bound to placeholders in the template string.
* @returns An iterator that yields objects representing the rows returned by the query.
*/
iterate(
stringElements: TemplateStringsArray,
@@ -586,15 +690,21 @@ declare module "node:sqlite" {
): NodeJS.Iterator<Record<string, SQLOutputValue>>;
/**
* Executes the given SQL query, which is expected to not return any rows (e.g., INSERT, UPDATE, DELETE).
*
* This function is intended to be used as a template literal tag, not to be
* called directly.
* @since v24.9.0
* @param stringElements Template literal elements containing the SQL
* query.
* @param boundParameters Parameter values to be bound to placeholders in the template string.
* @returns An object containing information about the execution, including `changes` and `lastInsertRowid`.
*/
run(stringElements: TemplateStringsArray, ...boundParameters: SQLInputValue[]): StatementResultingChanges;
/**
* A read-only property that returns the number of prepared statements currently in the cache.
* @since v24.9.0
* @returns The maximum number of prepared statements the cache can hold.
*/
size(): number;
readonly size: number;
/**
* A read-only property that returns the maximum number of prepared statements the cache can hold.
* @since v24.9.0

20
node_modules/@types/node/stream.d.ts generated vendored
View File

@@ -81,6 +81,7 @@ declare module "node:stream" {
interface ArrayOptions extends ReadableOperatorOptions {}
interface ReadableToWebOptions {
strategy?: web.QueuingStrategy | undefined;
type?: web.ReadableStreamType | undefined;
}
interface ReadableEventMap {
"close": [];
@@ -485,13 +486,18 @@ declare module "node:stream" {
* }
* }
*
* const wordsStream = Readable.from(['this is', 'compose as operator']).compose(splitToWords);
* const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords);
* const words = await wordsStream.toArray();
*
* console.log(words); // prints ['this', 'is', 'compose', 'as', 'operator']
* console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream']
* ```
*
* See [`stream.compose`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information.
* `readable.compose(s)` is equivalent to `stream.compose(readable, s)`.
*
* This method also allows for an `AbortSignal` to be provided, which will destroy
* the composed stream when aborted.
*
* See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information.
* @since v19.1.0, v18.13.0
* @returns a stream composed with the stream `stream`.
*/
@@ -1056,6 +1062,9 @@ declare module "node:stream" {
writableHighWaterMark?: number | undefined;
writableCorked?: number | undefined;
}
interface DuplexToWebOptions {
type?: web.ReadableStreamType | undefined;
}
interface DuplexEventMap extends ReadableEventMap, WritableEventMap {}
/**
* Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
@@ -1109,7 +1118,7 @@ declare module "node:stream" {
* A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
* @since v17.0.0
*/
static toWeb(streamDuplex: NodeJS.ReadWriteStream): web.ReadableWritablePair;
static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair;
/**
* A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
* @since v17.0.0
@@ -1653,7 +1662,8 @@ declare module "node:stream" {
* console.log(res); // prints 'HELLOWORLD'
* ```
*
* See [`readable.compose(stream)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readablecomposestream-options) for `stream.compose` as operator.
* For convenience, the `readable.compose(stream)` method is available on
* `Readable` and `Duplex` streams as a wrapper for this function.
* @since v16.9.0
* @experimental
*/

76
node_modules/@types/node/test.d.ts generated vendored
View File

@@ -82,6 +82,7 @@ declare module "node:test" {
import { AssertMethodNames } from "node:assert";
import { Readable, ReadableEventMap } from "node:stream";
import { TestEvent } from "node:test/reporters";
import { URL } from "node:url";
import TestFn = test.TestFn;
import TestOptions = test.TestOptions;
/**
@@ -190,6 +191,11 @@ declare module "node:test" {
function only(name?: string, fn?: SuiteFn): Promise<void>;
function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
function only(fn?: SuiteFn): Promise<void>;
// added in v25.5.0, undocumented
function expectFailure(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
function expectFailure(name?: string, fn?: SuiteFn): Promise<void>;
function expectFailure(options?: TestOptions, fn?: SuiteFn): Promise<void>;
function expectFailure(fn?: SuiteFn): Promise<void>;
}
/**
* Shorthand for skipping a test. This is the same as calling {@link test} with `options.skip` set to `true`.
@@ -215,6 +221,11 @@ declare module "node:test" {
function only(name?: string, fn?: TestFn): Promise<void>;
function only(options?: TestOptions, fn?: TestFn): Promise<void>;
function only(fn?: TestFn): Promise<void>;
// added in v25.5.0, undocumented
function expectFailure(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
function expectFailure(name?: string, fn?: TestFn): Promise<void>;
function expectFailure(options?: TestOptions, fn?: TestFn): Promise<void>;
function expectFailure(fn?: TestFn): Promise<void>;
/**
* The type of a function passed to {@link test}. The first argument to this function is a {@link TestContext} object.
* If the test uses callbacks, the callback function is passed as the second argument.
@@ -236,7 +247,7 @@ declare module "node:test" {
}
interface RunOptions {
/**
* If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file.
* If a number is provided, then that many tests would run asynchronously (they are still managed by the single-threaded event loop).
* If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time.
* @default false
*/
@@ -479,7 +490,7 @@ declare module "node:test" {
}
namespace EventData {
interface Error extends globalThis.Error {
cause: globalThis.Error;
cause: unknown;
}
interface LocationInfo {
/**
@@ -968,7 +979,6 @@ declare module "node:test" {
* @since v22.2.0, v20.15.0
*/
readonly assert: TestContextAssert;
readonly attempt: number;
/**
* This function is used to create a hook running before subtest of the current test.
* @param fn The hook function. The first argument to this function is a `TestContext` object.
@@ -1031,6 +1041,21 @@ declare module "node:test" {
* @since v18.8.0, v16.18.0
*/
readonly name: string;
/**
* Indicated whether the test succeeded.
* @since v21.7.0, v20.12.0
*/
readonly passed: boolean;
/**
* The failure reason for the test/case; wrapped and available via `context.error.cause`.
* @since v21.7.0, v20.12.0
*/
readonly error: EventData.Error | null;
/**
* Number of times the test has been attempted.
* @since v21.7.0, v20.12.0
*/
readonly attempt: number;
/**
* This function is used to set the number of assertions and subtests that are expected to run
* within the test. If the number of assertions and subtests that run does not match the
@@ -1285,6 +1310,11 @@ declare module "node:test" {
* @since v22.6.0
*/
readonly filePath: string | undefined;
/**
* The name of the suite and each of its ancestors, separated by `>`.
* @since v22.3.0, v20.16.0
*/
readonly fullName: string;
/**
* The name of the suite.
* @since v18.8.0, v16.18.0
@@ -1344,6 +1374,8 @@ declare module "node:test" {
* @since v22.2.0
*/
plan?: number | undefined;
// added in v25.5.0, undocumented
expectFailure?: boolean | undefined;
}
/**
* This function creates a hook that runs before executing a suite.
@@ -1352,7 +1384,7 @@ declare module "node:test" {
* describe('tests', async () => {
* before(() => console.log('about to run some test'));
* it('is a subtest', () => {
* assert.ok('some relevant assertion here');
* // Some relevant assertion here
* });
* });
* ```
@@ -1368,7 +1400,7 @@ declare module "node:test" {
* describe('tests', async () => {
* after(() => console.log('finished running tests'));
* it('is a subtest', () => {
* assert.ok('some relevant assertion here');
* // Some relevant assertion here
* });
* });
* ```
@@ -1384,7 +1416,7 @@ declare module "node:test" {
* describe('tests', async () => {
* beforeEach(() => console.log('about to run a test'));
* it('is a subtest', () => {
* assert.ok('some relevant assertion here');
* // Some relevant assertion here
* });
* });
* ```
@@ -1401,7 +1433,7 @@ declare module "node:test" {
* describe('tests', async () => {
* afterEach(() => console.log('finished running a test'));
* it('is a subtest', () => {
* assert.ok('some relevant assertion here');
* // Some relevant assertion here
* });
* });
* ```
@@ -1692,7 +1724,7 @@ declare module "node:test" {
* @param specifier A string identifying the module to mock.
* @param options Optional configuration options for the mock module.
*/
module(specifier: string, options?: MockModuleOptions): MockModuleContext;
module(specifier: string | URL, options?: MockModuleOptions): MockModuleContext;
/**
* Creates a mock for a property value on an object. This allows you to track and control access to a specific property,
* including how many times it is read (getter) or written (setter), and to restore the original value after mocking.
@@ -2033,24 +2065,28 @@ declare module "node:test" {
*/
enable(options?: MockTimersOptions): void;
/**
* You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer.
* Note: This method will execute any mocked timers that are in the past from the new time.
* In the below example we are setting a new time for the mocked date.
* Sets the current Unix timestamp that will be used as reference for any mocked
* `Date` objects.
*
* ```js
* import assert from 'node:assert';
* import { test } from 'node:test';
* test('sets the time of a date object', (context) => {
* // Optionally choose what to mock
* context.mock.timers.enable({ apis: ['Date'], now: 100 });
* assert.strictEqual(Date.now(), 100);
* // Advance in time will also advance the date
* context.mock.timers.setTime(1000);
* context.mock.timers.tick(200);
* assert.strictEqual(Date.now(), 1200);
*
* test('runAll functions following the given order', (context) => {
* const now = Date.now();
* const setTime = 1000;
* // Date.now is not mocked
* assert.deepStrictEqual(Date.now(), now);
*
* context.mock.timers.enable({ apis: ['Date'] });
* context.mock.timers.setTime(setTime);
* // Date.now is now 1000
* assert.strictEqual(Date.now(), setTime);
* });
* ```
* @since v21.2.0, v20.11.0
*/
setTime(time: number): void;
setTime(milliseconds: number): void;
/**
* This function restores the default behavior of all mocks that were previously
* created by this `MockTimers` instance and disassociates the mocks

23
node_modules/@types/node/tls.d.ts generated vendored
View File

@@ -15,31 +15,31 @@ declare module "node:tls" {
import * as stream from "stream";
const CLIENT_RENEG_LIMIT: number;
const CLIENT_RENEG_WINDOW: number;
interface Certificate {
interface Certificate extends NodeJS.Dict<string | string[]> {
/**
* Country code.
*/
C: string;
C?: string | string[];
/**
* Street.
*/
ST: string;
ST?: string | string[];
/**
* Locality.
*/
L: string;
L?: string | string[];
/**
* Organization.
*/
O: string;
O?: string | string[];
/**
* Organizational unit.
*/
OU: string;
OU?: string | string[];
/**
* Common name.
*/
CN: string;
CN?: string | string[];
}
interface PeerCertificate {
/**
@@ -210,6 +210,7 @@ declare module "node:tls" {
interface TLSSocketEventMap extends net.SocketEventMap {
"keylog": [line: NonSharedBuffer];
"OCSPResponse": [response: NonSharedBuffer];
"secure": [];
"secureConnect": [];
"session": [session: NonSharedBuffer];
}
@@ -551,8 +552,12 @@ declare module "node:tls" {
*/
requestCert?: boolean | undefined;
/**
* An array of strings or a Buffer naming possible ALPN protocols.
* (Protocols should be ordered by their priority.)
* An array of strings, or a single `Buffer`, `TypedArray`, or `DataView` containing the supported
* ALPN protocols. Buffers should have the format `[len][name][len][name]...`
* e.g. `'\x08http/1.1\x08http/1.0'`, where the `len` byte is the length of the
* next protocol name. Passing an array is usually much simpler, e.g.
* `['http/1.1', 'http/1.0']`. Protocols earlier in the list have higher
* preference than those later.
*/
ALPNProtocols?: readonly string[] | NodeJS.ArrayBufferView | undefined;
/**

22
node_modules/@types/node/url.d.ts generated vendored
View File

@@ -334,6 +334,19 @@ declare module "node:url" {
* new URL('file:///hello world').pathname; // Incorrect: /hello%20world
* fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
* ```
*
* **Security Considerations:**
*
* This function decodes percent-encoded characters, including encoded dot-segments
* (`%2e` as `.` and `%2e%2e` as `..`), and then normalizes the resulting path.
* This means that encoded directory traversal sequences (such as `%2e%2e`) are
* decoded and processed as actual path traversal, even though encoded slashes
* (`%2F`, `%5C`) are correctly rejected.
*
* **Applications must not rely on `fileURLToPath()` alone to prevent directory
* traversal attacks.** Always perform explicit path validation and security checks
* on the returned path value to ensure it remains within expected boundaries
* before using it for file system operations.
* @since v10.12.0
* @param url The file URL string or URL object to convert to a path.
* @return The fully-resolved platform-specific Node.js file path.
@@ -344,6 +357,15 @@ declare module "node:url" {
* representation of the path, a `Buffer` is returned. This conversion is
* helpful when the input URL contains percent-encoded segments that are
* not valid UTF-8 / Unicode sequences.
*
* **Security Considerations:**
*
* This function has the same security considerations as `url.fileURLToPath()`.
* It decodes percent-encoded characters, including encoded dot-segments
* (`%2e` as `.` and `%2e%2e` as `..`), and normalizes the path. **Applications
* must not rely on this function alone to prevent directory traversal attacks.**
* Always perform explicit path validation on the returned buffer value before
* using it for file system operations.
* @since v24.3.0
* @param url The file URL string or URL object to convert to a path.
* @returns The fully-resolved platform-specific Node.js file path

29
node_modules/@types/node/util.d.ts generated vendored
View File

@@ -308,6 +308,9 @@ declare module "node:util" {
* Returns an array of call site objects containing the stack of
* the caller function.
*
* Unlike accessing an `error.stack`, the result returned from this API is not
* interfered with `Error.prepareStackTrace`.
*
* ```js
* import { getCallSites } from 'node:util';
*
@@ -320,7 +323,7 @@ declare module "node:util" {
* console.log(`Function Name: ${callSite.functionName}`);
* console.log(`Script Name: ${callSite.scriptName}`);
* console.log(`Line Number: ${callSite.lineNumber}`);
* console.log(`Column Number: ${callSite.column}`);
* console.log(`Column Number: ${callSite.columnNumber}`);
* });
* // CallSite 1:
* // Function Name: exampleFunction
@@ -750,6 +753,28 @@ declare module "node:util" {
* @legacy Use ES2015 class syntax and `extends` keyword instead.
*/
export function inherits(constructor: unknown, superConstructor: unknown): void;
/**
* The `util.convertProcessSignalToExitCode()` method converts a signal name to its
* corresponding POSIX exit code. Following the POSIX standard, the exit code
* for a process terminated by a signal is calculated as `128 + signal number`.
*
* If `signal` is not a valid signal name, then an error will be thrown. See
* [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for a list of valid signals.
*
* ```js
* import { convertProcessSignalToExitCode } from 'node:util';
*
* console.log(convertProcessSignalToExitCode('SIGTERM')); // 143 (128 + 15)
* console.log(convertProcessSignalToExitCode('SIGKILL')); // 137 (128 + 9)
* ```
*
* This is particularly useful when working with processes to determine
* the exit code based on the signal that terminated the process.
* @since v25.4.0
* @param signal A signal name (e.g. `'SIGTERM'`)
* @returns The exit code corresponding to `signal`
*/
export function convertProcessSignalToExitCode(signal: NodeJS.Signals): number;
export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
export interface DebugLogger extends DebugLoggerFunction {
/**
@@ -804,7 +829,7 @@ declare module "node:util" {
*
* ```js
* import { debuglog } from 'node:util';
* const log = debuglog('foo');
* const log = debuglog('foo-bar');
*
* log('hi there, it\'s foo-bar [%d]', 2333);
* ```

13
node_modules/@types/node/v8.d.ts generated vendored
View File

@@ -95,7 +95,7 @@ declare module "node:v8" {
* buffers and external strings.
*
* `total_allocated_bytes` The value of total allocated bytes since the Isolate
* creation
* creation.
*
* ```js
* {
@@ -112,7 +112,8 @@ declare module "node:v8" {
* number_of_detached_contexts: 0,
* total_global_handles_size: 8192,
* used_global_handles_size: 3296,
* external_memory: 318824
* external_memory: 318824,
* total_allocated_bytes: 45224088
* }
* ```
* @since v1.0.0
@@ -308,7 +309,6 @@ declare module "node:v8" {
* ```
* @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap.
* @since v20.13.0
* @experimental
*/
function queryObjects(ctor: Function): number | string[];
function queryObjects(ctor: Function, options: { format: "count" }): number;
@@ -463,7 +463,7 @@ declare module "node:v8" {
* ```
* @since v25.0.0
*/
function startCPUProfile(): SyncCPUProfileHandle;
function startCpuProfile(): SyncCPUProfileHandle;
/**
* V8 only supports `Latin-1/ISO-8859-1` and `UTF16` as the underlying representation of a string.
* If the `content` uses `Latin-1/ISO-8859-1` as the underlying representation, this function will return true;
@@ -737,6 +737,11 @@ declare module "node:v8" {
* @since v19.6.0, v18.15.0
*/
stop(): GCProfilerResult;
/**
* Stop collecting GC data, and discard the profile.
* @since v25.5.0
*/
[Symbol.dispose](): void;
}
interface GCProfilerResult {
version: number;

View File

@@ -33,8 +33,8 @@
* workerData: script,
* });
* worker.on('message', resolve);
* worker.on('error', reject);
* worker.on('exit', (code) => {
* worker.once('error', reject);
* worker.once('exit', (code) => {
* if (code !== 0)
* reject(new Error(`Worker stopped with exit code ${code}`));
* });

72
node_modules/@types/node/zlib.d.ts generated vendored
View File

@@ -108,10 +108,14 @@ declare module "node:zlib" {
*/
chunkSize?: number | undefined;
windowBits?: number | undefined;
level?: number | undefined; // compression only
memLevel?: number | undefined; // compression only
strategy?: number | undefined; // compression only
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
/** compression only */
level?: number | undefined;
/** compression only */
memLevel?: number | undefined;
/** compression only */
strategy?: number | undefined;
/** deflate/inflate only, empty dictionary by default */
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined;
/**
* If `true`, returns an object with `buffer` and `engine`.
*/
@@ -201,24 +205,84 @@ declare module "node:zlib" {
interface ZlibReset {
reset(): void;
}
/**
* @since v10.16.0
*/
class BrotliCompress extends stream.Transform {
constructor(options?: BrotliOptions);
}
interface BrotliCompress extends stream.Transform, Zlib {}
/**
* @since v10.16.0
*/
class BrotliDecompress extends stream.Transform {
constructor(options?: BrotliOptions);
}
interface BrotliDecompress extends stream.Transform, Zlib {}
/**
* @since v0.5.8
*/
class Gzip extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Gzip extends stream.Transform, Zlib {}
/**
* @since v0.5.8
*/
class Gunzip extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Gunzip extends stream.Transform, Zlib {}
/**
* @since v0.5.8
*/
class Deflate extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
/**
* @since v0.5.8
*/
class Inflate extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Inflate extends stream.Transform, Zlib, ZlibReset {}
/**
* @since v0.5.8
*/
class DeflateRaw extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
/**
* @since v0.5.8
*/
class InflateRaw extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
/**
* @since v0.5.8
*/
class Unzip extends stream.Transform {
constructor(options?: ZlibOptions);
}
interface Unzip extends stream.Transform, Zlib {}
/**
* @since v22.15.0
* @experimental
*/
class ZstdCompress extends stream.Transform {
constructor(options?: ZstdOptions);
}
interface ZstdCompress extends stream.Transform, Zlib {}
/**
* @since v22.15.0
* @experimental
*/
class ZstdDecompress extends stream.Transform {
constructor(options?: ZstdOptions);
}
interface ZstdDecompress extends stream.Transform, Zlib {}
/**
* Computes a 32-bit [Cyclic Redundancy Check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) checksum of `data`.