node-schedule 2.1.1 → 2.1.2
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 +46 -40
- package/lib/schedule.js +2 -2
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
###
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
1
|
+
# node-schedule
|
|
2
|
+
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bef41ec: Cancel the polling interval in `gracefulShutdown()` once all running jobs have finished, so the process can exit (#752)
|
|
8
|
+
|
|
9
|
+
## 2.1.1 - 11 January, 2023
|
|
10
|
+
|
|
11
|
+
### Bug fixes:
|
|
12
|
+
|
|
13
|
+
- Bump cron-parser from 3.5.0 to 4.2.0 - security fix #642
|
|
14
|
+
|
|
15
|
+
## 2.1.0 - 28 November, 2021
|
|
16
|
+
|
|
17
|
+
### New features:
|
|
18
|
+
|
|
19
|
+
- Implement support for graceful shutdown #583
|
|
20
|
+
- Emit a success event after a successful job invocation. #643
|
|
21
|
+
|
|
22
|
+
## 2.0.0 - 01 February, 2021
|
|
23
|
+
|
|
24
|
+
### Breaking changes:
|
|
25
|
+
|
|
26
|
+
- Drop support for Node < 6
|
|
27
|
+
- Remove support for job objects. See `UPGRADING.md` for more details. #557
|
|
28
|
+
|
|
29
|
+
### New features:
|
|
30
|
+
|
|
31
|
+
- Introduce compatibility with browsers and Electron #553
|
|
32
|
+
|
|
33
|
+
### Bug fixes:
|
|
34
|
+
|
|
35
|
+
- Avoid leaking memory on one-off jobs #581
|
|
36
|
+
- Address anonymous job id collision problem to ensure that node-schedule could run with the unlimited uptime #582
|
|
37
|
+
|
|
38
|
+
### Internal changes:
|
|
39
|
+
|
|
40
|
+
- Bump cron-parser from 2.18.0 to 3.1.0 #562
|
|
41
|
+
- Bump sinon from 1.17.7 to 9.2.4 #566
|
|
42
|
+
- Switch to nyc from istanbul #574
|
|
43
|
+
- Convert tests from nodeunit to Tape #575
|
|
44
|
+
- Replace var with let/const #577
|
|
45
|
+
- Execute airtap tests on a headless Chromium #578
|
|
46
|
+
- Make structure more modular #579
|
package/lib/schedule.js
CHANGED
|
@@ -89,13 +89,13 @@ function gracefulShutdown() {
|
|
|
89
89
|
|
|
90
90
|
return new Promise(function (resolve) {
|
|
91
91
|
if (running) {
|
|
92
|
-
setInterval(function () {
|
|
92
|
+
const intervalId = setInterval(function () {
|
|
93
93
|
for (let i = 0; i < jobs.length; i++) {
|
|
94
94
|
if (jobs[i].running > 0) {
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
clearInterval(intervalId);
|
|
99
99
|
resolve();
|
|
100
100
|
}, 500);
|
|
101
101
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-schedule",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "A cron-like and not-cron-like job scheduler for Node.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"schedule",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"coveralls": "nyc report --reporter=lcov",
|
|
19
19
|
"test:coverage": "nyc tape test/*.js",
|
|
20
20
|
"lint": "eslint lib test",
|
|
21
|
-
"lint:fix": "eslint --fix lib test"
|
|
21
|
+
"lint:fix": "eslint --fix lib test",
|
|
22
|
+
"changeset": "changeset",
|
|
23
|
+
"release": "changeset publish"
|
|
22
24
|
},
|
|
23
25
|
"author": {
|
|
24
26
|
"name": "Matt Patenaude",
|
|
@@ -41,7 +43,9 @@
|
|
|
41
43
|
"sorted-array-functions": "^1.3.0"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
46
|
+
"@changesets/cli": "^3.0.3",
|
|
44
47
|
"airtap": "^4.0.4",
|
|
48
|
+
"airtap-playwright": "^1.0.1",
|
|
45
49
|
"eslint": "^8.3.0",
|
|
46
50
|
"nyc": "^15.1.0",
|
|
47
51
|
"sinon": "^9.2.4",
|