cron 3.1.2 → 3.1.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 +12 -0
- package/dist/job.js +2 -2
- package/dist/types/cron.types.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [3.1.3](https://github.com/kelektiv/node-cron/compare/v3.1.2...v3.1.3) (2023-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🐛 Bug Fixes
|
|
5
|
+
|
|
6
|
+
* allow callbacks to return a promise ([#733](https://github.com/kelektiv/node-cron/issues/733)) ([8dd8b75](https://github.com/kelektiv/node-cron/commit/8dd8b754b69e2cbe503f344f2346a035cf5a3ec6))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚙️ Continuous Integrations
|
|
10
|
+
|
|
11
|
+
* **renovate:** update configuration ([#732](https://github.com/kelektiv/node-cron/issues/732)) [skip ci] ([2ff9c6e](https://github.com/kelektiv/node-cron/commit/2ff9c6eb94fbc833c6a7fff30242e2b4b8367dc6))
|
|
12
|
+
|
|
1
13
|
## [3.1.2](https://github.com/kelektiv/node-cron/compare/v3.1.1...v3.1.2) (2023-10-19)
|
|
2
14
|
|
|
3
15
|
|
package/dist/job.js
CHANGED
|
@@ -90,7 +90,7 @@ class CronJob {
|
|
|
90
90
|
}
|
|
91
91
|
fireOnTick() {
|
|
92
92
|
for (const callback of this._callbacks) {
|
|
93
|
-
callback.call(this.context, this.onComplete);
|
|
93
|
+
void callback.call(this.context, this.onComplete);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
nextDates(i) {
|
|
@@ -160,7 +160,7 @@ class CronJob {
|
|
|
160
160
|
clearTimeout(this._timeout);
|
|
161
161
|
this.running = false;
|
|
162
162
|
if (typeof this.onComplete === 'function') {
|
|
163
|
-
this.onComplete.call(this.context);
|
|
163
|
+
void this.onComplete.call(this.context);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -21,8 +21,8 @@ export type CronJobParams<OC extends CronOnCompleteCommand | null = null, C = nu
|
|
|
21
21
|
utcOffset?: number | null;
|
|
22
22
|
});
|
|
23
23
|
export type CronContext<C> = C extends null ? CronJob : NonNullable<C>;
|
|
24
|
-
export type CronCallback<C, WithOnCompleteBool extends boolean = false> = (this: CronContext<C>, onComplete: WithOnCompleteBool extends true ? CronOnCompleteCallback : never) => void
|
|
25
|
-
export type CronOnCompleteCallback = () => void
|
|
24
|
+
export type CronCallback<C, WithOnCompleteBool extends boolean = false> = (this: CronContext<C>, onComplete: WithOnCompleteBool extends true ? CronOnCompleteCallback : never) => void | Promise<void>;
|
|
25
|
+
export type CronOnCompleteCallback = () => void | Promise<void>;
|
|
26
26
|
export type CronSystemCommand = string | {
|
|
27
27
|
command: string;
|
|
28
28
|
args?: readonly string[] | null;
|
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.1.
|
|
4
|
+
"version": "3.1.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"
|