@naturalcycles/js-lib
Advanced tools
Comparing version 14.219.0 to 14.219.1
@@ -41,3 +41,3 @@ import { END, ErrorMode, SKIP } from '..'; | ||
return []; // short circuit | ||
const { concurrency = 16, errorMode = ErrorMode.THROW_IMMEDIATELY, logger = console } = opt; | ||
const { concurrency = Infinity, errorMode = ErrorMode.THROW_IMMEDIATELY, logger = console } = opt; | ||
// Special cases that are able to preserve async stack traces | ||
@@ -48,4 +48,4 @@ // Special case: serial execution | ||
} | ||
// Special case: concurrency === Infinity or items.length <= concurrency | ||
if (concurrency === Infinity || items.length <= concurrency) { | ||
// Special case: items.length <= concurrency (including when concurrency === Infinity) | ||
if (items.length <= concurrency) { | ||
return await pMapAll(items, mapper, errorMode, logger); | ||
@@ -52,0 +52,0 @@ } |
@@ -7,7 +7,3 @@ import type { AbortableAsyncMapper, CommonLogger } from '..'; | ||
* | ||
* Defaults to 16. | ||
* | ||
* It previously (and originally) defaulted to Infinity, which was later changed, | ||
* because it's somewhat dangerous to run "infinite number of parallel promises". | ||
* You can still emulate the old behavior by passing `Infinity`. | ||
* Defaults to Infitity. | ||
*/ | ||
@@ -14,0 +10,0 @@ concurrency?: number; |
@@ -44,3 +44,3 @@ "use strict"; | ||
return []; // short circuit | ||
const { concurrency = 16, errorMode = __1.ErrorMode.THROW_IMMEDIATELY, logger = console } = opt; | ||
const { concurrency = Infinity, errorMode = __1.ErrorMode.THROW_IMMEDIATELY, logger = console } = opt; | ||
// Special cases that are able to preserve async stack traces | ||
@@ -51,4 +51,4 @@ // Special case: serial execution | ||
} | ||
// Special case: concurrency === Infinity or items.length <= concurrency | ||
if (concurrency === Infinity || items.length <= concurrency) { | ||
// Special case: items.length <= concurrency (including when concurrency === Infinity) | ||
if (items.length <= concurrency) { | ||
return await pMapAll(items, mapper, errorMode, logger); | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"name": "@naturalcycles/js-lib", | ||
"version": "14.219.0", | ||
"version": "14.219.1", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "prepare": "husky", |
@@ -8,7 +8,3 @@ import type { AbortableAsyncMapper, CommonLogger } from '..' | ||
* | ||
* Defaults to 16. | ||
* | ||
* It previously (and originally) defaulted to Infinity, which was later changed, | ||
* because it's somewhat dangerous to run "infinite number of parallel promises". | ||
* You can still emulate the old behavior by passing `Infinity`. | ||
* Defaults to Infitity. | ||
*/ | ||
@@ -77,3 +73,3 @@ concurrency?: number | ||
const { concurrency = 16, errorMode = ErrorMode.THROW_IMMEDIATELY, logger = console } = opt | ||
const { concurrency = Infinity, errorMode = ErrorMode.THROW_IMMEDIATELY, logger = console } = opt | ||
@@ -86,4 +82,4 @@ // Special cases that are able to preserve async stack traces | ||
// Special case: concurrency === Infinity or items.length <= concurrency | ||
if (concurrency === Infinity || items.length <= concurrency) { | ||
// Special case: items.length <= concurrency (including when concurrency === Infinity) | ||
if (items.length <= concurrency) { | ||
return await pMapAll(items, mapper, errorMode, logger) | ||
@@ -90,0 +86,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1004732
30108