You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
2315
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node - npm Package Compare versions

Comparing version
24.2.1
to
24.3.0
+19
-26
node/fs/promises.d.ts

@@ -43,3 +43,3 @@ /**

WatchEventType,
WatchOptions,
WatchOptions as _WatchOptions,
WriteStream,

@@ -1186,2 +1186,12 @@ WriteVResult,

function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
interface WatchOptions extends _WatchOptions {
maxQueue?: number | undefined;
overflow?: "ignore" | "throw" | undefined;
}
interface WatchOptionsWithBufferEncoding extends WatchOptions {
encoding: "buffer";
}
interface WatchOptionsWithStringEncoding extends WatchOptions {
encoding?: BufferEncoding | undefined;
}
/**

@@ -1219,29 +1229,12 @@ * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.

filename: PathLike,
options:
| (WatchOptions & {
encoding: "buffer";
})
| "buffer",
): AsyncIterable<FileChangeInfo<Buffer>>;
/**
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
*/
function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
/**
* Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
* @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
* @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
* If `encoding` is not supplied, the default of `'utf8'` is used.
* If `persistent` is not supplied, the default of `true` is used.
* If `recursive` is not supplied, the default of `false` is used.
*/
options?: WatchOptionsWithStringEncoding | BufferEncoding,
): NodeJS.AsyncIterator<FileChangeInfo<string>>;
function watch(
filename: PathLike,
options: WatchOptions | string,
): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
options: WatchOptionsWithBufferEncoding | "buffer",
): NodeJS.AsyncIterator<FileChangeInfo<Buffer>>;
function watch(
filename: PathLike,
options: WatchOptions | BufferEncoding | "buffer",
): NodeJS.AsyncIterator<FileChangeInfo<string | Buffer>>;
/**

@@ -1248,0 +1241,0 @@ * Asynchronously copies the entire directory structure from `src` to `dest`,

{
"name": "@types/node",
"version": "24.2.1",
"version": "24.3.0",
"description": "TypeScript definitions for node",

@@ -153,4 +153,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

"peerDependencies": {},
"typesPublisherContentHash": "c642826dc621e8df9fa43f5471ad2dd77883f4fff1a3c22d8d18322f596ed09d",
"typesPublisherContentHash": "1db0510763ba3afd8e54c0591e60a100a7b90926f5d7da28ae32d8f845d725da",
"typeScriptVersion": "5.2"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 08 Aug 2025 16:38:49 GMT
* Last updated: Fri, 15 Aug 2025 08:39:32 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

@@ -14,0 +14,0 @@

@@ -319,2 +319,13 @@ /**

/**
* Like `url.fileURLToPath(...)` except that instead of returning a string
* 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.
* @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
* as a `Buffer`.
*/
function fileURLToPathBuffer(url: string | URL, options?: FileUrlToPathOptions): Buffer;
/**
* This function ensures that `path` is resolved absolutely, and that the URL

@@ -321,0 +332,0 @@ * control characters are correctly encoded when converting into a File URL.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display