Skip to content

chore(deps): bump unthrown to 5.0.0-beta.7 - #349

Merged
btravers merged 2 commits into
mainfrom
chore/bump-unthrown-beta-7
Jul 28, 2026
Merged

chore(deps): bump unthrown to 5.0.0-beta.7#349
btravers merged 2 commits into
mainfrom
chore/bump-unthrown-beta-7

Conversation

@btravers

Copy link
Copy Markdown
Collaborator

Bumps unthrown and @unthrown/vitest from 5.0.0-beta.6 to 5.0.0-beta.7, and raises the peer range on contract/client/worker to ^5.0.0-beta.7.

Which "latest"

latest on npm is still 4.3.0 — the stable v4 line. The v5 work ships under the beta tag, currently 5.0.0-beta.7. Since this package's 8.0 line already tracks v5 beta, taking latest would be a downgrade; this follows beta.

Both packages are listed in minimumReleaseAgeExclude, so the 7-day maturity gate does not apply.

What changed upstream

Neither change required code changes here.

returnType<R>() on the built-in matcher (minor). Pins a match's output type so every branch is checked against it, rather than the result being the union of branch returns. A drifting branch now fails on that branch instead of downstream. Reaches all five *ErrCases combinators, match's errCases handler, and standalone match(value).

result.mapErrCases((matcher) =>
  matcher.returnType<ApiError>().with(P._, (error) => new ApiError({ status: 500, error })),
);

tapErrCases no longer silently drops a defect(…) branch. Previously such a branch compiled but the value was discarded, so the pipeline carried on with the original Err — while a throw in the same position already produced a Defect. It now takes the throw route, producing a Defect whose cause is an AggregateError of [the branch's cause, the observed error].

Only breaking for code that relied on the drop. This repo has exactly one tapErrCases call site — packages/worker/src/activity-contract-errors.spec.ts:301 — and it logs rather than using the defect marker, so it is unaffected. The doc-comment example at packages/worker/src/activity.ts:297 is the same shape.

Verification

Check Result
pnpm typecheck 12/12 tasks pass
pnpm test pass — 105 contract tests, plus worker/client/testing
worker --project integration-inprocess 2/2 pass (real time-skipping server, ~7s)
pnpm lint clean
pnpm knip clean
pnpm --filter ./docs exec turbo build clean

The in-process integration run matters more than the typecheck here: it exercises the actual runtime through the full contract pipeline against beta.7, which is where a matcher or defect-channel regression would show up. I did not run the Docker-backed integration project locally — CI covers it.

Also updated

  • docs/how-to/install.md peer table and docs/how-to/upgrade-to-v8.md install command + checklist now say ^5.0.0-beta.7.
  • Left upgrade-to-v8.md:38 ("built in again as of beta.6") alone — that is a historical statement about when the matcher stopped needing ts-pattern, and remains accurate.

returnType<R>() is not documented in our guides. It is unthrown's API rather than ours, but it would genuinely improve the mapErrCases examples where the output type is fixed by a signature — happy to add a short mention if you want it.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings July 28, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s dependency baseline to keep the Temporal Contract v8 beta line aligned with unthrown v5 beta, specifically bumping from 5.0.0-beta.6 to 5.0.0-beta.7 and updating the related peer dependency ranges and documentation accordingly.

Changes:

  • Bump unthrown and @unthrown/vitest to 5.0.0-beta.7 via the workspace catalog and lockfile.
  • Raise unthrown peer dependency ranges to ^5.0.0-beta.7 for @temporal-contract/{contract,client,worker}.
  • Update install/upgrade docs and add a Changeset documenting the bump.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-workspace.yaml Updates the workspace catalog versions for unthrown and @unthrown/vitest.
pnpm-lock.yaml Refreshes lock entries to reflect 5.0.0-beta.7 resolution.
packages/worker/package.json Raises the worker package’s unthrown peer range to ^5.0.0-beta.7.
packages/contract/package.json Raises the contract package’s unthrown peer range to ^5.0.0-beta.7.
packages/client/package.json Raises the client package’s unthrown peer range to ^5.0.0-beta.7.
docs/how-to/upgrade-to-v8.md Updates the upgrade/install instructions to use ^5.0.0-beta.7.
docs/how-to/install.md Updates the peer dependency table to ^5.0.0-beta.7.
.changeset/bump-unthrown-beta-7.md Adds a changeset describing the dependency bump and upstream behavior changes.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

Comment thread .changeset/bump-unthrown-beta-7.md Outdated
The changeset's `tapErrCases` bullet had an unindented continuation line,
which markdown renders as a new paragraph, breaking the list.

Cause: the inline code span `[the branch's cause, the observed error]`
wrapped across lines, and oxfmt strips the continuation indent there —
leading whitespace is significant inside a code span, so reflowing it
would alter the span's text. The indent was correct as written and the
formatter removed it.

Reworded so the span no longer wraps; re-running oxfmt now leaves the
indentation alone.

Swept the rest of the docs for the same shape and found two more
(upgrade-to-v8.md, why-temporal-contract.md). Neither sat in a list, so
both rendered fine, but they carried the same latent hazard — reworded
too. A backtick-parity scan over all authored markdown is now clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@btravers
btravers merged commit 6c88b3c into main Jul 28, 2026
11 checks passed
@btravers
btravers deleted the chore/bump-unthrown-beta-7 branch July 28, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants