@stonyx/cron 0.2.1-alpha.62 → 0.2.1-alpha.63

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/README.md CHANGED
@@ -97,9 +97,12 @@ Tracked as #35.
97
97
  Five consumer-visible changes landed with the phase split (#34). Only the first
98
98
  two are visible in the emitted `dist/service.d.ts`; the rest are runtime
99
99
  behaviour and a type-checker will not find them for you. The measured
100
- `dist/service.d.ts` delta against the previous release is exactly three things:
101
- the class gained `#private;`, `reason` narrowed, and six type declarations
102
- gained `export`. `dist/main.d.ts` is unchanged.
100
+ `dist/service.d.ts` delta against the previous release is exactly four things:
101
+ the class gained `#private;`, `reason` narrowed, five type declarations gained
102
+ `export` (`JobDueResult`, `ExecuteResult`, `ServiceStatus`, `ListOptions` and
103
+ `OnJobDueCallback`), and `SkipReason` was added as a new exported type — it did
104
+ not exist in the previous release, so it gained nothing. `HeapEntry` remains
105
+ unexported. `dist/main.d.ts` is unchanged.
103
106
 
104
107
  1. **`ExecuteResult.reason` narrowed** from `string` to `'not due' | 'already running' | 'removed'`, and gained the `'removed'` member. Comparing it against a literal outside the union, or `switch`ing on one, is now a compile error (`TS2367` / `TS2678`). Assigning it into `string | undefined` and spreading it are unaffected. The type is exported as `SkipReason`.
105
108
  2. **`CronService` is nominally typed.** It carries ECMAScript hard-private members, so the declarations emit `#private;` and a structurally hand-built test double no longer assigns to `CronService` (`TS2741: Property '#private' is missing`). The break is one-directional: `class X extends CronService` still compiles, and assigning a real `CronService` to your own hand-written interface still compiles. **Migration:** declare your own interface and depend on that instead of a `CronService`-typed mock.
package/dist/main.js CHANGED
@@ -41,8 +41,8 @@ const MAX_LOGGED_ERROR_LENGTH = 512;
41
41
  * `describeError` directly below (`:82`, `:85`), and both are INSIDE that
42
42
  * function's own `try`, so a `TypeError` from `value.replace` on a
43
43
  * non-string degrades to `'<thrown value could not be rendered>'` and the log
44
- * record is still produced. `service.ts`'s callers are not so contained: `:692`
45
- * sits in a bare `catch` with nothing above it, and `:571`'s enclosing `catch`
44
+ * record is still produced. `service.ts`'s callers are not so contained: `:700`
45
+ * sits in a bare `catch` with nothing above it, and `:579`'s enclosing `catch`
46
46
  * has nothing left to report to — so a throw there destroyed the failure
47
47
  * record outright (measured: 0 records for a job that failed). That is why
48
48
  * totality was a live defect there and is not one here.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "keywords": [
4
4
  "stonyx-module"
5
5
  ],
6
- "version": "0.2.1-alpha.62",
6
+ "version": "0.2.1-alpha.63",
7
7
  "description": "Cron/job scheduler for Stonyx framework",
8
8
  "main": "dist/main.js",
9
9
  "types": "dist/main.d.ts",