@naturalcycles/nodejs-lib 12.85.1 → 12.85.2

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.
@@ -33,7 +33,7 @@ function transformMap(mapper, opt = {}) {
33
33
  logErrorStats(true);
34
34
  if (collectedErrors.length) {
35
35
  // emit Aggregated error
36
- cb(new js_lib_1.AggregatedError(collectedErrors));
36
+ cb(new AggregateError(collectedErrors, `transformMap resulted in ${collectedErrors.length} error(s)`));
37
37
  }
38
38
  else {
39
39
  // emit no error
@@ -70,7 +70,7 @@ function transformMapSync(mapper, opt = {}) {
70
70
  logErrorStats(true);
71
71
  if (collectedErrors.length) {
72
72
  // emit Aggregated error
73
- cb(new js_lib_1.AggregatedError(collectedErrors));
73
+ cb(new AggregateError(collectedErrors, `transformMapSync resulted in ${collectedErrors.length} error(s)`));
74
74
  }
75
75
  else {
76
76
  // emit no error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/nodejs-lib",
3
- "version": "12.85.1",
3
+ "version": "12.85.2",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "docs-serve": "vuepress dev docs",
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  _anyToError,
3
3
  AbortableAsyncMapper,
4
- AggregatedError,
5
4
  AsyncPredicate,
6
5
  CommonLogger,
7
6
  END,
@@ -104,7 +103,12 @@ export function transformMap<IN = any, OUT = IN>(
104
103
 
105
104
  if (collectedErrors.length) {
106
105
  // emit Aggregated error
107
- cb(new AggregatedError(collectedErrors))
106
+ cb(
107
+ new AggregateError(
108
+ collectedErrors,
109
+ `transformMap resulted in ${collectedErrors.length} error(s)`,
110
+ ),
111
+ )
108
112
  } else {
109
113
  // emit no error
110
114
  cb()
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  _anyToError,
3
- AggregatedError,
4
3
  CommonLogger,
5
4
  END,
6
5
  ErrorMode,
@@ -141,7 +140,12 @@ export function transformMapSync<IN = any, OUT = IN>(
141
140
 
142
141
  if (collectedErrors.length) {
143
142
  // emit Aggregated error
144
- cb(new AggregatedError(collectedErrors))
143
+ cb(
144
+ new AggregateError(
145
+ collectedErrors,
146
+ `transformMapSync resulted in ${collectedErrors.length} error(s)`,
147
+ ),
148
+ )
145
149
  } else {
146
150
  // emit no error
147
151
  cb()