croner 5.7.0-dev.4 → 5.7.0

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.
Files changed (2) hide show
  1. package/README.md +23 -17
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,14 +9,15 @@ Trigger functions or evaluate cron expressions in JavaScript or TypeScript. No d
9
9
  ![No dependencies](https://img.shields.io/badge/dependencies-none-brightgreen) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Hexagon/croner/blob/master/LICENSE)
10
10
 
11
11
  * Trigger functions in JavaScript using [Cron](https://en.wikipedia.org/wiki/Cron#CRON_expression) syntax.
12
- * Find the first date of the next month, the date of the next Tuesday, etc.
13
- * Pause, resume, or stop execution after a task is scheduled.
14
12
  * Works in Node.js >=7.6 (both require and import), Deno >=1.16 and Bun >=0.2.2.
15
13
  * Works in browsers as standalone, UMD or ES-module.
16
- * Schedule using specific target [time zones](docs/EXAMPLES.md#time-zone).
17
- * [Overrun protection](docs/EXAMPLES.md#overrun-protection) with callback
14
+ * Target different [time zones](docs/EXAMPLES.md#time-zone).
15
+ * Build in [Overrun protection](docs/EXAMPLES.md#overrun-protection) with callback
18
16
  * Built in [error handling](docs/EXAMPLES.md#error-handling) with callback
19
17
  * Includes [TypeScript](https://www.typescriptlang.org/) typings.
18
+ * Find the first date of the next month, the date of the next Tuesday, etc.
19
+ * Pause, resume, or stop execution after a task is scheduled.
20
+ * Uses Vixie-cron [pattern](#pattern), with a few additional features such as `L` for last day of month.
20
21
 
21
22
  Quick examples:
22
23
 
@@ -26,7 +27,7 @@ const job = Cron('*/5 * * * * *', () => {
26
27
  console.log('This will run every fifth second');
27
28
  });
28
29
 
29
- // Enumeration: What dates do the next 100 sundays occur at?
30
+ // Enumeration: What dates do the next 100 sundays occur on?
30
31
  const nextSundays = Cron('0 0 0 * * 7').enumerate(100);
31
32
  console.log(nextSundays);
32
33
 
@@ -54,10 +55,11 @@ Because the existing ones are not good enough. They have serious bugs, use bloat
54
55
  | Deno (ESM) | ✓ | | | | |
55
56
  | **Features** |
56
57
  | Over-run protection | ✓ | | | | |
57
- | Error handling | ✓ | | | | |
58
+ | Error handling | ✓ | | | ||
58
59
  | Typescript typings | ✓ | ✓ | | | |
59
- | dom-AND-dow | ✓ | | | | |
60
+ | Unref timers (optional | ✓ | | || |
60
61
  | dom-OR-dow | ✓ | ✓ | ✓ | ✓ | ✓ |
62
+ | dom-AND-dow (optional) | ✓ | | | | |
61
63
  | Next run | ✓ | ✓ | | ✓ | ✓ |
62
64
  | Next n runs | ✓ | ✓ | | ✓ | |
63
65
  | Timezone | ✓ | ✓ | ✓ | ✓ | ✓ |
@@ -77,9 +79,9 @@ Because the existing ones are not good enough. They have serious bugs, use bloat
77
79
  | Bundlephobia minzip (KB) | 3.6 | 5.1 | 5.7 | 23.9 | 32.4 |
78
80
  | Dependencies | 0 | 0 | 1 | 1 | 3 |
79
81
  | **Popularity** |
80
- | Downloads/week [^1] | 672K | 30K | 376K | 1574K | 804K |
82
+ | Downloads/week [^1] | 576K | 31K | 433K | 2239K | 924K |
81
83
  | **Quality** |
82
- | Issues [^1] | 0 | 2 | 118 :warning: | 119 :warning: | 135 :warning: |
84
+ | Issues [^1] | 0 | 2 | 127 :warning: | 43 :warning: | 139 :warning: |
83
85
  | Code coverage | 99% | 98% | 100% | 81% | 94% |
84
86
  | **Performance** |
85
87
  | Ops/s `1 2 3 4 5 6` | 99 952 | 49 308 | N/A :x: | Test failed :x: | 2 299 :warning: |
@@ -95,11 +97,11 @@ Because the existing ones are not good enough. They have serious bugs, use bloat
95
97
  | Test `1 2 3 4 5 6` | 2023-05-04 03:02 | 2023-05-04 03:02 | N/A | 2023-06-03 03:02 :x: | 2023-05-04 03:02 |
96
98
 
97
99
  > **Note**
98
- > * Table last updated at 2022-10-23
100
+ > * Table last updated at 2022-10-23, issues and downloads updated 2023-02-19
99
101
  > * node-cron has no interface to predict when the function will run, so tests cannot be carried out.
100
102
  > * All tests and benchmarks were carried out using [https://github.com/Hexagon/cron-comparison](https://github.com/Hexagon/cron-comparison)
101
103
 
102
- [^1]: As of 2022-10-08
104
+ [^1]: As of 2023-02-19
103
105
  [^2]: Requires support for L-modifier
104
106
  [^3]: In dom-AND-dow mode, only supported by croner at the moment.
105
107
  [^4]: Node-cron has no way of showing next run time.
@@ -153,7 +155,7 @@ import Cron from "croner";
153
155
  JavaScript
154
156
 
155
157
  ```javascript
156
- import Cron from "https://deno.land/x/croner@5.6.4/src/croner.js";
158
+ import Cron from "https://deno.land/x/croner@5.7.0/src/croner.js";
157
159
 
158
160
  Cron("* * * * * *", () => {
159
161
  console.log("This will run every second.");
@@ -163,7 +165,7 @@ Cron("* * * * * *", () => {
163
165
  TypeScript
164
166
 
165
167
  ```typescript
166
- import { Cron } from "https://deno.land/x/croner@5.6.4/src/croner.js";
168
+ import { Cron } from "https://deno.land/x/croner@5.7.0/src/croner.js";
167
169
 
168
170
  const _scheduler : Cron = new Cron("* * * * * *", () => {
169
171
  console.log("This will run every second.");
@@ -301,24 +303,28 @@ It is also possible to use the following "nicknames" as pattern.
301
303
  | \@daily | Run once a day, ie. "0 0 * * *". |
302
304
  | \@hourly | Run once an hour, ie. "0 * * * *". |
303
305
 
304
- ## Contributing
306
+ ## Development
305
307
 
306
308
  ### Master branch
307
309
 
308
310
  ![Node.js CI](https://github.com/Hexagon/croner/workflows/Node.js%20CI/badge.svg?branch=master) ![Deno CI](https://github.com/Hexagon/croner/workflows/Deno%20CI/badge.svg?branch=master) ![Bun CI](https://github.com/Hexagon/croner/workflows/Bun%20CI/badge.svg?branch=master)
309
311
 
312
+ This branch contains the latest stable code, released on npm's default channel (`latest`).
313
+
310
314
  ### Dev branch
311
315
 
312
316
  ![Node.js CI](https://github.com/Hexagon/croner/workflows/Node.js%20CI/badge.svg?branch=dev) ![Deno CI](https://github.com/Hexagon/croner/workflows/Deno%20CI/badge.svg?branch=dev) ![Bun CI](https://github.com/Hexagon/croner/workflows/Bun%20CI/badge.svg?branch=dev)
313
317
 
314
- A list of fixes and features currently released in dev (but not in master) is available [here](https://github.com/Hexagon/croner/issues?q=is%3Aopen+is%3Aissue+label%3Areleased-in-dev)
315
-
316
- You can install latest revision of the development branch by running the command below.
318
+ This branch contains code currently being tested, and is released at channel `dev` on npm. You can install the latest revision of the development branch by running the command below.
317
319
 
318
320
  ```
319
321
  npm install croner@dev
320
322
  ```
321
323
 
324
+ A list of fixes and features currently released in the `dev` branch (but not in `master`) is available [here](https://github.com/Hexagon/croner/issues?q=is%3Aopen+is%3Aissue+label%3Areleased-in-dev)
325
+
326
+ ### Contributing
327
+
322
328
  See [Contribution Guide](docs/CONTRIBUTING.md)
323
329
 
324
330
  ... or ...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "croner",
3
- "version": "5.7.0-dev.4",
3
+ "version": "5.7.0",
4
4
  "description": "Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.",
5
5
  "author": "Hexagon <github.com/hexagon>",
6
6
  "homepage": "https://hexagon.github.io/croner",