Skip to content

chore: release packages#264

Open
btravers wants to merge 1 commit into
mainfrom
changeset-release/main
Open

chore: release packages#264
btravers wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@btravers

Copy link
Copy Markdown
Collaborator

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@temporal-contract/client@3.0.0

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

@temporal-contract/contract@3.0.0

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.

@temporal-contract/testing@3.0.0

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.

@temporal-contract/worker@3.0.0

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

Copilot AI review requested due to automatic review settings June 26, 2026 16:55

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 is an automated Changesets “release packages” PR that prepares the monorepo for publishing @temporal-contract/* packages to npm by applying the generated version bumps, changelog entries, and removing the consumed changeset.

Changes:

  • Bump package versions to 3.0.0 for client, contract, testing, and worker.
  • Add 3.0.0 changelog entries describing the major migration from neverthrow to unthrown.
  • Remove the consumed .changeset/migrate-to-unthrown.md file.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/worker/package.json Bumps @temporal-contract/worker version to 3.0.0 for the release.
packages/worker/CHANGELOG.md Adds the 3.0.0 release notes (major migration + dependency bump note).
packages/testing/package.json Bumps @temporal-contract/testing version to 3.0.0 for the release.
packages/testing/CHANGELOG.md Adds the 3.0.0 release notes documenting the major migration.
packages/contract/package.json Bumps @temporal-contract/contract version to 3.0.0 for the release.
packages/contract/CHANGELOG.md Adds the 3.0.0 release notes documenting the major migration.
packages/client/package.json Bumps @temporal-contract/client version to 3.0.0 for the release.
packages/client/CHANGELOG.md Adds the 3.0.0 release notes (major migration + dependency bump note).
.changeset/migrate-to-unthrown.md Removes the changeset after it has been incorporated into the release.

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