Skip to content

Commit a54a2f3

Browse files
Benoit Traversclaude
authored andcommitted
chore(deps): bump unthrown to 5.0.0-beta.7
Raises the catalog entries for `unthrown` and `@unthrown/vitest`, and the peer range on contract/client/worker to `^5.0.0-beta.7`. `latest` on npm is still 4.3.0 (the stable line), so this tracks the `beta` tag, matching where this package's 8.0 line already sits. Two upstream changes, neither needing code changes here: - `returnType<R>()` pins a match's output type across all five `*ErrCases` combinators, `match`'s `errCases` handler, and standalone `match(value)`. - `tapErrCases` no longer silently drops a `defect(…)` branch — it now produces a Defect carrying an AggregateError, matching what a `throw` in the same position already did. Only breaking for code relying on the drop; the single `tapErrCases` call site here (activity-contract-errors.spec.ts:301) logs and does not use the marker. Verified: typecheck, unit tests (105 contract + worker/client/testing), and the in-process time-skipping integration suite all pass against beta.7; lint, knip, and the docs build are clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 73ae867 commit a54a2f3

8 files changed

Lines changed: 49 additions & 29 deletions

File tree

.changeset/bump-unthrown-beta-7.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"@temporal-contract/contract": patch
3+
"@temporal-contract/client": patch
4+
"@temporal-contract/worker": patch
5+
---
6+
7+
Bump `unthrown` to `5.0.0-beta.7` and raise the peer range to `^5.0.0-beta.7`.
8+
9+
Two changes come with it, neither requiring code changes here:
10+
11+
- **`returnType<R>()` on the built-in matcher** — pins a match's output type so
12+
every branch is checked against it, instead of the result being the union of
13+
the branch returns. Available on all five `*ErrCases` combinators, `match`'s
14+
`errCases` handler, and standalone `match(value)`.
15+
- **`tapErrCases` no longer silently drops a `defect(…)` branch.** Such a branch
16+
now produces a `Defect` carrying an `AggregateError` of `[the branch's cause,
17+
the observed error]`, matching what a `throw` in the same position already
18+
did. Only a breaking change for code that relied on the value being discarded
19+
— this package's single `tapErrCases` call site logs and does not use the
20+
`defect` marker.

docs/how-to/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ types. Your code and the library must resolve to the _same_ copy.
5656

5757
| Peer | Required by | Range |
5858
| ---------------------- | ------------------------ | --------------- |
59-
| `unthrown` | contract, worker, client | `^5.0.0-beta.6` |
59+
| `unthrown` | contract, worker, client | `^5.0.0-beta.7` |
6060
| `@temporalio/common` | worker, client | `^1` |
6161
| `@temporalio/worker` | worker, testing | `^1` |
6262
| `@temporalio/workflow` | worker | `^1` |

docs/how-to/upgrade-to-v8.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pnpm add @temporal-contract/contract@beta \
3131
@temporal-contract/worker@beta \
3232
@temporal-contract/client@beta
3333
pnpm add -D @temporal-contract/testing@beta
34-
pnpm add unthrown@^5.0.0-beta.6
34+
pnpm add unthrown@^5.0.0-beta.7
3535
```
3636

3737
If an intermediate beta had you install `ts-pattern` as a peer, remove it —
@@ -222,7 +222,7 @@ const retryOnce: ClientInterceptor = (args, next) =>
222222
## Checklist
223223

224224
- [ ] All four `@temporal-contract/*` packages on the same 8.0 version
225-
- [ ] `unthrown` resolves to `^5.0.0-beta.6`
225+
- [ ] `unthrown` resolves to `^5.0.0-beta.7`
226226
- [ ] `ts-pattern` removed if it was added for beta.5
227227
- [ ] `mapErr` / `flatMapErr` / `tapErr` / `recoverErr``*Cases`
228228
- [ ] `match({ err })``match({ errCases })`

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"peerDependencies": {
7878
"@temporalio/client": "^1",
7979
"@temporalio/common": "^1",
80-
"unthrown": "^5.0.0-beta.6"
80+
"unthrown": "^5.0.0-beta.7"
8181
},
8282
"engines": {
8383
"node": ">=22.19.0"

packages/contract/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"vitest": "catalog:"
8888
},
8989
"peerDependencies": {
90-
"unthrown": "^5.0.0-beta.6"
90+
"unthrown": "^5.0.0-beta.7"
9191
},
9292
"peerDependenciesMeta": {
9393
"unthrown": {

packages/worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"@temporalio/common": "^1",
9797
"@temporalio/worker": "^1",
9898
"@temporalio/workflow": "^1",
99-
"unthrown": "^5.0.0-beta.6"
99+
"unthrown": "^5.0.0-beta.7"
100100
},
101101
"engines": {
102102
"node": ">=22.19.0"

pnpm-lock.yaml

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ catalog:
2525
"@temporalio/worker": 1.20.3
2626
"@temporalio/workflow": 1.20.3
2727
"@types/node": 26.1.1
28-
"@unthrown/vitest": 5.0.0-beta.6
28+
"@unthrown/vitest": 5.0.0-beta.7
2929
"@vitest/coverage-v8": 4.1.10
3030
arktype: 2.2.3
3131
knip: 6.27.0
@@ -41,7 +41,7 @@ catalog:
4141
typedoc: 0.28.20
4242
typedoc-plugin-markdown: 4.12.0
4343
typescript: 6.0.3
44-
unthrown: 5.0.0-beta.6
44+
unthrown: 5.0.0-beta.7
4545
valibot: 1.4.2
4646
vitest: 4.1.10
4747
zod: 4.4.3

0 commit comments

Comments
 (0)