cron 3.0.0-beta.2 → 3.0.0-beta.3

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [3.0.0-beta.3](https://github.com/kelektiv/node-cron/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2023-08-15)
2
+
3
+
4
+ ### ⚠ Breaking changes
5
+
6
+ * return empty array from nextDates when called without argument (#519)
7
+
8
+ ### 🐛 Bug Fixes
9
+
10
+ * return empty array from nextDates when called without argument ([#519](https://github.com/kelektiv/node-cron/issues/519)) ([e65c3dc](https://github.com/kelektiv/node-cron/commit/e65c3dc6c334b8d4df0da317b75494d78cd5d52b))
11
+
1
12
  ## [3.0.0-beta.2](https://github.com/kelektiv/node-cron/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2023-08-15)
2
13
 
3
14
 
package/README.md CHANGED
@@ -52,7 +52,7 @@ As goes with semver, breaking backwards compatibility should be explicit in the
52
52
  var CronJob = require('cron').CronJob;
53
53
  var job = new CronJob(
54
54
  '* * * * * *',
55
- function() {
55
+ function () {
56
56
  console.log('You will see this message every second');
57
57
  },
58
58
  null,
@@ -125,6 +125,7 @@ Parameter Based
125
125
  - `stop` - Stops your job.
126
126
  - `setTime` - Stops and changes the time for the `CronJob`. Param must be a `CronTime`.
127
127
  - `lastDate` - Tells you the last execution date.
128
+ - `nextDate` - Provides the next date that will trigger an `onTick`.
128
129
  - `nextDates` - Provides an array of the next set of dates that will trigger an `onTick`.
129
130
  - `fireOnTick` - Allows you to override the `onTick` calling behavior. This matters so only do this if you have a really good reason to do so.
130
131
  - `addCallback` - Allows you to add `onTick` callbacks.
package/lib/job.js CHANGED
@@ -106,7 +106,7 @@ function CronJob(CronTime, spawn) {
106
106
  CJ.prototype.fireOnTick = fireOnTick;
107
107
 
108
108
  CJ.prototype.nextDates = function (i) {
109
- return this.cronTime.sendAt(i);
109
+ return this.cronTime.sendAt(i || 0);
110
110
  };
111
111
 
112
112
  const start = function () {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cron",
3
3
  "description": "Cron jobs for your node",
4
- "version": "3.0.0-beta.2",
4
+ "version": "3.0.0-beta.3",
5
5
  "author": "Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/kelektiv/node-cron/issues"