Releases: btravstack/temporal-contract
Release list
@temporal-contract/worker@6.0.0
Major Changes
-
6c79004: Upgrade to
unthrown3.0.0.The published packages'
unthrownpeer-dependency range moves to^3. unthrown 3.0.0's breaking change — removing the standaloneDefectconstructor in favour of adefectargument passed intofromPromise/fromThrowable'squalifycallback — does not affect temporal-contract, which never constructs defects (every boundary maps rejections to a modeled error). Everything else we use (Ok/Err,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), and theresult.isOk()/isErr()/isDefect()narrowing) is unchanged, so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^3.
Patch Changes
- Updated dependencies [6c79004]
- @temporal-contract/contract@6.0.0
@temporal-contract/worker@5.0.0
Major Changes
-
224e1ae: Upgrade to
unthrown2.0.0.The published packages'
unthrownpeer-dependency range moves to^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — theOk/Err/Defectconstructors,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), andresult.isOk()/isErr()/isDefect()narrowing are all unchanged — so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^2. There are no other code changes.
Patch Changes
- Updated dependencies [224e1ae]
- @temporal-contract/contract@5.0.0
@temporal-contract/testing@6.0.0
Major Changes
-
6c79004: Upgrade to
unthrown3.0.0.The published packages'
unthrownpeer-dependency range moves to^3. unthrown 3.0.0's breaking change — removing the standaloneDefectconstructor in favour of adefectargument passed intofromPromise/fromThrowable'squalifycallback — does not affect temporal-contract, which never constructs defects (every boundary maps rejections to a modeled error). Everything else we use (Ok/Err,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), and theresult.isOk()/isErr()/isDefect()narrowing) is unchanged, so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^3.
@temporal-contract/testing@5.0.0
Major Changes
-
224e1ae: Upgrade to
unthrown2.0.0.The published packages'
unthrownpeer-dependency range moves to^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — theOk/Err/Defectconstructors,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), andresult.isOk()/isErr()/isDefect()narrowing are all unchanged — so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^2. There are no other code changes.
@temporal-contract/contract@6.0.0
Major Changes
-
6c79004: Upgrade to
unthrown3.0.0.The published packages'
unthrownpeer-dependency range moves to^3. unthrown 3.0.0's breaking change — removing the standaloneDefectconstructor in favour of adefectargument passed intofromPromise/fromThrowable'squalifycallback — does not affect temporal-contract, which never constructs defects (every boundary maps rejections to a modeled error). Everything else we use (Ok/Err,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), and theresult.isOk()/isErr()/isDefect()narrowing) is unchanged, so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^3.
@temporal-contract/contract@5.0.0
Major Changes
-
224e1ae: Upgrade to
unthrown2.0.0.The published packages'
unthrownpeer-dependency range moves to^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — theOk/Err/Defectconstructors,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), andresult.isOk()/isErr()/isDefect()narrowing are all unchanged — so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^2. There are no other code changes.
@temporal-contract/client@6.0.0
Major Changes
-
6c79004: Upgrade to
unthrown3.0.0.The published packages'
unthrownpeer-dependency range moves to^3. unthrown 3.0.0's breaking change — removing the standaloneDefectconstructor in favour of adefectargument passed intofromPromise/fromThrowable'squalifycallback — does not affect temporal-contract, which never constructs defects (every boundary maps rejections to a modeled error). Everything else we use (Ok/Err,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), and theresult.isOk()/isErr()/isDefect()narrowing) is unchanged, so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^3.
Patch Changes
- Updated dependencies [6c79004]
- @temporal-contract/contract@6.0.0
@temporal-contract/client@5.0.0
Major Changes
-
224e1ae: Upgrade to
unthrown2.0.0.The published packages'
unthrownpeer-dependency range moves to^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — theOk/Err/Defectconstructors,TaggedError,matchTags,fromPromise/fromSafePromise,result.match({ ok, err, defect }),.toAsync(), andresult.isOk()/isErr()/isDefect()narrowing are all unchanged — so no source changes were required.Breaking for consumers: bump your own
unthrowninstall to^2. There are no other code changes.
Patch Changes
- Updated dependencies [224e1ae]
- @temporal-contract/contract@5.0.0
@temporal-contract/worker@4.0.0
Major Changes
-
ebf7683: Upgrade to
unthrown1.0.0.unthrown 1.0.0 renames the result constructors to PascalCase:
ok→Ok,err→Err,defect→Defect. All packages are updated, and theunthrownpeer-dependency range moves to^1.Breaking for consumers who construct results directly (e.g. in activity implementations): replace
ok(value)/err(failure)withOk(value)/Err(failure)(andok(value).toAsync()/err(failure).toAsync()at promise boundaries), and bumpunthrownto^1. Theresult.match({ ok, err, defect })handler keys are unchanged (they are object keys, not constructors), andmatchTags/TaggedError/fromPromise/fromSafePromise/.toAsync()and theresult.isOk()/isErr()/isDefect()narrowing are all unchanged.See the Migrating from neverthrow guide.
Patch Changes
- Updated dependencies [ebf7683]
- @temporal-contract/contract@4.0.0
@temporal-contract/worker@3.0.0
Major Changes
-
8d0750f: Replace
neverthrowwithunthrownfor the Result/error-handling spine across all packages. This is a breaking change to the public API.What changed
ResultAsync<T, E>→AsyncResult<T, E>. Every activity, workflow-context, child-workflow, schedule, and typed-client method that returned aResultAsyncnow returns anAsyncResult. Theunthrownpeer dependency replacesneverthrow.- No
okAsync/errAsync. Lift a synchronousResultwith.toAsync()instead:ok(value).toAsync(),err(failure).toAsync(). Promise boundaries usefromPromise(promise, qualify)/fromSafePromise(promise). - Narrow before accessing the payload. Both the
result.isOk()/isErr()/isDefect()methods and the matching free functionsisOk(result)/isErr(result)/isDefect(result)(imported fromunthrown) are type guards; the codebase uses the methods. Narrow before touching.value/.error/.cause. - New
defectchannel. Unanticipated throws (a thrown exception the code did not model) now surface onunthrown's thirddefectchannel — inspected viaresult.isDefect()/result.causeand re-thrown at the edge — rather than as a typederr. Deliberate boundary classification (e.g. mapping a Temporal SDK rejection toWorkflowExecutionNotFoundError) still produces a modelederr.result.match({ ok, err, defect })folds all three. WorkflowScopeErrorremoved. Non-cancellation errors thrown insidecancellableScope/nonCancellableScopeare unmodeled failures and now ride thedefectchannel. The scopes' error union narrows toWorkflowCancelledError.- The client's "unexpected"
RuntimeClientErrorwrap is gone. An unanticipated rejection in a client operation now surfaces as a defect, not a manufacturedRuntimeClientError.RuntimeClientErroris still produced by deliberate boundary classification. - Error classes use
TaggedError. The workerWorkerErrorhierarchy and the entire clientTypedClientErrorhierarchy are now built withunthrown'sTaggedError, each carrying a_tagdiscriminant (foldable withmatchTags). The_tagis package-namespaced — e.g."@temporal-contract/WorkflowExecutionNotFoundError"— so it never collides with a consumer's own tags; each error's.namestays the bare class name for readable logs.ChildWorkflowCancelledErroris now a sibling ofChildWorkflowError(distinct_tag) rather than a subclass — discriminate on_tag/instanceof ChildWorkflowCancelledErrorinstead of relying oninstanceof ChildWorkflowErrormatching cancellation. The worker'sValidationErrorsubclasses are unchanged — they still extend Temporal'sApplicationFailurefor terminal-failure semantics.
See the Migrating from neverthrow guide.
Patch Changes
- Updated dependencies [8d0750f]
- @temporal-contract/contract@3.0.0