@types/node 20.16.0 → 20.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
node v20.16/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 18 Aug 2024 09:07:58 GMT
11
+ * Last updated: Mon, 19 Aug 2024 02:45:10 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.16.0",
3
+ "version": "20.16.1",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~6.19.2"
214
214
  },
215
- "typesPublisherContentHash": "ec5293eb52c87d6b8fbd3eaa5df2b64ce6e26111fc4e85e9eea24132add60f9e",
215
+ "typesPublisherContentHash": "23269633633d0c39ffe71f0bf8b54a4ac3382fcfca61cb727c06e71494d2244b",
216
216
  "typeScriptVersion": "4.8"
217
217
  }
@@ -323,24 +323,28 @@ declare module "process" {
323
323
  has(scope: string, reference?: string): boolean;
324
324
  }
325
325
  interface ProcessReport {
326
+ /**
327
+ * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems
328
+ * than the default multi-line format designed for human consumption.
329
+ * @since v13.12.0, v12.17.0
330
+ */
331
+ compact: boolean;
326
332
  /**
327
333
  * Directory where the report is written.
334
+ * The default value is the empty string, indicating that reports are written to the current
328
335
  * working directory of the Node.js process.
329
- * @default '' indicating that reports are written to the current
330
336
  */
331
337
  directory: string;
332
338
  /**
333
- * Filename where the report is written.
334
- * The default value is the empty string.
335
- * @default '' the output filename will be comprised of a timestamp,
336
- * PID, and sequence number.
339
+ * Filename where the report is written. If set to the empty string, the output filename will be comprised
340
+ * of a timestamp, PID, and sequence number. The default value is the empty string.
337
341
  */
338
342
  filename: string;
339
343
  /**
340
- * Returns a JSON-formatted diagnostic report for the running process.
341
- * The report's JavaScript stack trace is taken from err, if present.
344
+ * Returns a JavaScript Object representation of a diagnostic report for the running process.
345
+ * The report's JavaScript stack trace is taken from `err`, if present.
342
346
  */
343
- getReport(err?: Error): string;
347
+ getReport(err?: Error): object;
344
348
  /**
345
349
  * If true, a diagnostic report is generated on fatal errors,
346
350
  * such as out of memory errors or failed C++ assertions.
@@ -366,18 +370,19 @@ declare module "process" {
366
370
  /**
367
371
  * Writes a diagnostic report to a file. If filename is not provided, the default filename
368
372
  * includes the date, time, PID, and a sequence number.
369
- * The report's JavaScript stack trace is taken from err, if present.
373
+ * The report's JavaScript stack trace is taken from `err`, if present.
370
374
  *
375
+ * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written
376
+ * to the stdout or stderr of the process respectively.
371
377
  * @param fileName Name of the file where the report is written.
372
378
  * This should be a relative path, that will be appended to the directory specified in
373
379
  * `process.report.directory`, or the current working directory of the Node.js process,
374
380
  * if unspecified.
375
- * @param error A custom error used for reporting the JavaScript stack.
381
+ * @param err A custom error used for reporting the JavaScript stack.
376
382
  * @return Filename of the generated report.
377
383
  */
378
- writeReport(fileName?: string): string;
379
- writeReport(error?: Error): string;
380
384
  writeReport(fileName?: string, err?: Error): string;
385
+ writeReport(err?: Error): string;
381
386
  }
382
387
  interface ResourceUsage {
383
388
  fsRead: number;
@@ -1706,11 +1711,11 @@ declare module "process" {
1706
1711
  */
1707
1712
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1708
1713
  /**
1709
- * `process.report` is an object whose methods are used to generate diagnostic
1710
- * reports for the current process. Additional documentation is available in the `report documentation`.
1714
+ * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
1715
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v20.x/api/report.html).
1711
1716
  * @since v11.8.0
1712
1717
  */
1713
- report?: ProcessReport | undefined;
1718
+ report: ProcessReport;
1714
1719
  /**
1715
1720
  * ```js
1716
1721
  * import { resourceUsage } from 'node:process';
node v20.16/test.d.ts CHANGED
@@ -1831,27 +1831,35 @@ declare module "node:test/reporters" {
1831
1831
  * The `dot` reporter outputs the test results in a compact format,
1832
1832
  * where each passing test is represented by a `.`,
1833
1833
  * and each failing test is represented by a `X`.
1834
+ * @since v20.0.0
1834
1835
  */
1835
1836
  function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>;
1836
1837
  /**
1837
1838
  * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
1839
+ * @since v20.0.0
1838
1840
  */
1839
1841
  function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
1840
1842
  /**
1841
1843
  * The `spec` reporter outputs the test results in a human-readable format.
1844
+ * @since v20.0.0
1842
1845
  */
1843
- class Spec extends Transform {
1846
+ class SpecReporter extends Transform {
1844
1847
  constructor();
1845
1848
  }
1846
1849
  /**
1847
1850
  * The `junit` reporter outputs test results in a jUnit XML format.
1851
+ * @since v21.0.0
1848
1852
  */
1849
1853
  function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
1854
+ class LcovReporter extends Transform {
1855
+ constructor(opts?: Omit<TransformOptions, "writableObjectMode">);
1856
+ }
1850
1857
  /**
1851
- * The `lcov` reporter outputs test coverage when used with the [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--experimental-test-coverage) flag.
1858
+ * The `lcov` reporter outputs test coverage when used with the
1859
+ * [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--experimental-test-coverage) flag.
1860
+ * @since v22.0.0
1852
1861
  */
1853
- class Lcov extends Transform {
1854
- constructor(opts?: TransformOptions);
1855
- }
1856
- export { dot, junit, Lcov as lcov, Spec as spec, tap, TestEvent };
1862
+ const lcov: LcovReporter;
1863
+
1864
+ export { dot, junit, lcov, SpecReporter as spec, tap, TestEvent };
1857
1865
  }