Comparing version 3.1.2 to 3.1.3
@@ -0,1 +1,13 @@ | ||
## [3.1.3](https://github.com/kelektiv/node-cron/compare/v3.1.2...v3.1.3) (2023-10-19) | ||
### π Bug Fixes | ||
* allow callbacks to return a promise ([#733](https://github.com/kelektiv/node-cron/issues/733)) ([8dd8b75](https://github.com/kelektiv/node-cron/commit/8dd8b754b69e2cbe503f344f2346a035cf5a3ec6)) | ||
### βοΈ Continuous Integrations | ||
* **renovate:** update configuration ([#732](https://github.com/kelektiv/node-cron/issues/732)) [skip ci] ([2ff9c6e](https://github.com/kelektiv/node-cron/commit/2ff9c6eb94fbc833c6a7fff30242e2b4b8367dc6)) | ||
## [3.1.2](https://github.com/kelektiv/node-cron/compare/v3.1.1...v3.1.2) (2023-10-19) | ||
@@ -2,0 +14,0 @@ |
@@ -93,3 +93,3 @@ "use strict"; | ||
for (const callback of this._callbacks) { | ||
callback.call(this.context, this.onComplete); | ||
void callback.call(this.context, this.onComplete); | ||
} | ||
@@ -164,3 +164,3 @@ } | ||
if (typeof this.onComplete === 'function') { | ||
this.onComplete.call(this.context); | ||
void this.onComplete.call(this.context); | ||
} | ||
@@ -167,0 +167,0 @@ } |
@@ -24,4 +24,4 @@ /// <reference types="node" /> | ||
export type CronContext<C> = C extends null ? CronJob : NonNullable<C>; | ||
export type CronCallback<C, WithOnCompleteBool extends boolean = false> = (this: CronContext<C>, onComplete: WithOnCompleteBool extends true ? CronOnCompleteCallback : never) => void; | ||
export type CronOnCompleteCallback = () => void; | ||
export type CronCallback<C, WithOnCompleteBool extends boolean = false> = (this: CronContext<C>, onComplete: WithOnCompleteBool extends true ? CronOnCompleteCallback : never) => void | Promise<void>; | ||
export type CronOnCompleteCallback = () => void | Promise<void>; | ||
export type CronSystemCommand = string | { | ||
@@ -28,0 +28,0 @@ command: string; |
{ | ||
"name": "cron", | ||
"description": "Cron jobs for your node", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"author": "Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)", | ||
@@ -6,0 +6,0 @@ "bugs": { |
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
66320