node-schedule 2.1.0 → 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,34 +1,46 @@
1
- # Master (Unreleased)
2
-
3
- # 2.1.0 - 28 November, 2021
4
-
5
- ### New features:
6
-
7
- - Implement support for graceful shutdown #583
8
- - Emit a success event after a successful job invocation. #643
9
-
10
- # 2.0.0 - 01 February, 2021
11
-
12
- ### Breaking changes:
13
-
14
- - Drop support for Node < 6
15
- - Remove support for job objects. See `UPGRADING.md` for more details. #557
16
-
17
- ### New features:
18
-
19
- - Introduce compatibility with browsers and Electron #553
20
-
21
- ### Bug fixes:
22
-
23
- - Avoid leaking memory on one-off jobs #581
24
- - Address anonymous job id collision problem to ensure that node-schedule could run with the unlimited uptime #582
25
-
26
- ### Internal changes:
27
-
28
- - Bump cron-parser from 2.18.0 to 3.1.0 #562
29
- - Bump sinon from 1.17.7 to 9.2.4 #566
30
- - Switch to nyc from istanbul #574
31
- - Convert tests from nodeunit to Tape #575
32
- - Replace var with let/const #577
33
- - Execute airtap tests on a headless Chromium #578
34
- - 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/README.md CHANGED
@@ -183,6 +183,7 @@ Timezones are also supported. Here is an example of executing at the start of ev
183
183
  ```js
184
184
  const rule = new schedule.RecurrenceRule();
185
185
  rule.hour = 0;
186
+ rule.minute = 0;
186
187
  rule.tz = 'Etc/UTC';
187
188
 
188
189
  const job = schedule.scheduleJob(rule, function(){
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.0",
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",
@@ -36,12 +38,14 @@
36
38
  "url": "https://github.com/node-schedule/node-schedule.git"
37
39
  },
38
40
  "dependencies": {
39
- "cron-parser": "^3.5.0",
41
+ "cron-parser": "^4.2.0",
40
42
  "long-timeout": "0.1.1",
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",