@naturalcycles/js-lib
Advanced tools
Comparing version 14.247.0 to 14.247.1
@@ -14,3 +14,3 @@ import { _errorDataAppend, _since, pDelay, pTimeout } from '..'; | ||
const fakeError = timeout ? new Error('TimeoutError') : undefined; | ||
let { logFirstAttempt = false, logRetries = true, logFailures = false, logSuccess = false } = opt; | ||
let { logFirstAttempt = false, logRetries = true, logFailures = true, logSuccess = false } = opt; | ||
if (opt.logAll) { | ||
@@ -51,3 +51,3 @@ logSuccess = logFirstAttempt = logRetries = logFailures = true; | ||
if (logFailures) { | ||
logger.warn(`${fname} attempt #${attempt} error in ${_since(started)}:`, err); | ||
logger.error(`${fname} attempt #${attempt} error in ${_since(started)}:`, err); | ||
} | ||
@@ -54,0 +54,0 @@ if (attempt >= maxAttempts || (predicate && !predicate(err, attempt, maxAttempts))) { |
@@ -18,3 +18,3 @@ "use strict"; | ||
const fakeError = timeout ? new Error('TimeoutError') : undefined; | ||
let { logFirstAttempt = false, logRetries = true, logFailures = false, logSuccess = false } = opt; | ||
let { logFirstAttempt = false, logRetries = true, logFailures = true, logSuccess = false } = opt; | ||
if (opt.logAll) { | ||
@@ -55,3 +55,3 @@ logSuccess = logFirstAttempt = logRetries = logFailures = true; | ||
if (logFailures) { | ||
logger.warn(`${fname} attempt #${attempt} error in ${(0, __1._since)(started)}:`, err); | ||
logger.error(`${fname} attempt #${attempt} error in ${(0, __1._since)(started)}:`, err); | ||
} | ||
@@ -58,0 +58,0 @@ if (attempt >= maxAttempts || (predicate && !predicate(err, attempt, maxAttempts))) { |
{ | ||
"name": "@naturalcycles/js-lib", | ||
"version": "14.247.0", | ||
"version": "14.247.1", | ||
"scripts": { | ||
"prepare": "husky", | ||
"build-prod": "build-prod-esm-cjs", | ||
"build": "dev-lib build-esm-cjs", | ||
"test": "dev-lib test", | ||
"lint": "dev-lib lint", | ||
"bt": "dev-lib bt", | ||
"lbt": "dev-lib lbt", | ||
"test-tz1": "TZ=Europe/Stockholm yarn test local", | ||
@@ -20,7 +24,7 @@ "test-tz2": "TZ=JST-9 yarn test local", | ||
"@naturalcycles/bench-lib": "^3.0.0", | ||
"@naturalcycles/dev-lib": "^14.0.0", | ||
"@naturalcycles/dev-lib": "^15.0.3", | ||
"@naturalcycles/nodejs-lib": "^13.0.1", | ||
"@naturalcycles/time-lib": "^3.5.1", | ||
"@types/crypto-js": "^4.1.1", | ||
"@types/node": "^20.1.0", | ||
"@types/node": "^22.0.0", | ||
"@types/semver": "^7.5.8", | ||
@@ -27,0 +31,0 @@ "crypto-js": "^4.1.1", |
@@ -117,3 +117,3 @@ import type { AnyFunction, CommonLogger, ErrorData } from '..' | ||
const fakeError = timeout ? new Error('TimeoutError') : undefined | ||
let { logFirstAttempt = false, logRetries = true, logFailures = false, logSuccess = false } = opt | ||
let { logFirstAttempt = false, logRetries = true, logFailures = true, logSuccess = false } = opt | ||
@@ -161,3 +161,3 @@ if (opt.logAll) { | ||
if (logFailures) { | ||
logger.warn(`${fname} attempt #${attempt} error in ${_since(started)}:`, err) | ||
logger.error(`${fname} attempt #${attempt} error in ${_since(started)}:`, err) | ||
} | ||
@@ -164,0 +164,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
1069497