cdk-common 2.0.1202 → 2.0.1203
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/.jsii +2 -2
- package/lib/main.js +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +1 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +15 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +17 -17
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +35 -28
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +16 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +1 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +16 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +28 -19
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +7 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +6 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +7 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +3 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +63 -29
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +2 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +8 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +8 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +21 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +0 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +13 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +14 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +182 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +8 -19
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +53 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +2 -48
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +6 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.1/index.d.ts +98 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +9 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +96 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +52 -19
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +16 -295
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +29 -32
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +17 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +34 -18
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +5 -7
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/agent.d.ts +7 -7
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/api.d.ts +24 -24
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/balanced-pool.d.ts +11 -11
- package/node_modules/@types/concat-stream/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/client.d.ts +12 -13
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cookies.d.ts +2 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/diagnostics-channel.d.ts +10 -10
- package/node_modules/@types/concat-stream/node_modules/undici-types/dispatcher.d.ts +281 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/env-http-proxy-agent.d.ts +2 -2
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/errors.d.ts +69 -47
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/fetch.d.ts +17 -16
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/formdata.d.ts +7 -7
- package/node_modules/@types/concat-stream/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/h2c-client.d.ts +75 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/handlers.d.ts +7 -7
- package/node_modules/@types/concat-stream/node_modules/undici-types/header.d.ts +160 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/index.d.ts +75 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +34 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-agent.d.ts +33 -18
- package/node_modules/@types/concat-stream/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-client.d.ts +4 -4
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-errors.d.ts +3 -3
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-interceptor.d.ts +19 -19
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/mock-pool.d.ts +4 -4
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/package.json +1 -1
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/patch.d.ts +0 -4
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool-stats.d.ts +8 -8
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/pool.d.ts +12 -12
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/proxy-agent.d.ts +4 -4
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/readable.d.ts +18 -15
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-agent.d.ts +1 -1
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/retry-handler.d.ts +10 -10
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/util.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/webidl.d.ts +44 -6
- package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/websocket.d.ts +35 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +26 -6
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +1 -2
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +15 -15
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +17 -17
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +35 -28
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +16 -16
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +1 -2
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +16 -9
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +28 -19
- package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +7 -6
- package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +6 -3
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +7 -5
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +3 -7
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +63 -29
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +2 -5
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +8 -7
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +13 -3
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +8 -8
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +21 -11
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +0 -1
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +13 -13
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +14 -16
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +182 -2
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +8 -19
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +53 -15
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +2 -48
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +6 -6
- package/node_modules/@types/form-data/node_modules/@types/node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.1/index.d.ts +98 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +9 -5
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +96 -0
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +52 -19
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +16 -295
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +29 -32
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +17 -10
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +34 -18
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +5 -7
- package/node_modules/@types/form-data/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/@types/form-data/node_modules/undici-types/README.md +6 -0
- package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/@types/form-data/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/@types/form-data/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/node_modules/@types/form-data/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- package/node_modules/@types/form-data/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +107 -0
- package/node_modules/@types/form-data/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/@types/form-data/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/@types/form-data/node_modules/undici-types/cookies.d.ts +30 -0
- package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +281 -0
- package/node_modules/@types/form-data/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +171 -0
- package/node_modules/@types/form-data/node_modules/undici-types/eventsource.d.ts +61 -0
- package/node_modules/@types/form-data/node_modules/undici-types/fetch.d.ts +210 -0
- package/node_modules/@types/form-data/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/@types/form-data/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/undici-types/h2c-client.d.ts +75 -0
- package/node_modules/@types/form-data/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/@types/form-data/node_modules/undici-types/header.d.ts +160 -0
- package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +75 -0
- package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +34 -0
- package/node_modules/@types/form-data/node_modules/undici-types/mock-agent.d.ts +65 -0
- package/node_modules/@types/form-data/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/@types/form-data/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/@types/form-data/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/@types/form-data/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/@types/form-data/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +55 -0
- package/node_modules/@types/form-data/node_modules/undici-types/patch.d.ts +29 -0
- package/node_modules/@types/form-data/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/@types/form-data/node_modules/undici-types/pool.d.ts +39 -0
- package/node_modules/@types/form-data/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/node_modules/@types/form-data/node_modules/undici-types/readable.d.ts +68 -0
- package/node_modules/@types/form-data/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/node_modules/@types/form-data/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/@types/form-data/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +266 -0
- package/node_modules/@types/form-data/node_modules/undici-types/websocket.d.ts +184 -0
- package/package.json +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/@types/form-data/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
- package/node_modules/undici-types/dispatcher.d.ts +0 -256
- package/node_modules/undici-types/file.d.ts +0 -39
- package/node_modules/undici-types/filereader.d.ts +0 -54
- package/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/undici-types/header.d.ts +0 -4
- package/node_modules/undici-types/index.d.ts +0 -71
- package/node_modules/undici-types/interceptors.d.ts +0 -17
- /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/LICENSE +0 -0
- /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/README.md +0 -0
- /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/cache.d.ts +0 -0
- /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/connector.d.ts +0 -0
- /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/content-type.d.ts +0 -0
- /package/node_modules/{undici-types → @types/concat-stream/node_modules/undici-types}/eventsource.d.ts +0 -0
|
@@ -259,7 +259,6 @@ declare module "fs/promises" {
|
|
|
259
259
|
* While the `ReadableStream` will read the file to completion, it will not
|
|
260
260
|
* close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
|
|
261
261
|
* @since v17.0.0
|
|
262
|
-
* @experimental
|
|
263
262
|
*/
|
|
264
263
|
readableWebStream(): ReadableStream;
|
|
265
264
|
/**
|
|
@@ -1251,20 +1250,28 @@ declare module "fs/promises" {
|
|
|
1251
1250
|
*/
|
|
1252
1251
|
function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
|
|
1253
1252
|
/**
|
|
1254
|
-
*
|
|
1253
|
+
* ```js
|
|
1254
|
+
* import { glob } from 'node:fs/promises';
|
|
1255
|
+
*
|
|
1256
|
+
* for await (const entry of glob('*.js'))
|
|
1257
|
+
* console.log(entry);
|
|
1258
|
+
* ```
|
|
1259
|
+
* @since v22.0.0
|
|
1260
|
+
* @returns An AsyncIterator that yields the paths of files
|
|
1261
|
+
* that match the pattern.
|
|
1255
1262
|
*/
|
|
1256
|
-
function glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
|
|
1263
|
+
function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
|
|
1257
1264
|
function glob(
|
|
1258
|
-
pattern: string | string[],
|
|
1259
|
-
|
|
1265
|
+
pattern: string | readonly string[],
|
|
1266
|
+
options: GlobOptionsWithFileTypes,
|
|
1260
1267
|
): NodeJS.AsyncIterator<Dirent>;
|
|
1261
1268
|
function glob(
|
|
1262
|
-
pattern: string | string[],
|
|
1263
|
-
|
|
1269
|
+
pattern: string | readonly string[],
|
|
1270
|
+
options: GlobOptionsWithoutFileTypes,
|
|
1264
1271
|
): NodeJS.AsyncIterator<string>;
|
|
1265
1272
|
function glob(
|
|
1266
|
-
pattern: string | string[],
|
|
1267
|
-
|
|
1273
|
+
pattern: string | readonly string[],
|
|
1274
|
+
options: GlobOptions,
|
|
1268
1275
|
): NodeJS.AsyncIterator<Dirent | string>;
|
|
1269
1276
|
}
|
|
1270
1277
|
declare module "node:fs/promises" {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* All file system operations have synchronous, callback, and promise-based
|
|
18
18
|
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
19
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/fs.js)
|
|
20
20
|
*/
|
|
21
21
|
declare module "fs" {
|
|
22
22
|
import * as stream from "node:stream";
|
|
@@ -243,16 +243,10 @@ declare module "fs" {
|
|
|
243
243
|
*/
|
|
244
244
|
name: Name;
|
|
245
245
|
/**
|
|
246
|
-
* The
|
|
247
|
-
* @since v20.12.0
|
|
246
|
+
* The path to the parent directory of the file this `fs.Dirent` object refers to.
|
|
247
|
+
* @since v20.12.0, v18.20.0
|
|
248
248
|
*/
|
|
249
249
|
parentPath: string;
|
|
250
|
-
/**
|
|
251
|
-
* Alias for `dirent.parentPath`.
|
|
252
|
-
* @since v20.1.0
|
|
253
|
-
* @deprecated Since v20.12.0
|
|
254
|
-
*/
|
|
255
|
-
path: string;
|
|
256
250
|
}
|
|
257
251
|
/**
|
|
258
252
|
* A class representing a directory stream.
|
|
@@ -4200,7 +4194,6 @@ declare module "fs" {
|
|
|
4200
4194
|
* blob.stream();
|
|
4201
4195
|
* ```
|
|
4202
4196
|
* @since v19.8.0
|
|
4203
|
-
* @experimental
|
|
4204
4197
|
*/
|
|
4205
4198
|
export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
|
|
4206
4199
|
|
|
@@ -4386,13 +4379,23 @@ declare module "fs" {
|
|
|
4386
4379
|
|
|
4387
4380
|
/**
|
|
4388
4381
|
* Retrieves the files matching the specified pattern.
|
|
4382
|
+
*
|
|
4383
|
+
* ```js
|
|
4384
|
+
* import { glob } from 'node:fs';
|
|
4385
|
+
*
|
|
4386
|
+
* glob('*.js', (err, matches) => {
|
|
4387
|
+
* if (err) throw err;
|
|
4388
|
+
* console.log(matches);
|
|
4389
|
+
* });
|
|
4390
|
+
* ```
|
|
4391
|
+
* @since v22.0.0
|
|
4389
4392
|
*/
|
|
4390
4393
|
export function glob(
|
|
4391
|
-
pattern: string | string[],
|
|
4394
|
+
pattern: string | readonly string[],
|
|
4392
4395
|
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
|
4393
4396
|
): void;
|
|
4394
4397
|
export function glob(
|
|
4395
|
-
pattern: string | string[],
|
|
4398
|
+
pattern: string | readonly string[],
|
|
4396
4399
|
options: GlobOptionsWithFileTypes,
|
|
4397
4400
|
callback: (
|
|
4398
4401
|
err: NodeJS.ErrnoException | null,
|
|
@@ -4400,7 +4403,7 @@ declare module "fs" {
|
|
|
4400
4403
|
) => void,
|
|
4401
4404
|
): void;
|
|
4402
4405
|
export function glob(
|
|
4403
|
-
pattern: string | string[],
|
|
4406
|
+
pattern: string | readonly string[],
|
|
4404
4407
|
options: GlobOptionsWithoutFileTypes,
|
|
4405
4408
|
callback: (
|
|
4406
4409
|
err: NodeJS.ErrnoException | null,
|
|
@@ -4408,7 +4411,7 @@ declare module "fs" {
|
|
|
4408
4411
|
) => void,
|
|
4409
4412
|
): void;
|
|
4410
4413
|
export function glob(
|
|
4411
|
-
pattern: string | string[],
|
|
4414
|
+
pattern: string | readonly string[],
|
|
4412
4415
|
options: GlobOptions,
|
|
4413
4416
|
callback: (
|
|
4414
4417
|
err: NodeJS.ErrnoException | null,
|
|
@@ -4416,19 +4419,25 @@ declare module "fs" {
|
|
|
4416
4419
|
) => void,
|
|
4417
4420
|
): void;
|
|
4418
4421
|
/**
|
|
4419
|
-
*
|
|
4422
|
+
* ```js
|
|
4423
|
+
* import { globSync } from 'node:fs';
|
|
4424
|
+
*
|
|
4425
|
+
* console.log(globSync('*.js'));
|
|
4426
|
+
* ```
|
|
4427
|
+
* @since v22.0.0
|
|
4428
|
+
* @returns paths of files that match the pattern.
|
|
4420
4429
|
*/
|
|
4421
|
-
export function globSync(pattern: string | string[]): string[];
|
|
4430
|
+
export function globSync(pattern: string | readonly string[]): string[];
|
|
4422
4431
|
export function globSync(
|
|
4423
|
-
pattern: string | string[],
|
|
4432
|
+
pattern: string | readonly string[],
|
|
4424
4433
|
options: GlobOptionsWithFileTypes,
|
|
4425
4434
|
): Dirent[];
|
|
4426
4435
|
export function globSync(
|
|
4427
|
-
pattern: string | string[],
|
|
4436
|
+
pattern: string | readonly string[],
|
|
4428
4437
|
options: GlobOptionsWithoutFileTypes,
|
|
4429
4438
|
): string[];
|
|
4430
4439
|
export function globSync(
|
|
4431
|
-
pattern: string | string[],
|
|
4440
|
+
pattern: string | readonly string[],
|
|
4432
4441
|
options: GlobOptions,
|
|
4433
4442
|
): Dirent[] | string[];
|
|
4434
4443
|
}
|
|
@@ -14,6 +14,7 @@ type _ResponseInit = typeof globalThis extends { onmessage: any } ? {}
|
|
|
14
14
|
: import("undici-types").ResponseInit;
|
|
15
15
|
type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").WebSocket;
|
|
16
16
|
type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").EventSource;
|
|
17
|
+
type _CloseEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").CloseEvent;
|
|
17
18
|
// #endregion Fetch and friends
|
|
18
19
|
|
|
19
20
|
// Conditional type definitions for webstorage interface, which conflicts with lib.dom otherwise.
|
|
@@ -250,16 +251,12 @@ declare global {
|
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
/** An iterable iterator returned by the Node.js API. */
|
|
253
|
-
|
|
254
|
-
// TODO: In next major @types/node version, change default TReturn to undefined.
|
|
255
|
-
interface Iterator<T, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> {
|
|
254
|
+
interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
|
|
256
255
|
[Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
|
|
257
256
|
}
|
|
258
257
|
|
|
259
258
|
/** An async iterable iterator returned by the Node.js API. */
|
|
260
|
-
|
|
261
|
-
// TODO: In next major @types/node version, change default TReturn to undefined.
|
|
262
|
-
interface AsyncIterator<T, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
259
|
+
interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
263
260
|
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
|
|
264
261
|
}
|
|
265
262
|
}
|
|
@@ -362,5 +359,9 @@ declare global {
|
|
|
362
359
|
interface EventSource extends _EventSource {}
|
|
363
360
|
var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T
|
|
364
361
|
: typeof import("undici-types").EventSource;
|
|
362
|
+
|
|
363
|
+
interface CloseEvent extends _CloseEvent {}
|
|
364
|
+
var CloseEvent: typeof globalThis extends { onmessage: any; CloseEvent: infer T } ? T
|
|
365
|
+
: typeof import("undici-types").CloseEvent;
|
|
365
366
|
// #endregion fetch
|
|
366
367
|
}
|
|
@@ -12,6 +12,7 @@ declare global {
|
|
|
12
12
|
| Int32Array<TArrayBuffer>
|
|
13
13
|
| BigUint64Array<TArrayBuffer>
|
|
14
14
|
| BigInt64Array<TArrayBuffer>
|
|
15
|
+
| Float16Array<TArrayBuffer>
|
|
15
16
|
| Float32Array<TArrayBuffer>
|
|
16
17
|
| Float64Array<TArrayBuffer>;
|
|
17
18
|
type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* 'Host', 'example.com',
|
|
38
38
|
* 'accepT', '*' ]
|
|
39
39
|
* ```
|
|
40
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
40
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/http.js)
|
|
41
41
|
*/
|
|
42
42
|
declare module "http" {
|
|
43
43
|
import * as stream from "node:stream";
|
|
@@ -1505,7 +1505,7 @@ declare module "http" {
|
|
|
1505
1505
|
* });
|
|
1506
1506
|
* ```
|
|
1507
1507
|
*
|
|
1508
|
-
* `options` in [`socket.connect()`](https://nodejs.org/docs/latest-
|
|
1508
|
+
* `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v24.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
|
|
1509
1509
|
*
|
|
1510
1510
|
* To configure any of them, a custom {@link Agent} instance must be created.
|
|
1511
1511
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* import http2 from 'node:http2';
|
|
7
7
|
* ```
|
|
8
8
|
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/http2.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module "http2" {
|
|
12
12
|
import EventEmitter = require("node:events");
|
|
@@ -965,7 +965,10 @@ declare module "http2" {
|
|
|
965
965
|
* * `:path` \= `/`
|
|
966
966
|
* @since v8.4.0
|
|
967
967
|
*/
|
|
968
|
-
request(
|
|
968
|
+
request(
|
|
969
|
+
headers?: OutgoingHttpHeaders | readonly string[],
|
|
970
|
+
options?: ClientSessionRequestOptions,
|
|
971
|
+
): ClientHttp2Stream;
|
|
969
972
|
addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
|
|
970
973
|
addListener(event: "origin", listener: (origins: string[]) => void): this;
|
|
971
974
|
addListener(
|
|
@@ -1857,7 +1860,7 @@ declare module "http2" {
|
|
|
1857
1860
|
* If there were no previous values for the header, this is equivalent to calling {@link setHeader}.
|
|
1858
1861
|
*
|
|
1859
1862
|
* Attempting to set a header field name or value that contains invalid characters will result in a
|
|
1860
|
-
* [TypeError](https://nodejs.org/docs/latest-
|
|
1863
|
+
* [TypeError](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-typeerror) being thrown.
|
|
1861
1864
|
*
|
|
1862
1865
|
* ```js
|
|
1863
1866
|
* // Returns headers including "set-cookie: a" and "set-cookie: b"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
3
|
* separate module.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/https.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module "https" {
|
|
7
7
|
import { Duplex } from "node:stream";
|
|
@@ -22,15 +22,17 @@
|
|
|
22
22
|
* IN THE SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
// NOTE: These definitions support Node.js and TypeScript 5.
|
|
25
|
+
// NOTE: These definitions support Node.js and TypeScript 5.8+.
|
|
26
26
|
|
|
27
|
-
// Reference required TypeScript
|
|
27
|
+
// Reference required TypeScript libraries:
|
|
28
28
|
/// <reference lib="es2020" />
|
|
29
|
+
/// <reference lib="esnext.disposable" />
|
|
30
|
+
/// <reference lib="esnext.float16" />
|
|
29
31
|
|
|
30
|
-
//
|
|
31
|
-
/// <reference path="compatibility/
|
|
32
|
+
// Iterator definitions required for compatibility with TypeScript <5.6:
|
|
33
|
+
/// <reference path="compatibility/iterators.d.ts" />
|
|
32
34
|
|
|
33
|
-
// Definitions specific to TypeScript 5.7+:
|
|
35
|
+
// Definitions for Node.js modules specific to TypeScript 5.7+:
|
|
34
36
|
/// <reference path="globals.typedarray.d.ts" />
|
|
35
37
|
/// <reference path="buffer.buffer.d.ts" />
|
|
36
38
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* The `node:inspector` module provides an API for interacting with the V8
|
|
8
8
|
* inspector.
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'inspector' {
|
|
12
12
|
import EventEmitter = require('node:events');
|
|
@@ -2865,7 +2865,7 @@ declare module 'inspector' {
|
|
|
2865
2865
|
* If wait is `true`, will block until a client has connected to the inspect port
|
|
2866
2866
|
* and flow control has been passed to the debugger client.
|
|
2867
2867
|
*
|
|
2868
|
-
* See the [security warning](https://nodejs.org/docs/latest-
|
|
2868
|
+
* See the [security warning](https://nodejs.org/docs/latest-v24.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
|
|
2869
2869
|
* regarding the `host` parameter usage.
|
|
2870
2870
|
* @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
|
|
2871
2871
|
* @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
|
|
@@ -2948,7 +2948,6 @@ declare module 'inspector' {
|
|
|
2948
2948
|
* Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that
|
|
2949
2949
|
* the application is about to send an HTTP request.
|
|
2950
2950
|
* @since v22.6.0
|
|
2951
|
-
* @experimental
|
|
2952
2951
|
*/
|
|
2953
2952
|
function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
|
|
2954
2953
|
/**
|
|
@@ -2957,7 +2956,6 @@ declare module 'inspector' {
|
|
|
2957
2956
|
* Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that
|
|
2958
2957
|
* HTTP response is available.
|
|
2959
2958
|
* @since v22.6.0
|
|
2960
|
-
* @experimental
|
|
2961
2959
|
*/
|
|
2962
2960
|
function responseReceived(params: ResponseReceivedEventDataType): void;
|
|
2963
2961
|
/**
|
|
@@ -2966,7 +2964,6 @@ declare module 'inspector' {
|
|
|
2966
2964
|
* Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that
|
|
2967
2965
|
* HTTP request has finished loading.
|
|
2968
2966
|
* @since v22.6.0
|
|
2969
|
-
* @experimental
|
|
2970
2967
|
*/
|
|
2971
2968
|
function loadingFinished(params: LoadingFinishedEventDataType): void;
|
|
2972
2969
|
/**
|
|
@@ -2975,7 +2972,6 @@ declare module 'inspector' {
|
|
|
2975
2972
|
* Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
|
|
2976
2973
|
* HTTP request has failed to load.
|
|
2977
2974
|
* @since v22.7.0
|
|
2978
|
-
* @experimental
|
|
2979
2975
|
*/
|
|
2980
2976
|
function loadingFailed(params: LoadingFailedEventDataType): void;
|
|
2981
2977
|
}
|
|
@@ -2992,7 +2988,7 @@ declare module 'node:inspector' {
|
|
|
2992
2988
|
/**
|
|
2993
2989
|
* The `node:inspector/promises` module provides an API for interacting with the V8
|
|
2994
2990
|
* inspector.
|
|
2995
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
2991
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector/promises.js)
|
|
2996
2992
|
* @since v19.0.0
|
|
2997
2993
|
*/
|
|
2998
2994
|
declare module 'inspector/promises' {
|
|
@@ -30,7 +30,7 @@ declare module "module" {
|
|
|
30
30
|
/**
|
|
31
31
|
* The following constants are returned as the `status` field in the object returned by
|
|
32
32
|
* {@link enableCompileCache} to indicate the result of the attempt to enable the
|
|
33
|
-
* [module compile cache](https://nodejs.org/docs/latest-
|
|
33
|
+
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
|
|
34
34
|
* @since v22.8.0
|
|
35
35
|
*/
|
|
36
36
|
namespace compileCacheStatus {
|
|
@@ -81,7 +81,7 @@ declare module "module" {
|
|
|
81
81
|
directory?: string;
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* Enable [module compile cache](https://nodejs.org/docs/latest-
|
|
84
|
+
* Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
|
|
85
85
|
* in the current Node.js instance.
|
|
86
86
|
*
|
|
87
87
|
* If `cacheDir` is not specified, Node.js will either use the directory specified by the
|
|
@@ -99,7 +99,7 @@ declare module "module" {
|
|
|
99
99
|
* contains the path to the directory where the compile cache is stored. The `status`
|
|
100
100
|
* field in the returned object would be one of the `module.constants.compileCacheStatus`
|
|
101
101
|
* values to indicate the result of the attempt to enable the
|
|
102
|
-
* [module compile cache](https://nodejs.org/docs/latest-
|
|
102
|
+
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
|
|
103
103
|
*
|
|
104
104
|
* This method only affects the current Node.js instance. To enable it in child worker threads,
|
|
105
105
|
* either call this method in child worker threads too, or set the
|
|
@@ -112,7 +112,7 @@ declare module "module" {
|
|
|
112
112
|
*/
|
|
113
113
|
function enableCompileCache(cacheDir?: string): EnableCompileCacheResult;
|
|
114
114
|
/**
|
|
115
|
-
* Flush the [module compile cache](https://nodejs.org/docs/latest-
|
|
115
|
+
* Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
|
|
116
116
|
* accumulated from modules already loaded
|
|
117
117
|
* in the current Node.js instance to disk. This returns after all the flushing
|
|
118
118
|
* file system operations come to an end, no matter they succeed or not. If there
|
|
@@ -123,7 +123,7 @@ declare module "module" {
|
|
|
123
123
|
function flushCompileCache(): void;
|
|
124
124
|
/**
|
|
125
125
|
* @since v22.8.0
|
|
126
|
-
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-
|
|
126
|
+
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
|
|
127
127
|
* directory if it is enabled, or `undefined` otherwise.
|
|
128
128
|
*/
|
|
129
129
|
function getCompileCacheDir(): string | undefined;
|
|
@@ -194,7 +194,7 @@ declare module "module" {
|
|
|
194
194
|
*/
|
|
195
195
|
data?: Data | undefined;
|
|
196
196
|
/**
|
|
197
|
-
* [Transferable objects](https://nodejs.org/docs/latest-
|
|
197
|
+
* [Transferable objects](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#portpostmessagevalue-transferlist)
|
|
198
198
|
* to be passed into the `initialize` hook.
|
|
199
199
|
*/
|
|
200
200
|
transferList?: any[] | undefined;
|
|
@@ -203,10 +203,10 @@ declare module "module" {
|
|
|
203
203
|
/**
|
|
204
204
|
* Register a module that exports hooks that customize Node.js module
|
|
205
205
|
* resolution and loading behavior. See
|
|
206
|
-
* [Customization hooks](https://nodejs.org/docs/latest-
|
|
206
|
+
* [Customization hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks).
|
|
207
207
|
*
|
|
208
208
|
* This feature requires `--allow-worker` if used with the
|
|
209
|
-
* [Permission Model](https://nodejs.org/docs/latest-
|
|
209
|
+
* [Permission Model](https://nodejs.org/docs/latest-v24.x/api/permissions.html#permission-model).
|
|
210
210
|
* @since v20.6.0, v18.19.0
|
|
211
211
|
* @param specifier Customization hooks to be registered; this should be
|
|
212
212
|
* the same string that would be passed to `import()`, except that if it is
|
|
@@ -222,12 +222,12 @@ declare module "module" {
|
|
|
222
222
|
function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
|
|
223
223
|
interface RegisterHooksOptions {
|
|
224
224
|
/**
|
|
225
|
-
* See [load hook](https://nodejs.org/docs/latest-
|
|
225
|
+
* See [load hook](https://nodejs.org/docs/latest-v24.x/api/module.html#loadurl-context-nextload).
|
|
226
226
|
* @default undefined
|
|
227
227
|
*/
|
|
228
228
|
load?: LoadHookSync | undefined;
|
|
229
229
|
/**
|
|
230
|
-
* See [resolve hook](https://nodejs.org/docs/latest-
|
|
230
|
+
* See [resolve hook](https://nodejs.org/docs/latest-v24.x/api/module.html#resolvespecifier-context-nextresolve).
|
|
231
231
|
* @default undefined
|
|
232
232
|
*/
|
|
233
233
|
resolve?: ResolveHookSync | undefined;
|
|
@@ -239,7 +239,7 @@ declare module "module" {
|
|
|
239
239
|
deregister(): void;
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
|
-
* Register [hooks](https://nodejs.org/docs/latest-
|
|
242
|
+
* Register [hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks)
|
|
243
243
|
* that customize Node.js module resolution and loading behavior.
|
|
244
244
|
* @since v22.15.0
|
|
245
245
|
* @experimental
|
|
@@ -270,9 +270,9 @@ declare module "module" {
|
|
|
270
270
|
* with `vm.runInContext()` or `vm.compileFunction()`.
|
|
271
271
|
* By default, it will throw an error if the code contains TypeScript features
|
|
272
272
|
* that require transformation such as `Enums`,
|
|
273
|
-
* see [type-stripping](https://nodejs.org/docs/latest-
|
|
273
|
+
* see [type-stripping](https://nodejs.org/docs/latest-v24.x/api/typescript.md#type-stripping) for more information.
|
|
274
274
|
* When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
|
|
275
|
-
* see [transform TypeScript features](https://nodejs.org/docs/latest-
|
|
275
|
+
* see [transform TypeScript features](https://nodejs.org/docs/latest-v24.x/api/typescript.md#typescript-features) for more information.
|
|
276
276
|
* When mode is `'strip'`, source maps are not generated, because locations are preserved.
|
|
277
277
|
* If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
|
|
278
278
|
*
|
|
@@ -360,6 +360,7 @@ declare module "module" {
|
|
|
360
360
|
type?: string | undefined;
|
|
361
361
|
}
|
|
362
362
|
type ModuleFormat =
|
|
363
|
+
| "addon"
|
|
363
364
|
| "builtin"
|
|
364
365
|
| "commonjs"
|
|
365
366
|
| "commonjs-typescript"
|
|
@@ -576,34 +577,67 @@ declare module "module" {
|
|
|
576
577
|
global {
|
|
577
578
|
interface ImportMeta {
|
|
578
579
|
/**
|
|
579
|
-
* The directory name of the current module.
|
|
580
|
-
*
|
|
580
|
+
* The directory name of the current module.
|
|
581
|
+
*
|
|
582
|
+
* This is the same as the ``path.dirname()` of the `import.meta.filename`.
|
|
583
|
+
*
|
|
584
|
+
* > **Caveat**: only present on `file:` modules.
|
|
585
|
+
* @since v21.2.0, v20.11.0
|
|
581
586
|
*/
|
|
582
587
|
dirname: string;
|
|
583
588
|
/**
|
|
584
|
-
* The full absolute path and filename of the current module, with
|
|
589
|
+
* The full absolute path and filename of the current module, with
|
|
590
|
+
* symlinks resolved.
|
|
591
|
+
*
|
|
585
592
|
* This is the same as the `url.fileURLToPath()` of the `import.meta.url`.
|
|
586
|
-
*
|
|
593
|
+
*
|
|
594
|
+
* > **Caveat** only local modules support this property. Modules not using the
|
|
595
|
+
* > `file:` protocol will not provide it.
|
|
596
|
+
* @since v21.2.0, v20.11.0
|
|
587
597
|
*/
|
|
588
598
|
filename: string;
|
|
589
599
|
/**
|
|
590
600
|
* The absolute `file:` URL of the module.
|
|
601
|
+
*
|
|
602
|
+
* This is defined exactly the same as it is in browsers providing the URL of the
|
|
603
|
+
* current module file.
|
|
604
|
+
*
|
|
605
|
+
* This enables useful patterns such as relative file loading:
|
|
606
|
+
*
|
|
607
|
+
* ```js
|
|
608
|
+
* import { readFileSync } from 'node:fs';
|
|
609
|
+
* const buffer = readFileSync(new URL('./data.proto', import.meta.url));
|
|
610
|
+
* ```
|
|
591
611
|
*/
|
|
592
612
|
url: string;
|
|
593
613
|
/**
|
|
594
|
-
*
|
|
595
|
-
* the URL string.
|
|
614
|
+
* `import.meta.resolve` is a module-relative resolution function scoped to
|
|
615
|
+
* each module, returning the URL string.
|
|
596
616
|
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
617
|
+
* ```js
|
|
618
|
+
* const dependencyAsset = import.meta.resolve('component-lib/asset.css');
|
|
619
|
+
* // file:///app/node_modules/component-lib/asset.css
|
|
620
|
+
* import.meta.resolve('./dep.js');
|
|
621
|
+
* // file:///app/dep.js
|
|
622
|
+
* ```
|
|
599
623
|
*
|
|
600
|
-
*
|
|
624
|
+
* All features of the Node.js module resolution are supported. Dependency
|
|
625
|
+
* resolutions are subject to the permitted exports resolutions within the package.
|
|
601
626
|
*
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
|
|
606
|
-
|
|
627
|
+
* **Caveats**:
|
|
628
|
+
*
|
|
629
|
+
* * This can result in synchronous file-system operations, which
|
|
630
|
+
* can impact performance similarly to `require.resolve`.
|
|
631
|
+
* * This feature is not available within custom loaders (it would
|
|
632
|
+
* create a deadlock).
|
|
633
|
+
* @since v13.9.0, v12.16.0
|
|
634
|
+
* @param specifier The module specifier to resolve relative to the
|
|
635
|
+
* current module.
|
|
636
|
+
* @param parent An optional absolute parent module URL to resolve from.
|
|
637
|
+
* **Default:** `import.meta.url`
|
|
638
|
+
* @returns The absolute URL string that the specifier would resolve to.
|
|
639
|
+
*/
|
|
640
|
+
resolve(specifier: string, parent?: string | URL): string;
|
|
607
641
|
}
|
|
608
642
|
namespace NodeJS {
|
|
609
643
|
interface Module {
|
|
@@ -678,7 +712,7 @@ declare module "module" {
|
|
|
678
712
|
* Modules are cached in this object when they are required. By deleting a key
|
|
679
713
|
* value from this object, the next `require` will reload the module.
|
|
680
714
|
* This does not apply to
|
|
681
|
-
* [native addons](https://nodejs.org/docs/latest-
|
|
715
|
+
* [native addons](https://nodejs.org/docs/latest-v24.x/api/addons.html),
|
|
682
716
|
* for which reloading will result in an error.
|
|
683
717
|
* @since v0.3.0
|
|
684
718
|
*/
|
|
@@ -712,7 +746,7 @@ declare module "module" {
|
|
|
712
746
|
* Paths to resolve module location from. If present, these
|
|
713
747
|
* paths are used instead of the default resolution paths, with the exception
|
|
714
748
|
* of
|
|
715
|
-
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-
|
|
749
|
+
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v24.x/api/modules.html#loading-from-the-global-folders)
|
|
716
750
|
* like `$HOME/.node_modules`, which are
|
|
717
751
|
* always included. Each of these paths is used as a starting point for
|
|
718
752
|
* the module resolution algorithm, meaning that the `node_modules` hierarchy
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ```js
|
|
11
11
|
* import net from 'node:net';
|
|
12
12
|
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
13
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/net.js)
|
|
14
14
|
*/
|
|
15
15
|
declare module "net" {
|
|
16
16
|
import * as stream from "node:stream";
|
|
@@ -43,9 +43,6 @@ declare module "net" {
|
|
|
43
43
|
*/
|
|
44
44
|
callback(bytesWritten: number, buffer: Uint8Array): boolean;
|
|
45
45
|
}
|
|
46
|
-
// TODO: remove empty ConnectOpts placeholder at next major @types/node version.
|
|
47
|
-
/** @deprecated */
|
|
48
|
-
interface ConnectOpts {}
|
|
49
46
|
interface TcpSocketConnectOpts {
|
|
50
47
|
port: number;
|
|
51
48
|
host?: string | undefined;
|
|
@@ -538,7 +535,7 @@ declare module "net" {
|
|
|
538
535
|
keepAliveInitialDelay?: number | undefined;
|
|
539
536
|
/**
|
|
540
537
|
* Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
|
|
541
|
-
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-
|
|
538
|
+
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
|
|
542
539
|
* @since v18.17.0, v20.1.0
|
|
543
540
|
*/
|
|
544
541
|
highWaterMark?: number | undefined;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ```js
|
|
6
6
|
* import os from 'node:os';
|
|
7
7
|
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/os.js)
|
|
9
9
|
*/
|
|
10
10
|
declare module "os" {
|
|
11
11
|
interface CpuInfo {
|
|
@@ -241,7 +241,7 @@ declare module "os" {
|
|
|
241
241
|
* environment variables for the home directory before falling back to the
|
|
242
242
|
* operating system response.
|
|
243
243
|
*
|
|
244
|
-
* Throws a [`SystemError`](https://nodejs.org/docs/latest-
|
|
244
|
+
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
|
|
245
245
|
* @since v6.0.0
|
|
246
246
|
*/
|
|
247
247
|
function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
|
|
@@ -417,13 +417,13 @@ declare module "os" {
|
|
|
417
417
|
const EOL: string;
|
|
418
418
|
/**
|
|
419
419
|
* Returns the operating system CPU architecture for which the Node.js binary was
|
|
420
|
-
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
|
|
421
|
-
* and `'x64'`.
|
|
420
|
+
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
|
|
421
|
+
* `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
|
|
422
422
|
*
|
|
423
|
-
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-
|
|
423
|
+
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v24.x/api/process.html#processarch).
|
|
424
424
|
* @since v0.5.0
|
|
425
425
|
*/
|
|
426
|
-
function arch():
|
|
426
|
+
function arch(): NodeJS.Architecture;
|
|
427
427
|
/**
|
|
428
428
|
* Returns a string identifying the kernel version.
|
|
429
429
|
*
|
|
@@ -445,7 +445,8 @@ declare module "os" {
|
|
|
445
445
|
*/
|
|
446
446
|
function platform(): NodeJS.Platform;
|
|
447
447
|
/**
|
|
448
|
-
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
|
|
448
|
+
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
|
|
449
|
+
* `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.
|
|
449
450
|
*
|
|
450
451
|
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
|
|
451
452
|
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
|