|
1 | 1 | # @amqp-contract/client |
2 | 2 |
|
| 3 | +## 3.0.0-beta.3 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- faa74f7: Bump `unthrown` to the stable `5.0.0` and raise the peer range to `^5.0.0`. |
| 8 | + |
| 9 | + The betas between `5.0.0-beta.7` and the release carried one change that reaches |
| 10 | + call sites: |
| 11 | + |
| 12 | + - **`tag(t)` is gone; the pattern is `P.tag(t)`** (`5.0.0-beta.9`). It was the |
| 13 | + only pattern constructor living loose on the root export while `P._` / `P.any` |
| 14 | + / `P.instanceOf` / `P.when` / `P.union` sat on the namespace, so it moved onto |
| 15 | + `P`. There is no alias. The pattern's type and runtime behaviour are |
| 16 | + unchanged — it still produces `{ _tag: t }`, still narrows to the matching |
| 17 | + variant with its payload, and still composes in grouped patterns and inside |
| 18 | + `P.union`. |
| 19 | + |
| 20 | + Every matcher example in these packages' TSDoc, READMEs and the docs site is |
| 21 | + updated. In your own code the migration is mechanical — swap `tag` for `P` in |
| 22 | + the `unthrown` import and prefix the call sites: |
| 23 | + |
| 24 | + ```diff |
| 25 | + - import { tag } from "unthrown"; |
| 26 | + + import { P } from "unthrown"; |
| 27 | + |
| 28 | + result.match({ |
| 29 | + ok: () => {/* … */}, |
| 30 | + errCases: (matcher) => |
| 31 | + - matcher.with(tag("@amqp-contract/MessageValidationError"), (error) => {/* … */}), |
| 32 | + + matcher.with(P.tag("@amqp-contract/MessageValidationError"), (error) => {/* … */}), |
| 33 | + defect: (cause) => { throw cause; }, |
| 34 | + }); |
| 35 | + ``` |
| 36 | + |
| 37 | + `5.0.0-beta.10` also stopped shipping sourcemaps and declaration maps (`files` |
| 38 | + already excluded `src/`, so the published maps were dead-ends); `beta.8`, |
| 39 | + `beta.11` and `beta.12` were no-ops for core, and the `5.0.0` release itself |
| 40 | + added nothing beyond `beta.12`. `@unthrown/vitest` moves to `5.0.0` alongside. |
| 41 | + |
| 42 | + The peer floor is raised to the release rather than left at a beta so consumers |
| 43 | + resolve the same copy these packages were built and tested against — the point |
| 44 | + of the peer dependency is a single shared `unthrown`. |
| 45 | + |
| 46 | +- Updated dependencies [faa74f7] |
| 47 | + - @amqp-contract/core@3.0.0-beta.3 |
| 48 | + - @amqp-contract/contract@3.0.0-beta.3 |
| 49 | + |
3 | 50 | ## 3.0.0-beta.2 |
4 | 51 |
|
5 | 52 | ### Patch Changes |
|
0 commit comments