Skip to content

Releases: btravstack/temporal-contract

@temporal-contract/worker@6.0.0

Choose a tag to compare

Major Changes

  • 6c79004: Upgrade to unthrown 3.0.0.

    The published packages' unthrown peer-dependency range moves to ^3. unthrown 3.0.0's breaking change — removing the standalone Defect constructor in favour of a defect argument passed into fromPromise / fromThrowable's qualify callback — 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 the result.isOk() / isErr() / isDefect() narrowing) is unchanged, so no source changes were required.

    Breaking for consumers: bump your own unthrown install to ^3.

Patch Changes

  • Updated dependencies [6c79004]
    • @temporal-contract/contract@6.0.0

@temporal-contract/worker@5.0.0

Choose a tag to compare

Major Changes

  • 224e1ae: Upgrade to unthrown 2.0.0.

    The published packages' unthrown peer-dependency range moves to ^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — the Ok / Err / Defect constructors, TaggedError, matchTags, fromPromise / fromSafePromise, result.match({ ok, err, defect }), .toAsync(), and result.isOk() / isErr() / isDefect() narrowing are all unchanged — so no source changes were required.

    Breaking for consumers: bump your own unthrown install 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

Choose a tag to compare

Major Changes

  • 6c79004: Upgrade to unthrown 3.0.0.

    The published packages' unthrown peer-dependency range moves to ^3. unthrown 3.0.0's breaking change — removing the standalone Defect constructor in favour of a defect argument passed into fromPromise / fromThrowable's qualify callback — 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 the result.isOk() / isErr() / isDefect() narrowing) is unchanged, so no source changes were required.

    Breaking for consumers: bump your own unthrown install to ^3.

@temporal-contract/testing@5.0.0

Choose a tag to compare

Major Changes

  • 224e1ae: Upgrade to unthrown 2.0.0.

    The published packages' unthrown peer-dependency range moves to ^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — the Ok / Err / Defect constructors, TaggedError, matchTags, fromPromise / fromSafePromise, result.match({ ok, err, defect }), .toAsync(), and result.isOk() / isErr() / isDefect() narrowing are all unchanged — so no source changes were required.

    Breaking for consumers: bump your own unthrown install to ^2. There are no other code changes.

@temporal-contract/contract@6.0.0

Choose a tag to compare

Major Changes

  • 6c79004: Upgrade to unthrown 3.0.0.

    The published packages' unthrown peer-dependency range moves to ^3. unthrown 3.0.0's breaking change — removing the standalone Defect constructor in favour of a defect argument passed into fromPromise / fromThrowable's qualify callback — 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 the result.isOk() / isErr() / isDefect() narrowing) is unchanged, so no source changes were required.

    Breaking for consumers: bump your own unthrown install to ^3.

@temporal-contract/contract@5.0.0

Choose a tag to compare

Major Changes

  • 224e1ae: Upgrade to unthrown 2.0.0.

    The published packages' unthrown peer-dependency range moves to ^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — the Ok / Err / Defect constructors, TaggedError, matchTags, fromPromise / fromSafePromise, result.match({ ok, err, defect }), .toAsync(), and result.isOk() / isErr() / isDefect() narrowing are all unchanged — so no source changes were required.

    Breaking for consumers: bump your own unthrown install to ^2. There are no other code changes.

@temporal-contract/client@6.0.0

Choose a tag to compare

Major Changes

  • 6c79004: Upgrade to unthrown 3.0.0.

    The published packages' unthrown peer-dependency range moves to ^3. unthrown 3.0.0's breaking change — removing the standalone Defect constructor in favour of a defect argument passed into fromPromise / fromThrowable's qualify callback — 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 the result.isOk() / isErr() / isDefect() narrowing) is unchanged, so no source changes were required.

    Breaking for consumers: bump your own unthrown install to ^3.

Patch Changes

  • Updated dependencies [6c79004]
    • @temporal-contract/contract@6.0.0

@temporal-contract/client@5.0.0

Choose a tag to compare

Major Changes

  • 224e1ae: Upgrade to unthrown 2.0.0.

    The published packages' unthrown peer-dependency range moves to ^2. unthrown 2.0.0 is API-compatible for everything temporal-contract uses — the Ok / Err / Defect constructors, TaggedError, matchTags, fromPromise / fromSafePromise, result.match({ ok, err, defect }), .toAsync(), and result.isOk() / isErr() / isDefect() narrowing are all unchanged — so no source changes were required.

    Breaking for consumers: bump your own unthrown install 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

Choose a tag to compare

Major Changes

  • ebf7683: Upgrade to unthrown 1.0.0.

    unthrown 1.0.0 renames the result constructors to PascalCase: okOk, errErr, defectDefect. All packages are updated, and the unthrown peer-dependency range moves to ^1.

    Breaking for consumers who construct results directly (e.g. in activity implementations): replace ok(value) / err(failure) with Ok(value) / Err(failure) (and ok(value).toAsync() / err(failure).toAsync() at promise boundaries), and bump unthrown to ^1. The result.match({ ok, err, defect }) handler keys are unchanged (they are object keys, not constructors), and matchTags / TaggedError / fromPromise / fromSafePromise / .toAsync() and the result.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

Choose a tag to compare

Major Changes

  • 8d0750f: Replace neverthrow with unthrown for 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 a ResultAsync now returns an AsyncResult. The unthrown peer dependency replaces neverthrow.
    • No okAsync / errAsync. Lift a synchronous Result with .toAsync() instead: ok(value).toAsync(), err(failure).toAsync(). Promise boundaries use fromPromise(promise, qualify) / fromSafePromise(promise).
    • Narrow before accessing the payload. Both the result.isOk() / isErr() / isDefect() methods and the matching free functions isOk(result) / isErr(result) / isDefect(result) (imported from unthrown) are type guards; the codebase uses the methods. Narrow before touching .value / .error / .cause.
    • New defect channel. Unanticipated throws (a thrown exception the code did not model) now surface on unthrown's third defect channel — inspected via result.isDefect() / result.cause and re-thrown at the edge — rather than as a typed err. Deliberate boundary classification (e.g. mapping a Temporal SDK rejection to WorkflowExecutionNotFoundError) still produces a modeled err. result.match({ ok, err, defect }) folds all three.
    • WorkflowScopeError removed. Non-cancellation errors thrown inside cancellableScope / nonCancellableScope are unmodeled failures and now ride the defect channel. The scopes' error union narrows to WorkflowCancelledError.
    • The client's "unexpected" RuntimeClientError wrap is gone. An unanticipated rejection in a client operation now surfaces as a defect, not a manufactured RuntimeClientError. RuntimeClientError is still produced by deliberate boundary classification.
    • Error classes use TaggedError. The worker WorkerError hierarchy and the entire client TypedClientError hierarchy are now built with unthrown's TaggedError, each carrying a _tag discriminant (foldable with matchTags). The _tag is package-namespaced — e.g. "@temporal-contract/WorkflowExecutionNotFoundError" — so it never collides with a consumer's own tags; each error's .name stays the bare class name for readable logs. ChildWorkflowCancelledError is now a sibling of ChildWorkflowError (distinct _tag) rather than a subclass — discriminate on _tag / instanceof ChildWorkflowCancelledError instead of relying on instanceof ChildWorkflowError matching cancellation. The worker's ValidationError subclasses are unchanged — they still extend Temporal's ApplicationFailure for terminal-failure semantics.

    See the Migrating from neverthrow guide.

Patch Changes

  • Updated dependencies [8d0750f]
    • @temporal-contract/contract@3.0.0