|
1 | 1 | # @temporal-contract/client |
2 | 2 |
|
| 3 | +## 8.0.0-beta.1 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- 75ec554: Bump `unthrown` to `5.0.0-beta.5`. This tracks two beta breaking changes: |
| 8 | + `match`'s error handler key is renamed `err` → `errCases`, and the bare error |
| 9 | + combinators gained the `*Cases` suffix (`flatMapErr` → `flatMapErrCases`, |
| 10 | + `tapErr` → `tapErrCases`). `unthrown` also now declares `ts-pattern` as a peer |
| 11 | + dependency, so `ts-pattern` (`^5`) is added alongside it. The peer range is |
| 12 | + raised to `^5.0.0-beta.5`. |
| 13 | +- fff11ff: Bump `unthrown` to `5.0.0-beta.6`, whose exhaustive matcher is now built-in |
| 14 | + (same `.with(…)` / `tag` / `P` call-site shape — no code changes needed). The |
| 15 | + `ts-pattern` peer/dev dependencies added for beta.5 are removed: `unthrown` has |
| 16 | + zero runtime dependencies, so nothing needs installing alongside it. The |
| 17 | + `unthrown` peer range is raised to `^5.0.0-beta.6`. |
| 18 | +- efec2b2: Route `TechnicalError` and `RuntimeClientError` to unthrown's defect channel instead of the modeled `Err` channel. |
| 19 | + |
| 20 | + These two errors describe technical/infrastructure failures (connection/bundling faults, an unknown schedule ID, an unrecognized Temporal rejection) that are never branched on for domain logic. Per unthrown's Thesis #1, the `E` channel is only for anticipated domain failures, so they now surface as a `Defect` whose `cause` is a `TechnicalError` / `RuntimeClientError` instance — the classes stay exported so the descriptive message, `operation`, and `cause` survive for logging. |
| 21 | + |
| 22 | + **Breaking.** Consumers who matched these on the error channel must move to the defect channel: |
| 23 | + |
| 24 | + - `TypedClient.create` and `createWorker` now return `AsyncResult<_, never>` (was `AsyncResult<_, TechnicalError>`). Inspect setup faults via `result.isDefect()` / `match`'s `defect` handler / `recoverDefect`, not `isErr()`. |
| 25 | + - Every modeled error union drops `RuntimeClientError` (`startWorkflow`, `signalWithStart`, `executeWorkflow`, `getHandle`, handle `queries`/`signals`/`updates`/`result`/`terminate`/`cancel`/`describe`/`fetchHistory`, the schedule handle methods, `ClientCallError`). Schedule handle methods now return `AsyncResult<_, never>`. |
| 26 | + - Drop any `.with(tag("@temporal-contract/RuntimeClientError"), …)` / `.with(tag("@temporal-contract/TechnicalError"), …)` arm from exhaustive matchers; handle these in the `defect` arm (e.g. `recoverDefect` / `tapDefect`), matching on `cause instanceof RuntimeClientError` where needed. |
| 27 | + |
| 28 | +- Updated dependencies [75ec554] |
| 29 | +- Updated dependencies [fff11ff] |
| 30 | +- Updated dependencies [efec2b2] |
| 31 | + - @temporal-contract/contract@8.0.0-beta.1 |
| 32 | + |
3 | 33 | ## 8.0.0-beta.0 |
4 | 34 |
|
5 | 35 | ### Major Changes |
|
0 commit comments