cron 3.1.1 → 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 +34 -0
- package/dist/job.js +2 -2
- package/dist/types/cron.types.d.ts +2 -2
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
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
|
+
|
|
13
|
+
## [3.1.2](https://github.com/kelektiv/node-cron/compare/v3.1.1...v3.1.2) (2023-10-19)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### 🛠 Builds
|
|
17
|
+
|
|
18
|
+
* **deps:** update dependency luxon to ~3.4.0 ([#730](https://github.com/kelektiv/node-cron/issues/730)) ([c3806c5](https://github.com/kelektiv/node-cron/commit/c3806c54574d2f1886272f0b6fc0742b84dcba03))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### ♻️ Chores
|
|
22
|
+
|
|
23
|
+
* **deps:** lock file maintenance ([#731](https://github.com/kelektiv/node-cron/issues/731)) ([b6bc715](https://github.com/kelektiv/node-cron/commit/b6bc715e20f48550b4265b90bd5a21b635ece14c))
|
|
24
|
+
* **deps:** pin dependencies ([#719](https://github.com/kelektiv/node-cron/issues/719)) [skip ci] ([5003745](https://github.com/kelektiv/node-cron/commit/5003745208f2312bfc41dd88b68520c00d72cf5c))
|
|
25
|
+
* **deps:** pin dependencies ([#720](https://github.com/kelektiv/node-cron/issues/720)) [skip ci] ([4f977ef](https://github.com/kelektiv/node-cron/commit/4f977efb245d0c8a4113ef979e92c90c4ce6b0ee))
|
|
26
|
+
* **deps:** pin dependencies ([#721](https://github.com/kelektiv/node-cron/issues/721)) [skip ci] ([60fbf7f](https://github.com/kelektiv/node-cron/commit/60fbf7fa9f34cb1a214673eb556aa62eab3b848b))
|
|
27
|
+
* **deps:** update dependency [@commitlint](https://github.com/commitlint)/cli to v17.8.0 ([#723](https://github.com/kelektiv/node-cron/issues/723)) [skip ci] ([a7a18cb](https://github.com/kelektiv/node-cron/commit/a7a18cbd8d550214377ff5c8d77f29952d2b91c7))
|
|
28
|
+
* **deps:** update dependency [@types](https://github.com/types)/node to v20.8.6 ([#724](https://github.com/kelektiv/node-cron/issues/724)) [skip ci] ([b5e4c9f](https://github.com/kelektiv/node-cron/commit/b5e4c9f463543f6d1ba2bc9eebbd5eb6f3d1b5ea))
|
|
29
|
+
* **deps:** update dependency sinon to v16 ([#726](https://github.com/kelektiv/node-cron/issues/726)) [skip ci] ([d114a12](https://github.com/kelektiv/node-cron/commit/d114a1291d4257a899150468e4736c594b542355))
|
|
30
|
+
* **deps:** update dependency typescript to v5.2.2 ([#729](https://github.com/kelektiv/node-cron/issues/729)) [skip ci] ([d1b267e](https://github.com/kelektiv/node-cron/commit/d1b267e6490347786e9aa77be6a1016598b968ea))
|
|
31
|
+
* **deps:** update linters ([#728](https://github.com/kelektiv/node-cron/issues/728)) [skip ci] ([9ab00e8](https://github.com/kelektiv/node-cron/commit/9ab00e8e2adac547017bfbe5b6d97d7bc9c6fb28))
|
|
32
|
+
* **deps:** update linters (major) ([#727](https://github.com/kelektiv/node-cron/issues/727)) [skip ci] ([a75418a](https://github.com/kelektiv/node-cron/commit/a75418aca0f51b98625979087aa86e166ac17c56))
|
|
33
|
+
* **deps:** update tests ([#722](https://github.com/kelektiv/node-cron/issues/722)) [skip ci] ([6b4c6fa](https://github.com/kelektiv/node-cron/commit/6b4c6fae750d005c3e30f12b868e4f01a3b99a68))
|
|
34
|
+
|
|
1
35
|
## [3.1.1](https://github.com/kelektiv/node-cron/compare/v3.1.0...v3.1.1) (2023-10-12)
|
|
2
36
|
|
|
3
37
|
|
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"
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@types/luxon": "~3.3.0",
|
|
27
|
-
"luxon": "~3.
|
|
27
|
+
"luxon": "~3.4.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@commitlint/cli": "17.
|
|
30
|
+
"@commitlint/cli": "17.8.0",
|
|
31
31
|
"@insurgentlab/commitlint-config": "18.1.3",
|
|
32
32
|
"@insurgentlab/conventional-changelog-preset": "7.0.0",
|
|
33
33
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
"@semantic-release/github": "9.2.1",
|
|
37
37
|
"@semantic-release/npm": "11.0.0",
|
|
38
38
|
"@semantic-release/release-notes-generator": "12.0.0",
|
|
39
|
-
"@types/jest": "
|
|
40
|
-
"@types/node": "
|
|
41
|
-
"@types/sinon": "
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "
|
|
43
|
-
"chai": "
|
|
44
|
-
"eslint": "
|
|
45
|
-
"eslint-config-prettier": "
|
|
46
|
-
"eslint-plugin-jest": "
|
|
47
|
-
"eslint-plugin-prettier": "
|
|
48
|
-
"husky": "
|
|
49
|
-
"jest": "
|
|
50
|
-
"prettier": "
|
|
39
|
+
"@types/jest": "29.5.5",
|
|
40
|
+
"@types/node": "20.8.6",
|
|
41
|
+
"@types/sinon": "10.0.19",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "6.7.5",
|
|
43
|
+
"chai": "4.3.10",
|
|
44
|
+
"eslint": "8.51.0",
|
|
45
|
+
"eslint-config-prettier": "9.0.0",
|
|
46
|
+
"eslint-plugin-jest": "27.4.2",
|
|
47
|
+
"eslint-plugin-prettier": "5.0.1",
|
|
48
|
+
"husky": "8.0.3",
|
|
49
|
+
"jest": "29.7.0",
|
|
50
|
+
"prettier": "3.0.3",
|
|
51
51
|
"semantic-release": "22.0.5",
|
|
52
|
-
"sinon": "
|
|
53
|
-
"ts-jest": "
|
|
54
|
-
"typescript": "
|
|
52
|
+
"sinon": "16.1.0",
|
|
53
|
+
"ts-jest": "29.1.1",
|
|
54
|
+
"typescript": "5.2.2"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"cron",
|