feat!: migrate to unthrown 3.0.0#276
Merged
Merged
Conversation
unthrown 3.0.0 removes the standalone `Defect` constructor in favour of a
`defect` argument passed into `fromPromise` / `fromThrowable`'s `qualify`
callback. temporal-contract never constructs defects (every boundary maps
rejections to a modeled error), so no source changes are needed — the `Ok` /
`Err` constructors, `TaggedError`, `matchTags`, `fromPromise` /
`fromSafePromise`, `result.match({ ok, err, defect })`, `.toAsync()`, and
`result.isOk()` / `isErr()` / `isDefect()` narrowing are all unchanged.
Bumps the `unthrown` / `@unthrown/vitest` catalog entries to 3.0.0 and the
published packages' `unthrown` peer range to `^3`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repo to unthrown 3.0.0 (and @unthrown/vitest 3.0.0), updating the workspace catalog, lockfile, and published package peer dependency ranges to ^3, plus updating migration docs and adding a changeset for the breaking peer-range bump.
Changes:
- Bump catalog versions for
unthrownand@unthrown/vitestto3.0.0and regeneratepnpm-lock.yaml. - Update published packages’
unthrownpeer dependency ranges to^3(contract,client,worker). - Update migration documentation install snippet and add a breaking (major) changeset.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Catalog bump to unthrown/@unthrown/vitest 3.0.0. |
| pnpm-lock.yaml | Lockfile updates reflecting unthrown/@unthrown/vitest 3.0.0. |
| packages/worker/package.json | Peer dependency range moved to unthrown: ^3. |
| packages/contract/package.json | Peer dependency range moved to unthrown: ^3. |
| packages/client/package.json | Peer dependency range moved to unthrown: ^3. |
| docs/guide/migrating-to-unthrown.md | Install snippet updated to unthrown: ^3. |
| .changeset/unthrown-v3.md | Adds changeset describing the breaking peer-range bump (needs a correction per review). |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades to
unthrown3.0.0, following the 1.0/2.0 migrations (all merged).3.0.0's breaking change removes the standalone
Defectconstructor — defects are now produced via adefectargument passed intofromPromise/fromThrowable'squalifycallback. temporal-contract never constructs defects (every boundary maps rejections to a modeled error:ApplicationFailure,RuntimeClientError,classifyHandleError, …), so this change doesn't touch us. No source changes — just a version bump.What changed
unthrown+@unthrown/vitestcatalog entries →3.0.0.unthrownpeer range →^3.^3.majorchangeset (requiringunthrown ^3is breaking for consumers on 2.x).Unchanged (verified against the new
.d.ts)Ok/Errconstructors,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), andresult.isOk()/isErr()/isDefect()narrowing — all identical.@unthrown/vitestmatchers unchanged.Verification
typecheck · oxlint · oxfmt · knip · 271 unit tests · integration tests (8/8) · docs build — all green, no code changes required.
🤖 Generated with Claude Code