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 CHANGED
@@ -1,40 +1,46 @@
1
- # Master (Unreleased)
2
-
3
- # 2.1.1 - 11 January, 2023
4
-
5
- ### Bug fixes:
6
-
7
- - Bump cron-parser from 3.5.0 to 4.2.0 - security fix #642
8
-
9
- # 2.1.0 - 28 November, 2021
10
-
11
- ### New features:
12
-
13
- - Implement support for graceful shutdown #583
14
- - Emit a success event after a successful job invocation. #643
15
-
16
- # 2.0.0 - 01 February, 2021
17
-
18
- ### Breaking changes:
19
-
20
- - Drop support for Node < 6
21
- - Remove support for job objects. See `UPGRADING.md` for more details. #557
22
-
23
- ### New features:
24
-
25
- - Introduce compatibility with browsers and Electron #553
26
-
27
- ### Bug fixes:
28
-
29
- - Avoid leaking memory on one-off jobs #581
30
- - Address anonymous job id collision problem to ensure that node-schedule could run with the unlimited uptime #582
31
-
32
- ### Internal changes:
33
-
34
- - Bump cron-parser from 2.18.0 to 3.1.0 #562
35
- - Bump sinon from 1.17.7 to 9.2.4 #566
36
- - Switch to nyc from istanbul #574
37
- - Convert tests from nodeunit to Tape #575
38
- - Replace var with let/const #577
39
- - Execute airtap tests on a headless Chromium #578
40
- - Make structure more modular #579
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.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",