Comparing version 2.4.2 to 2.4.3
@@ -0,1 +1,13 @@ | ||
## [2.4.3](https://github.com/kelektiv/node-cron/compare/v2.4.2...v2.4.3) (2023-08-26) | ||
### 🐛 Bug Fixes | ||
* fix range parsing when upper limit = 0 ([#687](https://github.com/kelektiv/node-cron/issues/687)) ([d96746f](https://github.com/kelektiv/node-cron/commit/d96746f7b8f357e565d1fad48c9f70d3d646da64)) | ||
### 🚨 Tests | ||
* add TS types check ([#690](https://github.com/kelektiv/node-cron/issues/690)) ([f046016](https://github.com/kelektiv/node-cron/commit/f046016dc64438c4a12a4615a919b046d3a846de)) | ||
## [2.4.2](https://github.com/kelektiv/node-cron/compare/v2.4.1...v2.4.2) (2023-08-26) | ||
@@ -2,0 +14,0 @@ |
@@ -771,3 +771,3 @@ const CONSTRAINTS = [ | ||
lower = parseInt(lower, 10); | ||
upper = parseInt(upper, 10) || undefined; | ||
upper = upper !== undefined ? parseInt(upper, 10) : undefined; | ||
@@ -780,3 +780,3 @@ const wasStepDefined = !isNaN(parseInt(step, 10)); | ||
if (upper && lower > upper) { | ||
if (upper !== undefined && lower > upper) { | ||
throw new Error(`Field (${type}) has an invalid range`); | ||
@@ -787,4 +787,4 @@ } | ||
lower < low || | ||
(upper && upper > high) || | ||
(!upper && lower > high); | ||
(upper !== undefined && upper > high) || | ||
(upper === undefined && lower > high); | ||
@@ -799,3 +799,3 @@ if (outOfRangeError) { | ||
// Positive integer lower than constraints[1] | ||
if (upper) { | ||
if (upper !== undefined) { | ||
upper = Math.min(high, ~~Math.abs(upper)); | ||
@@ -802,0 +802,0 @@ } else { |
{ | ||
"name": "cron", | ||
"description": "Cron jobs for your node", | ||
"version": "2.4.2", | ||
"version": "2.4.3", | ||
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)", | ||
@@ -18,2 +18,3 @@ "bugs": { | ||
"test:watch": "jest --watch --coverage", | ||
"test:types": "tsd", | ||
"prepare": "husky install", | ||
@@ -50,3 +51,4 @@ "release": "semantic-release" | ||
"semantic-release": "~21.0.x", | ||
"sinon": "^15.0.x" | ||
"sinon": "^15.0.x", | ||
"tsd": "^0.28.1" | ||
}, | ||
@@ -53,0 +55,0 @@ "keywords": [ |
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
61750
9
1190
24