From c96a07762dc8e0a26afae6a5528fc53733199a46 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 30 Apr 2025 07:39:42 +0530 Subject: [PATCH 1/2] docs(configuration): add `stats.errorCause` --- src/content/configuration/stats.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/content/configuration/stats.mdx b/src/content/configuration/stats.mdx index 7f18e8fa6047..ff0b40c49394 100644 --- a/src/content/configuration/stats.mdx +++ b/src/content/configuration/stats.mdx @@ -444,6 +444,21 @@ module.exports = { }; ``` +### stats.errorCause + +`boolean` `"auto"` + +Tells `stats` whether to include the [`cause`](https://nodejs.org/en/blog/release/v16.9.0/#error-cause) property of errors in the output. It defaults to `true`. + +```javascript +module.exports = { + //... + stats: { + errorCause: true, + }, +}; +``` + ### stats.errorDetails `boolean` `"auto"` From 9ecae1eeba86cf388d187bc6b0ff59a95360ba28 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 30 Apr 2025 09:11:54 +0530 Subject: [PATCH 2/2] docs(configuration): add `stats.errorErrors` --- src/content/configuration/stats.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/content/configuration/stats.mdx b/src/content/configuration/stats.mdx index ff0b40c49394..75d9e9e40015 100644 --- a/src/content/configuration/stats.mdx +++ b/src/content/configuration/stats.mdx @@ -474,6 +474,23 @@ module.exports = { }; ``` +### stats.errorErrors + +`boolean` `"auto"` + +Tells `stats` whether to include the errors array from [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) instances in the output. It defaults to `true`. + +Useful when a single error is composed of multiple underlying errors, providing deeper visibility into grouped error structures. + +```javascript +module.exports = { + //... + stats: { + errorErrors: true, + }, +}; +``` + ### stats.errorStack `boolean = true`