cron 4.4.0 → 4.4.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 +171 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +7 -1
- package/dist/job.d.ts +1 -2
- package/dist/job.js +6 -15
- package/dist/time.d.ts +5 -2
- package/dist/time.js +45 -15
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,174 @@
|
|
|
1
|
+
## [4.4.2](https://github.com/kelektiv/node-cron/compare/v4.4.1...v4.4.2) (2026-11-23)
|
|
2
|
+
|
|
3
|
+
### 🐛 Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **time:** stop daily jobs firing twice at southern spring-forward jumps ([#1105](https://github.com/kelektiv/node-cron/issues/1105)) ([2edbb11](https://github.com/kelektiv/node-cron/commit/2edbb118070c0e48540769449e3573942d0c9002)), closes [#1092](https://github.com/kelektiv/node-cron/issues/1092) [#1092](https://github.com/kelektiv/node-cron/issues/1092) [#1099](https://github.com/kelektiv/node-cron/issues/1099) [#1087](https://github.com/kelektiv/node-cron/issues/1087) [#1102](https://github.com/kelektiv/node-cron/issues/1102) [#1103](https://github.com/kelektiv/node-cron/issues/1103)
|
|
6
|
+
|
|
7
|
+
## [4.4.1](https://github.com/kelektiv/node-cron/compare/v4.4.0...v4.4.1) (2026-11-20)
|
|
8
|
+
|
|
9
|
+
### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
* stop jobs scheduled after a repeated DST hour from also running in it ([#1092](https://github.com/kelektiv/node-cron/issues/1092)) ([cba5b52](https://github.com/kelektiv/node-cron/commit/cba5b5276cc324035296f7fac45717aefc7d9c66)), closes [#966](https://github.com/kelektiv/node-cron/issues/966) [#881](https://github.com/kelektiv/node-cron/issues/881) [#1087](https://github.com/kelektiv/node-cron/issues/1087) [#1088](https://github.com/kelektiv/node-cron/issues/1088) [#881](https://github.com/kelektiv/node-cron/issues/881) [#1088](https://github.com/kelektiv/node-cron/issues/1088)
|
|
12
|
+
|
|
13
|
+
### 📦 Code Refactoring
|
|
14
|
+
|
|
15
|
+
* **errors:** dedupe timeZone/utcOffset exclusivity check ([#1084](https://github.com/kelektiv/node-cron/issues/1084)) ([d0656c3](https://github.com/kelektiv/node-cron/commit/d0656c3f3c4fc512ebfd0c19bee1c3e5be1574e5)), closes [#704](https://github.com/kelektiv/node-cron/issues/704) [#704](https://github.com/kelektiv/node-cron/issues/704)
|
|
16
|
+
* simplify CronJob and CronTime constructor overloads for timeZone/utcOffset exclusivity ([#1065](https://github.com/kelektiv/node-cron/issues/1065)) ([42c924a](https://github.com/kelektiv/node-cron/commit/42c924a3502abc1aff98ddef39b6850343d18eda)), closes [#704](https://github.com/kelektiv/node-cron/issues/704)
|
|
17
|
+
* simplify exclusive timeZone/utcOffset runtime check ([#1067](https://github.com/kelektiv/node-cron/issues/1067)) ([828e870](https://github.com/kelektiv/node-cron/commit/828e870704b3e28c9eb58fbf1fca9e8f09456a78)), closes [#704](https://github.com/kelektiv/node-cron/issues/704) [#704](https://github.com/kelektiv/node-cron/issues/704)
|
|
18
|
+
|
|
19
|
+
### ♻️ Chores
|
|
20
|
+
|
|
21
|
+
* **action:** update actions/checkout action to v6.0.1 ([2153c8e](https://github.com/kelektiv/node-cron/commit/2153c8e156b902e7ac83382055cdc804ef00b807))
|
|
22
|
+
* **action:** update actions/checkout action to v6.0.2 ([#1039](https://github.com/kelektiv/node-cron/issues/1039)) ([8f8adfa](https://github.com/kelektiv/node-cron/commit/8f8adfad4f79400e5c377f986e626b9e6334604e))
|
|
23
|
+
* **action:** update actions/checkout action to v6.0.3 ([03c5afe](https://github.com/kelektiv/node-cron/commit/03c5afe770ce99abfabe57216281dcc6a6aebf10))
|
|
24
|
+
* **action:** update actions/checkout action to v6.1.0 ([#1079](https://github.com/kelektiv/node-cron/issues/1079)) ([6d72e75](https://github.com/kelektiv/node-cron/commit/6d72e758170ef10dfebde8aaee7f6e214f9db96d))
|
|
25
|
+
* **action:** update actions/checkout action to v7 ([#1069](https://github.com/kelektiv/node-cron/issues/1069)) ([6bb1a95](https://github.com/kelektiv/node-cron/commit/6bb1a950357db85a8f0f1f839ab08e8f9e26b45c))
|
|
26
|
+
* **action:** update actions/create-github-app-token action to v2.2.1 ([9c1c59c](https://github.com/kelektiv/node-cron/commit/9c1c59c3ddbc8cdf7b1d1ccaba0f5a5891a45313))
|
|
27
|
+
* **action:** update actions/create-github-app-token action to v2.2.2 ([#1054](https://github.com/kelektiv/node-cron/issues/1054)) ([b4a8962](https://github.com/kelektiv/node-cron/commit/b4a8962a67749c1784d4bd2e905009f8ae48d886))
|
|
28
|
+
* **action:** update actions/setup-node action to v6.1.0 ([8fa54cf](https://github.com/kelektiv/node-cron/commit/8fa54cf35c276f679c5514c55c9ad1026fcda4c5))
|
|
29
|
+
* **action:** update actions/setup-node action to v6.2.0 ([2c74dac](https://github.com/kelektiv/node-cron/commit/2c74dacccadbd0b267d046e0595605ce23e967b2))
|
|
30
|
+
* **action:** update actions/setup-node action to v6.3.0 ([#1051](https://github.com/kelektiv/node-cron/issues/1051)) ([f38b136](https://github.com/kelektiv/node-cron/commit/f38b13673d42c69fc1e620a7a93285c250fe6662))
|
|
31
|
+
* **action:** update actions/setup-node action to v6.4.0 ([211cf2c](https://github.com/kelektiv/node-cron/commit/211cf2c08165193737fb66cc9047089690052838))
|
|
32
|
+
* **action:** update actions/setup-node action to v6.5.0 ([fd8a2fa](https://github.com/kelektiv/node-cron/commit/fd8a2fa0a384185bd4332e7b6c1e967856c1540d))
|
|
33
|
+
* **action:** update actions/setup-node action to v7 ([#1076](https://github.com/kelektiv/node-cron/issues/1076)) ([6ebc85a](https://github.com/kelektiv/node-cron/commit/6ebc85a831a90f30bc8d3bb5ff53cc547691d6cb))
|
|
34
|
+
* **action:** update actions/setup-node action to v7.1.0 ([d3a1871](https://github.com/kelektiv/node-cron/commit/d3a187105a5309d67bf486b960039aa27f9c9531))
|
|
35
|
+
* **action:** update amannn/action-semantic-pull-request action to v6.1.2 ([412a1c6](https://github.com/kelektiv/node-cron/commit/412a1c61aac19084031f66e79874dff6c5a13241))
|
|
36
|
+
* **action:** update github/codeql-action action to v4.31.11 ([5f19571](https://github.com/kelektiv/node-cron/commit/5f195719393328cfb5a55b098b8329526fffa2a5))
|
|
37
|
+
* **action:** update github/codeql-action action to v4.31.7 ([6b0a43b](https://github.com/kelektiv/node-cron/commit/6b0a43b4e5d8211a8dcf57d0a010fbc6fcc4f73c))
|
|
38
|
+
* **action:** update github/codeql-action action to v4.31.9 ([#1036](https://github.com/kelektiv/node-cron/issues/1036)) ([3f5f6ec](https://github.com/kelektiv/node-cron/commit/3f5f6ec6b528749f65e4d91c2afab444e8865aec))
|
|
39
|
+
* **action:** update github/codeql-action action to v4.32.2 ([96a330a](https://github.com/kelektiv/node-cron/commit/96a330af0f9144b73ee166cdc93541d969f4a622))
|
|
40
|
+
* **action:** update github/codeql-action action to v4.32.4 ([#1046](https://github.com/kelektiv/node-cron/issues/1046)) ([682c73e](https://github.com/kelektiv/node-cron/commit/682c73e452bc136c8210a34fe59c3443276a4673))
|
|
41
|
+
* **action:** update github/codeql-action action to v4.32.6 ([a28b1c5](https://github.com/kelektiv/node-cron/commit/a28b1c53be608bd0dbe8ea63fec15365a5f7d36c))
|
|
42
|
+
* **action:** update github/codeql-action action to v4.34.1 ([#1055](https://github.com/kelektiv/node-cron/issues/1055)) ([8d7d0cb](https://github.com/kelektiv/node-cron/commit/8d7d0cb120f8e9a7da953dedfaae35581e100da4))
|
|
43
|
+
* **action:** update github/codeql-action action to v4.35.1 ([96d42dc](https://github.com/kelektiv/node-cron/commit/96d42dc1cd2e99548402d23bf90e18179bca46f9))
|
|
44
|
+
* **action:** update github/codeql-action action to v4.35.2 ([74e95f2](https://github.com/kelektiv/node-cron/commit/74e95f21760086e572f6ddf11ab6687b2034aec3))
|
|
45
|
+
* **action:** update github/codeql-action action to v4.35.4 ([09e38a3](https://github.com/kelektiv/node-cron/commit/09e38a3ef0872806e6422ed9a698371d30ca4c49))
|
|
46
|
+
* **action:** update github/codeql-action action to v4.36.0 ([2656649](https://github.com/kelektiv/node-cron/commit/2656649ac5da232ccabbe3224bc231c7645facfc))
|
|
47
|
+
* **action:** update github/codeql-action action to v4.36.2 ([2c2e120](https://github.com/kelektiv/node-cron/commit/2c2e120c1f22d864b7df550805d17955df79d0fa))
|
|
48
|
+
* **action:** update github/codeql-action action to v4.37.0 ([2e82282](https://github.com/kelektiv/node-cron/commit/2e822820d03cacdf7a20d027f1053c1f56f0a5d6))
|
|
49
|
+
* **action:** update github/codeql-action action to v4.37.3 ([e956198](https://github.com/kelektiv/node-cron/commit/e956198a3eb5955bdeab275650f55e203d71938a))
|
|
50
|
+
* **action:** update github/codeql-action action to v4.37.6 ([754491b](https://github.com/kelektiv/node-cron/commit/754491b51aae4e38a069a26cd5a90554ee1b3f7f))
|
|
51
|
+
* **action:** update github/codeql-action action to v4.37.8 ([4a993ce](https://github.com/kelektiv/node-cron/commit/4a993ce1aaf286a965b6f7a94cec5ce8ca5db3bd))
|
|
52
|
+
* **action:** update github/codeql-action action to v4.38.0 ([b75fae8](https://github.com/kelektiv/node-cron/commit/b75fae860baa9ae6178d78aaf900247893f14ded))
|
|
53
|
+
* **action:** update github/codeql-action action to v4.38.2 ([5e6e413](https://github.com/kelektiv/node-cron/commit/5e6e4135668ec377b6281ff235156e9be5046fad))
|
|
54
|
+
* **action:** update github/codeql-action action to v4.38.3 ([6722374](https://github.com/kelektiv/node-cron/commit/672237448ea4bd119fd4380edff38b5cab5cc784))
|
|
55
|
+
* **action:** update github/codeql-action action to v4.39.1 ([#1097](https://github.com/kelektiv/node-cron/issues/1097)) ([82e8dca](https://github.com/kelektiv/node-cron/commit/82e8dcac2ccd92b5be0aa5a87c0c98e36c1fc33e))
|
|
56
|
+
* **action:** update github/codeql-action action to v4.39.3 ([cb85ce0](https://github.com/kelektiv/node-cron/commit/cb85ce0a958523a2e1487b6491a38e0b98560717))
|
|
57
|
+
* **action:** update ossf/scorecard-action action to v2.4.4 ([96ccdf4](https://github.com/kelektiv/node-cron/commit/96ccdf4400ac1a6fe3f7bcba203438a860a6664d))
|
|
58
|
+
* **action:** update ossf/scorecard-action action to v2.5.0 ([#1098](https://github.com/kelektiv/node-cron/issues/1098)) ([4d729cf](https://github.com/kelektiv/node-cron/commit/4d729cf1f322ecb05edb6aeb33ecf69e3001d6ed))
|
|
59
|
+
* **action:** update step-security/harden-runner action to v2.14.0 ([124902d](https://github.com/kelektiv/node-cron/commit/124902d857b4061c06ffc56e214dd240d5b2810d))
|
|
60
|
+
* **action:** update step-security/harden-runner action to v2.14.2 ([96b904e](https://github.com/kelektiv/node-cron/commit/96b904ec3fb36f03e30ba929e381d1d8dc9e6876))
|
|
61
|
+
* **action:** update step-security/harden-runner action to v2.15.0 ([d6f7c4a](https://github.com/kelektiv/node-cron/commit/d6f7c4aca9cd0d9a40a3cb8ee73c08e9be4ec3e9))
|
|
62
|
+
* **action:** update step-security/harden-runner action to v2.15.1 ([1cc562b](https://github.com/kelektiv/node-cron/commit/1cc562ba86db14404340f280bf9e0c86c73b9173))
|
|
63
|
+
* **action:** update step-security/harden-runner action to v2.16.0 ([67e36be](https://github.com/kelektiv/node-cron/commit/67e36bebcca7277720af529069716902d679ec4c))
|
|
64
|
+
* **action:** update step-security/harden-runner action to v2.17.0 ([d5f870a](https://github.com/kelektiv/node-cron/commit/d5f870a937209720cae5b14312b91b73c1e325bf))
|
|
65
|
+
* **action:** update step-security/harden-runner action to v2.19.0 ([#1060](https://github.com/kelektiv/node-cron/issues/1060)) ([d0a94b4](https://github.com/kelektiv/node-cron/commit/d0a94b4a64b5bc706d8c5b42bc88e9afd2d534aa))
|
|
66
|
+
* **action:** update step-security/harden-runner action to v2.19.1 ([0d43e1d](https://github.com/kelektiv/node-cron/commit/0d43e1d83e629c4d38104a72ac9b1208a8edc6cd))
|
|
67
|
+
* **action:** update step-security/harden-runner action to v2.19.4 ([5b12609](https://github.com/kelektiv/node-cron/commit/5b12609b7e1d11469abd73dab9a222382fecfa92))
|
|
68
|
+
* **action:** update step-security/harden-runner action to v2.20.0 ([d87f6aa](https://github.com/kelektiv/node-cron/commit/d87f6aa8be7d1e50734644271305d9dd5289bc80))
|
|
69
|
+
* **action:** update step-security/harden-runner action to v2.20.1 ([d6ca6a1](https://github.com/kelektiv/node-cron/commit/d6ca6a1518f65645c14561877df02beff811187e))
|
|
70
|
+
* **action:** update step-security/harden-runner action to v2.21.0 ([5ed9636](https://github.com/kelektiv/node-cron/commit/5ed96369370483f5161cd7637e70ccddf80c8f43))
|
|
71
|
+
* **action:** update step-security/harden-runner action to v2.21.1 ([80f52ec](https://github.com/kelektiv/node-cron/commit/80f52ece23bdea66941f905ac56079bc46ae5f2f))
|
|
72
|
+
* **action:** update step-security/harden-runner action to v2.22.1 ([74876a6](https://github.com/kelektiv/node-cron/commit/74876a6e27ecb4679c995d699f75ece10f0d306f))
|
|
73
|
+
* **action:** update step-security/harden-runner action to v2.22.2 ([#1094](https://github.com/kelektiv/node-cron/issues/1094)) ([cf2688c](https://github.com/kelektiv/node-cron/commit/cf2688c26c5e585ca1b049ed6f957bf87e73ba71))
|
|
74
|
+
* **action:** update step-security/harden-runner action to v2.22.4 ([92cc93b](https://github.com/kelektiv/node-cron/commit/92cc93b40f962543be17d663f8bae3ac3d078a05))
|
|
75
|
+
* **deps:** lock file maintenance ([56af005](https://github.com/kelektiv/node-cron/commit/56af005cc577556c487524f82175437ddf148ac1))
|
|
76
|
+
* **deps:** lock file maintenance ([a69bc0d](https://github.com/kelektiv/node-cron/commit/a69bc0d2661754be36b4293de72e934684c9592b))
|
|
77
|
+
* **deps:** lock file maintenance ([6dae922](https://github.com/kelektiv/node-cron/commit/6dae922cb569bb952395a461c91d3eb57ecad32e))
|
|
78
|
+
* **deps:** lock file maintenance ([c53af48](https://github.com/kelektiv/node-cron/commit/c53af484c7d9097b50ccc26df129017bfd8e9cf7))
|
|
79
|
+
* **deps:** lock file maintenance ([7ffa0d5](https://github.com/kelektiv/node-cron/commit/7ffa0d5820b7b36202411bb8c31ff64c3511a27d))
|
|
80
|
+
* **deps:** lock file maintenance ([12cacfe](https://github.com/kelektiv/node-cron/commit/12cacfe278c6d83e29e9e731a0aed87e6fb57ba9))
|
|
81
|
+
* **deps:** lock file maintenance ([8b16b60](https://github.com/kelektiv/node-cron/commit/8b16b601eba4883bb0ad831a824a2fff3f8638e6))
|
|
82
|
+
* **deps:** lock file maintenance ([f16969c](https://github.com/kelektiv/node-cron/commit/f16969c0bb5c415cfaad50ac959e95cf4ec544f1))
|
|
83
|
+
* **deps:** lock file maintenance ([58fd4b4](https://github.com/kelektiv/node-cron/commit/58fd4b4265214fab9fc86a21fbadbeaaf2a31686))
|
|
84
|
+
* **deps:** lock file maintenance ([d20084a](https://github.com/kelektiv/node-cron/commit/d20084af3b5e7a73a99962c6334c125c490b8869))
|
|
85
|
+
* **deps:** lock file maintenance ([87adde4](https://github.com/kelektiv/node-cron/commit/87adde4ab2b8ecb1a615a62aad042529551c52cf))
|
|
86
|
+
* **deps:** lock file maintenance ([492911a](https://github.com/kelektiv/node-cron/commit/492911a5a19a5b3673c95e517c0111d140137296))
|
|
87
|
+
* **deps:** lock file maintenance ([dff54e7](https://github.com/kelektiv/node-cron/commit/dff54e7de29d1aec17958c56d68b45197cfd8fd2))
|
|
88
|
+
* **deps:** lock file maintenance ([2aca64f](https://github.com/kelektiv/node-cron/commit/2aca64f9f2b2e11836d7413642ed8d66aa3f9362))
|
|
89
|
+
* **deps:** lock file maintenance ([75379ec](https://github.com/kelektiv/node-cron/commit/75379ec478eccc08950ec6b998eeed87175d6999))
|
|
90
|
+
* **deps:** lock file maintenance ([42ab85b](https://github.com/kelektiv/node-cron/commit/42ab85b612a66019b6c7b892fce5cf6d8b464c6f))
|
|
91
|
+
* **deps:** lock file maintenance ([316d619](https://github.com/kelektiv/node-cron/commit/316d619204c96f45478a99e3c584c217b0a62892))
|
|
92
|
+
* **deps:** lock file maintenance ([90f266d](https://github.com/kelektiv/node-cron/commit/90f266df0437d03d5200d42857a5511dbe09559b))
|
|
93
|
+
* **deps:** lock file maintenance ([fcb3997](https://github.com/kelektiv/node-cron/commit/fcb399779a4d7d2546a8344759fb489fb4fd87d4))
|
|
94
|
+
* **deps:** lock file maintenance ([00f17d9](https://github.com/kelektiv/node-cron/commit/00f17d90ccb69cbda9b73157017578024198a1a4))
|
|
95
|
+
* **deps:** lock file maintenance ([b5f3a13](https://github.com/kelektiv/node-cron/commit/b5f3a131e49595bc2879085450ba000dc9a1e930))
|
|
96
|
+
* **deps:** lock file maintenance ([f422680](https://github.com/kelektiv/node-cron/commit/f422680d6699eb79d954c5a13a752aadd6e4aff9))
|
|
97
|
+
* **deps:** lock file maintenance ([e60e68a](https://github.com/kelektiv/node-cron/commit/e60e68a8f38682d18ac324bd50244303b0a7d840))
|
|
98
|
+
* **deps:** lock file maintenance ([8511a44](https://github.com/kelektiv/node-cron/commit/8511a441fbee9a1469ec1e805f627a99fb3cc98b))
|
|
99
|
+
* **deps:** lock file maintenance ([ab5ffa0](https://github.com/kelektiv/node-cron/commit/ab5ffa06e2c2b175941624e0b8bc20a613444f07))
|
|
100
|
+
* **deps:** lock file maintenance ([1a4cfd9](https://github.com/kelektiv/node-cron/commit/1a4cfd9dd6e6e89438efbde6a8c5fb9235bef515))
|
|
101
|
+
* **deps:** lock file maintenance ([86c5f15](https://github.com/kelektiv/node-cron/commit/86c5f15cf94e0016e799b26a985ea9cb6b779632))
|
|
102
|
+
* **deps:** lock file maintenance ([0aca5a1](https://github.com/kelektiv/node-cron/commit/0aca5a1023519a074e9e68cff22ef94f2e1ee65c))
|
|
103
|
+
* **deps:** lock file maintenance ([ae7cc48](https://github.com/kelektiv/node-cron/commit/ae7cc48b33f0b073a1a0f92fef08a212aae0ab6c))
|
|
104
|
+
* **deps:** lock file maintenance ([#1043](https://github.com/kelektiv/node-cron/issues/1043)) ([1eb113c](https://github.com/kelektiv/node-cron/commit/1eb113c4763012cf1fdbf0a69fbf4bbeae964368))
|
|
105
|
+
* **deps:** lock file maintenance ([#1047](https://github.com/kelektiv/node-cron/issues/1047)) ([624958f](https://github.com/kelektiv/node-cron/commit/624958f97c15d91699f56d2770f443f3b8c8e497))
|
|
106
|
+
* **deps:** lock file maintenance ([#1057](https://github.com/kelektiv/node-cron/issues/1057)) ([4890cd9](https://github.com/kelektiv/node-cron/commit/4890cd9f590857750189b21a98531d5f0a8a8562))
|
|
107
|
+
* **deps:** lock file maintenance ([#1074](https://github.com/kelektiv/node-cron/issues/1074)) ([057bc1f](https://github.com/kelektiv/node-cron/commit/057bc1fdb387d4cb4c71c91d7144cc2dc1d239e5))
|
|
108
|
+
* **deps:** lock file maintenance ([#1080](https://github.com/kelektiv/node-cron/issues/1080)) ([764b61c](https://github.com/kelektiv/node-cron/commit/764b61ccc44d1be4fd20e9c09b5b344a2fc76e7b))
|
|
109
|
+
* **deps:** lock file maintenance ([#1083](https://github.com/kelektiv/node-cron/issues/1083)) ([7b293c0](https://github.com/kelektiv/node-cron/commit/7b293c0b5493165e9cc101d2e7ae50fe1ecaddbb))
|
|
110
|
+
* **deps:** lock file maintenance ([#1091](https://github.com/kelektiv/node-cron/issues/1091)) ([37a257b](https://github.com/kelektiv/node-cron/commit/37a257b1fa3adf4a54f0e2452d7639861b5d6932))
|
|
111
|
+
* **deps:** update dependency [@commitlint](https://github.com/commitlint)/cli to v20.2.0 ([d4f42d1](https://github.com/kelektiv/node-cron/commit/d4f42d12313741008dbeb26b36f1c32db374e97d))
|
|
112
|
+
* **deps:** update dependency [@commitlint](https://github.com/commitlint)/cli to v20.3.0 ([296666b](https://github.com/kelektiv/node-cron/commit/296666b82699101b6f7af96954016c2a746fa59d))
|
|
113
|
+
* **deps:** update dependency [@commitlint](https://github.com/commitlint)/cli to v20.3.1 ([#1041](https://github.com/kelektiv/node-cron/issues/1041)) ([5132ef5](https://github.com/kelektiv/node-cron/commit/5132ef5025f5aabe6ed0dca170af976ef11b6717))
|
|
114
|
+
* **deps:** update dependency [@commitlint](https://github.com/commitlint)/cli to v20.5.0 ([d9d9188](https://github.com/kelektiv/node-cron/commit/d9d91883eee52835f9447ea3101244787ffec472))
|
|
115
|
+
* **deps:** update dependency [@commitlint](https://github.com/commitlint)/cli to v20.5.3 ([af6b71a](https://github.com/kelektiv/node-cron/commit/af6b71aece905bf2685433467a54568cae9404fe))
|
|
116
|
+
* **deps:** update dependency [@eslint](https://github.com/eslint)/js to v9.39.2 ([fdf6d4f](https://github.com/kelektiv/node-cron/commit/fdf6d4fbb2915290bc6de00831ba0b9dbe645701))
|
|
117
|
+
* **deps:** update dependency [@eslint](https://github.com/eslint)/js to v9.39.3 ([6bf5b52](https://github.com/kelektiv/node-cron/commit/6bf5b5239224daa65d97e05f276fa73b89b92d79))
|
|
118
|
+
* **deps:** update dependency [@eslint](https://github.com/eslint)/js to v9.39.4 ([78064fb](https://github.com/kelektiv/node-cron/commit/78064fb89be71085a91e8170b5db9d735a7ef9b4))
|
|
119
|
+
* **deps:** update dependency [@fast-check](https://github.com/fast-check)/jest to v2.2.0 ([2441985](https://github.com/kelektiv/node-cron/commit/244198563a361f62b5a8ec80da5c569da6445ee0))
|
|
120
|
+
* **deps:** update dependency [@fast-check](https://github.com/fast-check)/jest to v2.3.0 ([#1090](https://github.com/kelektiv/node-cron/issues/1090)) ([01c9e99](https://github.com/kelektiv/node-cron/commit/01c9e99058e977ffc4d68dc163472ea0f9db946a))
|
|
121
|
+
* **deps:** update dependency [@semantic-release](https://github.com/semantic-release)/github to v12.0.9 ([cc67332](https://github.com/kelektiv/node-cron/commit/cc673325f6a2cc192b97e60aec1a65de534988b1))
|
|
122
|
+
* **deps:** update dependency [@semantic-release](https://github.com/semantic-release)/npm to v13.1.3 ([#1037](https://github.com/kelektiv/node-cron/issues/1037)) ([b8b958a](https://github.com/kelektiv/node-cron/commit/b8b958ac7f7883c911891f0dded55ba04253e582))
|
|
123
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.10 ([56fc57e](https://github.com/kelektiv/node-cron/commit/56fc57e89f83884a3f9f507d89ef39b528040d43))
|
|
124
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.11 ([71e0eea](https://github.com/kelektiv/node-cron/commit/71e0eea6a7833f57e04744757b5a5ebb9092ebaf))
|
|
125
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.18 ([a4bae8d](https://github.com/kelektiv/node-cron/commit/a4bae8d228e4fd6eca98d87565d85b6e64461ce0))
|
|
126
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.21 ([9a7dbd4](https://github.com/kelektiv/node-cron/commit/9a7dbd4143f058a1178af7cadb10072c8a70b858))
|
|
127
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.24 ([affaa01](https://github.com/kelektiv/node-cron/commit/affaa0189fc6f9191bded91a297e0f69fe919c30))
|
|
128
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.30 ([862c2ed](https://github.com/kelektiv/node-cron/commit/862c2ede1862275f17176ed7cb97a985526bbced))
|
|
129
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.33 ([ac4bfff](https://github.com/kelektiv/node-cron/commit/ac4bfff08648bf2768bace23a599a6433355da65))
|
|
130
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.43 ([92f5848](https://github.com/kelektiv/node-cron/commit/92f5848f1265412f468c6a1008d62349b3c251ad))
|
|
131
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.46 ([a98d7ed](https://github.com/kelektiv/node-cron/commit/a98d7ed5cf3b0fd1721d569a5b3b4db06e97de22))
|
|
132
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.47 ([c61730f](https://github.com/kelektiv/node-cron/commit/c61730f7300323086190faeca99928b87650b0fb))
|
|
133
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.7 ([1c23b91](https://github.com/kelektiv/node-cron/commit/1c23b9124071ab64e7f6b5dcdf31e42a825d83d7))
|
|
134
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.15.8 ([8e88e7c](https://github.com/kelektiv/node-cron/commit/8e88e7c5f2c99334715ab1d3fd34fd819fe0d26a))
|
|
135
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.16.1 ([50622e4](https://github.com/kelektiv/node-cron/commit/50622e4fe4b75a77ce9ff75e8438063bc55b5df6))
|
|
136
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.16.13 ([bce2235](https://github.com/kelektiv/node-cron/commit/bce2235ed30eaacc0473a300880ae3defcd3a0e8))
|
|
137
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.16.2 ([8880046](https://github.com/kelektiv/node-cron/commit/88800462c98fa4d4aadf34d3fa925f20afcffd63))
|
|
138
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.16.20 ([#1095](https://github.com/kelektiv/node-cron/issues/1095)) ([2665caa](https://github.com/kelektiv/node-cron/commit/2665caad82606217ff44921aab55b15e7288c9f2))
|
|
139
|
+
* **deps:** update dependency [@swc](https://github.com/swc)/core to v1.16.22 ([1b7a228](https://github.com/kelektiv/node-cron/commit/1b7a228e212f744f350f70612ee108f3d09ac688))
|
|
140
|
+
* **deps:** update dependency [@types](https://github.com/types)/node to v24.10.4 ([fc55c26](https://github.com/kelektiv/node-cron/commit/fc55c26dbd631cc38ac4577c08a2eb91680f4d00))
|
|
141
|
+
* **deps:** update dependency [@types](https://github.com/types)/sinon to v21.0.1 ([1cd9c4c](https://github.com/kelektiv/node-cron/commit/1cd9c4cbbdb564499f9bf7be5c50eb779f5def4f))
|
|
142
|
+
* **deps:** update dependency [@types](https://github.com/types)/sinon to v22.0.1 ([#1096](https://github.com/kelektiv/node-cron/issues/1096)) ([a6c3956](https://github.com/kelektiv/node-cron/commit/a6c39566f38b80d70ba2c7fb849930e0da5c474d))
|
|
143
|
+
* **deps:** update dependency [@types](https://github.com/types)/sinon to v22.0.2 ([d78efd3](https://github.com/kelektiv/node-cron/commit/d78efd34af3c3efa8edeb74856ef29e31057e8da))
|
|
144
|
+
* **deps:** update dependency jest to v30.4.0 ([8a018f6](https://github.com/kelektiv/node-cron/commit/8a018f6ad9d9306cf71d2eca97dcf0f51b07d84e))
|
|
145
|
+
* **deps:** update dependency jest to v30.4.2 ([#1064](https://github.com/kelektiv/node-cron/issues/1064)) ([215f445](https://github.com/kelektiv/node-cron/commit/215f44503bb1bb711afc8fc7a05e3a238c658530))
|
|
146
|
+
* **deps:** update dependency jest to v30.5.1 ([440fd01](https://github.com/kelektiv/node-cron/commit/440fd0194921ff1f1cfad6891c32998a98c521d2))
|
|
147
|
+
* **deps:** update dependency jest to v30.5.2 ([1d80980](https://github.com/kelektiv/node-cron/commit/1d809808ca43289171674b6dc2ec703b2d18a5e4))
|
|
148
|
+
* **deps:** update dependency prettier to v3.7.4 ([1477c8c](https://github.com/kelektiv/node-cron/commit/1477c8c5c1e2e33ef0706e6ffb7322ff6c474a8a))
|
|
149
|
+
* **deps:** update dependency prettier to v3.8.3 ([db7ffdd](https://github.com/kelektiv/node-cron/commit/db7ffdd19931c8f1c9f0611529ebf8d22834d383))
|
|
150
|
+
* **deps:** update dependency semantic-release to v25.0.8 ([#1078](https://github.com/kelektiv/node-cron/issues/1078)) ([4a6e38e](https://github.com/kelektiv/node-cron/commit/4a6e38e044cc7b6f86c79e5f1448696b1feffb17))
|
|
151
|
+
* **deps:** update dependency semantic-release to v25.0.9 ([24cfa9e](https://github.com/kelektiv/node-cron/commit/24cfa9e717256437853d5774aa3fa0cfa39fb833))
|
|
152
|
+
* **deps:** update dependency sinon to v21.0.1 ([0c08d65](https://github.com/kelektiv/node-cron/commit/0c08d6571a1421b861f98cf53d7b5ea1cf4985d9))
|
|
153
|
+
* **deps:** update dependency sinon to v21.0.2 ([4e33b53](https://github.com/kelektiv/node-cron/commit/4e33b539911a87ab14dc42b4b5e496775001d760))
|
|
154
|
+
* **deps:** update dependency sinon to v21.1.2 ([b8410cb](https://github.com/kelektiv/node-cron/commit/b8410cb3f806062e82b9e09fd31ab039b172443d))
|
|
155
|
+
* **deps:** update linters ([20245c8](https://github.com/kelektiv/node-cron/commit/20245c818370f28654f71e8007413e2fd067dd15))
|
|
156
|
+
* **deps:** update linters ([4944012](https://github.com/kelektiv/node-cron/commit/494401254f7bc2d2fbce952893e7626d03dcfef2))
|
|
157
|
+
* **deps:** update linters to v5.5.6 ([f10f045](https://github.com/kelektiv/node-cron/commit/f10f045abf989797de35b08ce21bd54d10e7ea83))
|
|
158
|
+
* **deps:** update node.js to v24 ([#1025](https://github.com/kelektiv/node-cron/issues/1025)) ([c068045](https://github.com/kelektiv/node-cron/commit/c068045c710d6925ee5ee2346861223a14bffe4d))
|
|
159
|
+
* **deps:** update node.js to v24.12.0 ([#1033](https://github.com/kelektiv/node-cron/issues/1033)) ([8a7a757](https://github.com/kelektiv/node-cron/commit/8a7a75723c119d53b0acf2e0a3513b18841347a8))
|
|
160
|
+
* **deps:** update node.js to v24.20.0 ([#1038](https://github.com/kelektiv/node-cron/issues/1038)) ([0eeccf2](https://github.com/kelektiv/node-cron/commit/0eeccf22119db05d0e2e5e020b9a457942f11ed3))
|
|
161
|
+
* **deps:** update semantic-release related packages ([3b9391e](https://github.com/kelektiv/node-cron/commit/3b9391e283831672eac149a0f660aeb8dac705a7))
|
|
162
|
+
* **deps:** update semantic-release related packages ([fa1aa23](https://github.com/kelektiv/node-cron/commit/fa1aa23add457b52dd7dadf1ae6f762a6c5c0805))
|
|
163
|
+
* **deps:** update semantic-release related packages ([35b0a31](https://github.com/kelektiv/node-cron/commit/35b0a31babf5748a4f320e5f4a1ccbc7fa798f6a))
|
|
164
|
+
* **deps:** update semantic-release related packages ([eded145](https://github.com/kelektiv/node-cron/commit/eded1458c6f9a556362851e8b163c5265da4935a))
|
|
165
|
+
* **deps:** update semantic-release related packages ([2f7514e](https://github.com/kelektiv/node-cron/commit/2f7514e9eafa448706c29c93c507b46910490b10))
|
|
166
|
+
* **deps:** update semantic-release related packages ([149d438](https://github.com/kelektiv/node-cron/commit/149d4384643b4d3f7dfd806162a6b791e9cc5e97))
|
|
167
|
+
* **deps:** update swc monorepo ([9b12004](https://github.com/kelektiv/node-cron/commit/9b12004ff5ab6cdb386eb00a58e1daa4867a2c4e))
|
|
168
|
+
* **deps:** update swc monorepo to v1.15.40 ([bc845a8](https://github.com/kelektiv/node-cron/commit/bc845a881013bd93cbdc5be53ad4af3315a8ecae))
|
|
169
|
+
* **deps:** update tests ([68bf77a](https://github.com/kelektiv/node-cron/commit/68bf77aae1d76a1dd1c64b0a1e5dcc528bff7e8f))
|
|
170
|
+
* **deps:** update tests to v22 ([#1062](https://github.com/kelektiv/node-cron/issues/1062)) ([6fe7b80](https://github.com/kelektiv/node-cron/commit/6fe7b80d78577027f65907b50236cc7254396b75))
|
|
171
|
+
|
|
1
172
|
## [4.4.0](https://github.com/kelektiv/node-cron/compare/v4.3.5...v4.4.0) (2025-12-09)
|
|
2
173
|
|
|
3
174
|
### ✨ Features
|
package/dist/errors.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export declare class CronError extends Error {
|
|
|
3
3
|
export declare class ExclusiveParametersError extends CronError {
|
|
4
4
|
constructor(param1: string, param2: string);
|
|
5
5
|
}
|
|
6
|
+
export declare const assertExclusiveTimeZoneAndUtcOffset: (timeZone?: string | null, utcOffset?: number | null) => void;
|
package/dist/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExclusiveParametersError = exports.CronError = void 0;
|
|
3
|
+
exports.assertExclusiveTimeZoneAndUtcOffset = exports.ExclusiveParametersError = exports.CronError = void 0;
|
|
4
4
|
class CronError extends Error {
|
|
5
5
|
}
|
|
6
6
|
exports.CronError = CronError;
|
|
@@ -10,3 +10,9 @@ class ExclusiveParametersError extends CronError {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.ExclusiveParametersError = ExclusiveParametersError;
|
|
13
|
+
const assertExclusiveTimeZoneAndUtcOffset = (timeZone, utcOffset) => {
|
|
14
|
+
if (timeZone != null && utcOffset != null) {
|
|
15
|
+
throw new ExclusiveParametersError('timeZone', 'utcOffset');
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.assertExclusiveTimeZoneAndUtcOffset = assertExclusiveTimeZoneAndUtcOffset;
|
package/dist/job.d.ts
CHANGED
|
@@ -17,8 +17,7 @@ export declare class CronJob<OC extends CronOnCompleteCommand | null = null, C =
|
|
|
17
17
|
private _callbacks;
|
|
18
18
|
get isActive(): boolean;
|
|
19
19
|
get isCallbackRunning(): boolean;
|
|
20
|
-
constructor(cronTime: CronJobParams<OC, C>['cronTime'], onTick: CronJobParams<OC, C>['onTick'], onComplete?: CronJobParams<OC, C>['onComplete'], start?: CronJobParams<OC, C>['start'], timeZone?: CronJobParams<OC, C>['timeZone'], context?: CronJobParams<OC, C>['context'], runOnInit?: CronJobParams<OC, C>['runOnInit'], utcOffset?:
|
|
21
|
-
constructor(cronTime: CronJobParams<OC, C>['cronTime'], onTick: CronJobParams<OC, C>['onTick'], onComplete?: CronJobParams<OC, C>['onComplete'], start?: CronJobParams<OC, C>['start'], timeZone?: null, context?: CronJobParams<OC, C>['context'], runOnInit?: CronJobParams<OC, C>['runOnInit'], utcOffset?: CronJobParams<OC, C>['utcOffset'], unrefTimeout?: CronJobParams<OC, C>['unrefTimeout'], waitForCompletion?: CronJobParams<OC, C>['waitForCompletion'], errorHandler?: CronJobParams<OC, C>['errorHandler'], name?: CronJobParams<OC, C>['name'], threshold?: CronJobParams<OC, C>['threshold']);
|
|
20
|
+
constructor(cronTime: CronJobParams<OC, C>['cronTime'], onTick: CronJobParams<OC, C>['onTick'], onComplete?: CronJobParams<OC, C>['onComplete'], start?: CronJobParams<OC, C>['start'], timeZone?: CronJobParams<OC, C>['timeZone'], context?: CronJobParams<OC, C>['context'], runOnInit?: CronJobParams<OC, C>['runOnInit'], utcOffset?: CronJobParams<OC, C>['utcOffset'], unrefTimeout?: CronJobParams<OC, C>['unrefTimeout'], waitForCompletion?: CronJobParams<OC, C>['waitForCompletion'], errorHandler?: CronJobParams<OC, C>['errorHandler'], name?: CronJobParams<OC, C>['name'], threshold?: CronJobParams<OC, C>['threshold']);
|
|
22
21
|
static from<OC extends CronOnCompleteCommand | null = null, C = null>(params: CronJobParams<OC, C>): CronJob<OC, C>;
|
|
23
22
|
private _fnWrap;
|
|
24
23
|
addCallback(callback: CronCallback<C, WithOnComplete<OC>>): void;
|
package/dist/job.js
CHANGED
|
@@ -32,18 +32,11 @@ class CronJob {
|
|
|
32
32
|
this.context = (context !== null && context !== void 0 ? context : this);
|
|
33
33
|
this.waitForCompletion = Boolean(waitForCompletion);
|
|
34
34
|
this.errorHandler = errorHandler;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
else if (utcOffset != null) {
|
|
42
|
-
this.cronTime = new time_1.CronTime(cronTime, null, utcOffset);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.cronTime = new time_1.CronTime(cronTime, timeZone, utcOffset);
|
|
46
|
-
}
|
|
35
|
+
(0, errors_1.assertExclusiveTimeZoneAndUtcOffset)(timeZone, utcOffset);
|
|
36
|
+
this.cronTime =
|
|
37
|
+
timeZone != null
|
|
38
|
+
? new time_1.CronTime(cronTime, timeZone, null)
|
|
39
|
+
: new time_1.CronTime(cronTime, null, utcOffset !== null && utcOffset !== void 0 ? utcOffset : null);
|
|
47
40
|
if (unrefTimeout != null) {
|
|
48
41
|
this.unrefTimeout = unrefTimeout;
|
|
49
42
|
}
|
|
@@ -68,9 +61,7 @@ class CronJob {
|
|
|
68
61
|
this.start();
|
|
69
62
|
}
|
|
70
63
|
static from(params) {
|
|
71
|
-
|
|
72
|
-
throw new errors_1.ExclusiveParametersError('timeZone', 'utcOffset');
|
|
73
|
-
}
|
|
64
|
+
(0, errors_1.assertExclusiveTimeZoneAndUtcOffset)(params.timeZone, params.utcOffset);
|
|
74
65
|
if (params.timeZone != null) {
|
|
75
66
|
return new CronJob(params.cronTime, params.onTick, params.onComplete, params.start, params.timeZone, params.context, params.runOnInit, params.utcOffset, params.unrefTimeout, params.waitForCompletion, params.errorHandler, params.name, params.threshold);
|
|
76
67
|
}
|
package/dist/time.d.ts
CHANGED
|
@@ -19,13 +19,16 @@ export declare class CronTime {
|
|
|
19
19
|
private dayOfMonth;
|
|
20
20
|
private month;
|
|
21
21
|
private dayOfWeek;
|
|
22
|
-
constructor(source: CronJobParams['cronTime'], timeZone?: CronJobParams['timeZone'], utcOffset?:
|
|
23
|
-
constructor(source: CronJobParams['cronTime'], timeZone?: null, utcOffset?: CronJobParams['utcOffset']);
|
|
22
|
+
constructor(source: CronJobParams['cronTime'], timeZone?: CronJobParams['timeZone'], utcOffset?: CronJobParams['utcOffset']);
|
|
24
23
|
static validateCronExpression(cronExpression: string): {
|
|
25
24
|
valid: boolean;
|
|
26
25
|
error?: CronError;
|
|
27
26
|
};
|
|
28
27
|
private _getWeekDay;
|
|
28
|
+
private _matchesDay;
|
|
29
|
+
private _matches;
|
|
30
|
+
private _matchesMinute;
|
|
31
|
+
private _firstMatchBetween;
|
|
29
32
|
sendAt(): DateTime;
|
|
30
33
|
sendAt(i: number): DateTime[];
|
|
31
34
|
getTimeout(): number;
|
package/dist/time.js
CHANGED
|
@@ -13,9 +13,7 @@ class CronTime {
|
|
|
13
13
|
this.dayOfMonth = {};
|
|
14
14
|
this.month = {};
|
|
15
15
|
this.dayOfWeek = {};
|
|
16
|
-
|
|
17
|
-
throw new errors_1.ExclusiveParametersError('timeZone', 'utcOffset');
|
|
18
|
-
}
|
|
16
|
+
(0, errors_1.assertExclusiveTimeZoneAndUtcOffset)(timeZone, utcOffset);
|
|
19
17
|
if (timeZone) {
|
|
20
18
|
const dt = luxon_1.DateTime.fromObject({}, { zone: timeZone });
|
|
21
19
|
if (!dt.isValid) {
|
|
@@ -57,6 +55,37 @@ class CronTime {
|
|
|
57
55
|
_getWeekDay(date) {
|
|
58
56
|
return date.weekday === 7 ? 0 : date.weekday;
|
|
59
57
|
}
|
|
58
|
+
_matchesDay(date) {
|
|
59
|
+
return !((!(date.day in this.dayOfMonth) &&
|
|
60
|
+
Object.keys(this.dayOfMonth).length !== 31 &&
|
|
61
|
+
!(this._getWeekDay(date) in this.dayOfWeek &&
|
|
62
|
+
Object.keys(this.dayOfWeek).length !== 7)) ||
|
|
63
|
+
(!(this._getWeekDay(date) in this.dayOfWeek) &&
|
|
64
|
+
Object.keys(this.dayOfWeek).length !== 7 &&
|
|
65
|
+
!(date.day in this.dayOfMonth &&
|
|
66
|
+
Object.keys(this.dayOfMonth).length !== 31)));
|
|
67
|
+
}
|
|
68
|
+
_matches(date) {
|
|
69
|
+
return this._matchesMinute(date) && date.second in this.second;
|
|
70
|
+
}
|
|
71
|
+
_matchesMinute(date) {
|
|
72
|
+
return (date.month in this.month &&
|
|
73
|
+
this._matchesDay(date) &&
|
|
74
|
+
date.hour in this.hour &&
|
|
75
|
+
date.minute in this.minute);
|
|
76
|
+
}
|
|
77
|
+
_firstMatchBetween(from, to) {
|
|
78
|
+
let date = from;
|
|
79
|
+
while (date < to) {
|
|
80
|
+
if (this._matches(date)) {
|
|
81
|
+
return date;
|
|
82
|
+
}
|
|
83
|
+
date = this._matchesMinute(date)
|
|
84
|
+
? date.plus({ second: 1 })
|
|
85
|
+
: date.plus({ minute: 1 }).startOf('minute');
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
60
89
|
sendAt(i) {
|
|
61
90
|
let date = this.realDate && this.source instanceof luxon_1.DateTime
|
|
62
91
|
? this.source
|
|
@@ -107,7 +136,7 @@ class CronTime {
|
|
|
107
136
|
});
|
|
108
137
|
}
|
|
109
138
|
getNextDateFrom(start, timeZone) {
|
|
110
|
-
var _a, _b;
|
|
139
|
+
var _a, _b, _c, _d;
|
|
111
140
|
if (start instanceof Date) {
|
|
112
141
|
start = luxon_1.DateTime.fromJSDate(start);
|
|
113
142
|
}
|
|
@@ -142,14 +171,7 @@ class CronTime {
|
|
|
142
171
|
date = date.set({ day: 1, hour: 0, minute: 0, second: 0 });
|
|
143
172
|
continue;
|
|
144
173
|
}
|
|
145
|
-
if (
|
|
146
|
-
Object.keys(this.dayOfMonth).length !== 31 &&
|
|
147
|
-
!(this._getWeekDay(date) in this.dayOfWeek &&
|
|
148
|
-
Object.keys(this.dayOfWeek).length !== 7)) ||
|
|
149
|
-
(!(this._getWeekDay(date) in this.dayOfWeek) &&
|
|
150
|
-
Object.keys(this.dayOfWeek).length !== 7 &&
|
|
151
|
-
!(date.day in this.dayOfMonth &&
|
|
152
|
-
Object.keys(this.dayOfMonth).length !== 31))) {
|
|
174
|
+
if (!this._matchesDay(date)) {
|
|
153
175
|
date = date.plus({ days: 1 });
|
|
154
176
|
date = date.set({ hour: 0, minute: 0, second: 0 });
|
|
155
177
|
continue;
|
|
@@ -178,7 +200,11 @@ class CronTime {
|
|
|
178
200
|
date = luxon_1.DateTime.fromFormat(`${date.year}-${date.month}-${date.day} ${date.hour}:${date.minute}:${date.second}`, 'yyyy-M-d H:m:s', {
|
|
179
201
|
zone: timeZone
|
|
180
202
|
});
|
|
181
|
-
const
|
|
203
|
+
const januaryReferenceDate = luxon_1.DateTime.fromFormat(`${date.year}-1-1 0:0:0`, 'yyyy-M-d H:m:s', { zone: timeZone });
|
|
204
|
+
const julyReferenceDate = luxon_1.DateTime.fromFormat(`${date.year}-7-1 0:0:0`, 'yyyy-M-d H:m:s', { zone: timeZone });
|
|
205
|
+
const nonDSTReferenceDate = januaryReferenceDate.offset <= julyReferenceDate.offset
|
|
206
|
+
? januaryReferenceDate
|
|
207
|
+
: julyReferenceDate;
|
|
182
208
|
if ((expectedHour !== date.hour || expectedMinute !== date.minute) &&
|
|
183
209
|
nonDSTReferenceDate.offset !== date.offset) {
|
|
184
210
|
while (date.minus({ minute: 1 }).offset !== nonDSTReferenceDate.offset) {
|
|
@@ -190,14 +216,18 @@ class CronTime {
|
|
|
190
216
|
const twoHourTestDate = date.minus({ hour: 2 });
|
|
191
217
|
if ((hourTestDate.hour === date.hour ||
|
|
192
218
|
twoHourTestDate.hour === hourTestDate.hour) &&
|
|
219
|
+
(hourTestDate.offset > date.offset ||
|
|
220
|
+
twoHourTestDate.offset > hourTestDate.offset) &&
|
|
193
221
|
hourTestDate > start) {
|
|
194
|
-
date = hourTestDate;
|
|
222
|
+
date = (_c = this._firstMatchBetween(hourTestDate, date)) !== null && _c !== void 0 ? _c : date;
|
|
195
223
|
}
|
|
196
224
|
const halfHourTestDate = date.minus({ minute: 30 });
|
|
197
225
|
if ((halfHourTestDate.minute === date.minute ||
|
|
198
226
|
hourTestDate.minute === halfHourTestDate.minute) &&
|
|
227
|
+
(halfHourTestDate.offset > date.offset ||
|
|
228
|
+
hourTestDate.offset > halfHourTestDate.offset) &&
|
|
199
229
|
halfHourTestDate > start) {
|
|
200
|
-
date = halfHourTestDate;
|
|
230
|
+
date = (_d = this._firstMatchBetween(halfHourTestDate, date)) !== null && _d !== void 0 ? _d : date;
|
|
201
231
|
}
|
|
202
232
|
return date;
|
|
203
233
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cron",
|
|
3
3
|
"description": "Cron jobs for your node",
|
|
4
|
-
"version": "4.4.
|
|
4
|
+
"version": "4.4.2",
|
|
5
5
|
"author": "Brandon der Blätter <https://intcreator.com/> (https://github.com/intcreator)",
|
|
6
6
|
"funding": {
|
|
7
7
|
"type": "ko-fi",
|
|
@@ -32,33 +32,33 @@
|
|
|
32
32
|
"luxon": "~3.7.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@commitlint/cli": "20.
|
|
36
|
-
"@eslint/js": "9.39.
|
|
37
|
-
"@fast-check/jest": "2.
|
|
35
|
+
"@commitlint/cli": "20.5.3",
|
|
36
|
+
"@eslint/js": "9.39.4",
|
|
37
|
+
"@fast-check/jest": "2.3.0",
|
|
38
38
|
"@insurgent/commitlint-config": "20.0.0",
|
|
39
39
|
"@insurgent/conventional-changelog-preset": "10.0.0",
|
|
40
40
|
"@semantic-release/changelog": "6.0.3",
|
|
41
41
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
42
42
|
"@semantic-release/git": "10.0.1",
|
|
43
|
-
"@semantic-release/github": "12.0.
|
|
44
|
-
"@semantic-release/npm": "13.
|
|
45
|
-
"@semantic-release/release-notes-generator": "14.1.
|
|
46
|
-
"@swc/core": "1.
|
|
43
|
+
"@semantic-release/github": "12.0.10",
|
|
44
|
+
"@semantic-release/npm": "13.2.0",
|
|
45
|
+
"@semantic-release/release-notes-generator": "14.1.1",
|
|
46
|
+
"@swc/core": "1.16.22",
|
|
47
47
|
"@swc/jest": "0.2.39",
|
|
48
48
|
"@types/jest": "30.0.0",
|
|
49
|
-
"@types/node": "
|
|
50
|
-
"@types/sinon": "
|
|
49
|
+
"@types/node": "24.13.3",
|
|
50
|
+
"@types/sinon": "22.0.2",
|
|
51
51
|
"cross-env": "7.0.3",
|
|
52
52
|
"eslint": "8.57.1",
|
|
53
53
|
"eslint-config-prettier": "9.1.2",
|
|
54
54
|
"eslint-plugin-jest": "27.9.0",
|
|
55
|
-
"eslint-plugin-prettier": "5.5.
|
|
55
|
+
"eslint-plugin-prettier": "5.5.6",
|
|
56
56
|
"husky": "9.1.7",
|
|
57
|
-
"jest": "30.2
|
|
57
|
+
"jest": "30.5.2",
|
|
58
58
|
"lint-staged": "15.5.2",
|
|
59
|
-
"prettier": "3.
|
|
60
|
-
"semantic-release": "25.0.
|
|
61
|
-
"sinon": "
|
|
59
|
+
"prettier": "3.8.4",
|
|
60
|
+
"semantic-release": "25.0.9",
|
|
61
|
+
"sinon": "22.1.0",
|
|
62
62
|
"typescript": "5.9.3",
|
|
63
63
|
"typescript-eslint": "7.18.0"
|
|
64
64
|
},
|