Skip to content

Releases: btravstack/temporal-contract

@temporal-contract/worker@7.0.0

Choose a tag to compare

Major Changes

  • dc4a0cd: Cross-project DNA alignment with amqp-contract (#301, #302, #303, #304).

    Breaking — AsyncResult-returning creation (#301). The runtime factories now model creation failures on the Err channel instead of throwing, matching the org-wide Typed*.create() shape:

    • TypedClient.create({ contract, client, interceptors? })AsyncResult<TypedClient, TechnicalError> (single options object; surfaces a missing Schedule API and eager-connection failures via connection.ensureConnected).
    • createWorker(options)AsyncResult<Worker, TechnicalError> (bundling/connection failures modeled).
    • TechnicalError (tag @temporal-contract/TechnicalError) is exported from @temporal-contract/contract/errors and re-exported by client and worker.
    • Migration: deprecated throwing aliases TypedClient.createOrThrow(contract, client) and createWorkerOrThrow(options) preserve the old behavior and will be removed in a future major.

    Breaking — unified context model (#302). declareActivitiesHandler's middleware option now takes a single middleware (compose chains with composeActivityMiddleware(...), outermost-first) instead of an array, and next takes an object patch:

    • next({ context }) extends the typed context flowing downstream (shallow-merged; bounded generics TContextOut extends TContextIn accumulate across composeActivityMiddleware's overloads — amqp-contract's model). defineActivityMiddleware pins a middleware's context types; EmptyContext is the empty seed.
    • next({ input }) replaces the positional next(input) substitution (still re-validated against the contract schema).
    • createContext now seeds the accumulated context; helpers.context is the seed plus every middleware injection (an empty object when unconfigured, no longer undefined).
    • Client interceptors: TypedClient.create({ interceptors }) wraps startWorkflow / executeWorkflow / signalWithStart and handle-level signal / query / update, outermost-first, outside validation — patch args via next({ input }), retry by calling next again, short-circuit by returning without calling next.
    • The demesne Layer.forkScope recipe is documented as the recommended createContext engine for scoped, resource-releasing contexts.

    Testing — in-process story (#303). New @temporal-contract/testing/time-skipping entry point: a Vitest fixture (it with a worker-scoped testEnv) plus createTimeSkippingEnvironment() wrapping Temporal's time-skipping TestWorkflowEnvironment — full contract-pipeline tests (validation, middleware, typed errors, rehydration) without Docker. @temporalio/testing ^1 is a new peer dependency of the testing package.

    Consistency cleanup (#304). activityOptions on declareWorkflow is now optional when every reachable activity carries contract-level defaultOptions (or an activityOptionsByName entry) — a descriptive declaration-time error lists uncovered activities otherwise. The direction-aware inference primitives (ClientInferInput / ClientInferOutput / WorkerInferInput / WorkerInferOutput) are centralized in @temporal-contract/contract (worker/client re-export them unchanged). The obsolete migrating-to-neverthrow guide is removed, stale JSDoc fixed, and docs/examples adopt the composition-first rule (define resources first, then reference them in defineContract).

Minor Changes

  • 52d4c01: Contract-declared typed domain errors, activity middleware + typed dependency context, and contract-level default activity options.

    • Typed domain errorsdefineActivity / defineWorkflow accept an errors map ({ data?: StandardSchema, message?, nonRetryable? } per name). Activity implementations receive typed constructors via a new helpers argument ((args, { errors }) => Err(errors.PaymentDeclined({ reason }))); the worker serializes them as ApplicationFailure (type = error name, details[0] = validated payload, nonRetryable from the contract). On the workflow side, errors-declaring activities now return AsyncResult<Output, ContractError union | ActivityError | ActivityCancelledError> (mirroring the child-workflow API); activities without declared errors keep the throwing Promise shape. Workflows can declare their own errors and fail with throw context.errors.X(data); the typed client rehydrates matching failures into ContractError on executeWorkflow and handle.result(). New @temporal-contract/contract/errors entry point exports ContractError and the supporting types.
    • Activity middleware + typed contextdeclareActivitiesHandler accepts createContext (typed dependency injection, surfaced to implementations as helpers.context) and middleware (contract-aware chain running inside the validation boundary, operating on the unthrown AsyncResult).
    • Contract-level activity option defaultsdefineActivity accepts defaultOptions (timeouts, retry policy). Merge precedence at the worker: declareWorkflow activityOptions < contract defaultOptions < activityOptionsByName.

Patch Changes

  • 1ec704a: Require unthrown >= 4.1.0 (peer range ^4^4.1.0).

    unthrown 4.1 renames several operators and deprecates the old aliases (orElseflatMapErr, recoverrecoverErr, unwrap/unwrapErr/unwrapOr/unwrapOrElseget/getErr/getOr/getOrElse). The packages' own code never used the deprecated names, so no runtime behavior changes — the docs and guides now reference the new names, and raising the peer minimum guarantees the renamed operators exist for consumers following them.

  • Updated dependencies [dc4a0cd]

  • Updated dependencies [52d4c01]

  • Updated dependencies [1ec704a]

    • @temporal-contract/contract@7.0.0

@temporal-contract/testing@7.0.0

Choose a tag to compare

Minor Changes

  • dc4a0cd: Cross-project DNA alignment with amqp-contract (#301, #302, #303, #304).

    Breaking — AsyncResult-returning creation (#301). The runtime factories now model creation failures on the Err channel instead of throwing, matching the org-wide Typed*.create() shape:

    • TypedClient.create({ contract, client, interceptors? })AsyncResult<TypedClient, TechnicalError> (single options object; surfaces a missing Schedule API and eager-connection failures via connection.ensureConnected).
    • createWorker(options)AsyncResult<Worker, TechnicalError> (bundling/connection failures modeled).
    • TechnicalError (tag @temporal-contract/TechnicalError) is exported from @temporal-contract/contract/errors and re-exported by client and worker.
    • Migration: deprecated throwing aliases TypedClient.createOrThrow(contract, client) and createWorkerOrThrow(options) preserve the old behavior and will be removed in a future major.

    Breaking — unified context model (#302). declareActivitiesHandler's middleware option now takes a single middleware (compose chains with composeActivityMiddleware(...), outermost-first) instead of an array, and next takes an object patch:

    • next({ context }) extends the typed context flowing downstream (shallow-merged; bounded generics TContextOut extends TContextIn accumulate across composeActivityMiddleware's overloads — amqp-contract's model). defineActivityMiddleware pins a middleware's context types; EmptyContext is the empty seed.
    • next({ input }) replaces the positional next(input) substitution (still re-validated against the contract schema).
    • createContext now seeds the accumulated context; helpers.context is the seed plus every middleware injection (an empty object when unconfigured, no longer undefined).
    • Client interceptors: TypedClient.create({ interceptors }) wraps startWorkflow / executeWorkflow / signalWithStart and handle-level signal / query / update, outermost-first, outside validation — patch args via next({ input }), retry by calling next again, short-circuit by returning without calling next.
    • The demesne Layer.forkScope recipe is documented as the recommended createContext engine for scoped, resource-releasing contexts.

    Testing — in-process story (#303). New @temporal-contract/testing/time-skipping entry point: a Vitest fixture (it with a worker-scoped testEnv) plus createTimeSkippingEnvironment() wrapping Temporal's time-skipping TestWorkflowEnvironment — full contract-pipeline tests (validation, middleware, typed errors, rehydration) without Docker. @temporalio/testing ^1 is a new peer dependency of the testing package.

    Consistency cleanup (#304). activityOptions on declareWorkflow is now optional when every reachable activity carries contract-level defaultOptions (or an activityOptionsByName entry) — a descriptive declaration-time error lists uncovered activities otherwise. The direction-aware inference primitives (ClientInferInput / ClientInferOutput / WorkerInferInput / WorkerInferOutput) are centralized in @temporal-contract/contract (worker/client re-export them unchanged). The obsolete migrating-to-neverthrow guide is removed, stale JSDoc fixed, and docs/examples adopt the composition-first rule (define resources first, then reference them in defineContract).

@temporal-contract/contract@7.0.0

Choose a tag to compare

Minor Changes

  • dc4a0cd: Cross-project DNA alignment with amqp-contract (#301, #302, #303, #304).

    Breaking — AsyncResult-returning creation (#301). The runtime factories now model creation failures on the Err channel instead of throwing, matching the org-wide Typed*.create() shape:

    • TypedClient.create({ contract, client, interceptors? })AsyncResult<TypedClient, TechnicalError> (single options object; surfaces a missing Schedule API and eager-connection failures via connection.ensureConnected).
    • createWorker(options)AsyncResult<Worker, TechnicalError> (bundling/connection failures modeled).
    • TechnicalError (tag @temporal-contract/TechnicalError) is exported from @temporal-contract/contract/errors and re-exported by client and worker.
    • Migration: deprecated throwing aliases TypedClient.createOrThrow(contract, client) and createWorkerOrThrow(options) preserve the old behavior and will be removed in a future major.

    Breaking — unified context model (#302). declareActivitiesHandler's middleware option now takes a single middleware (compose chains with composeActivityMiddleware(...), outermost-first) instead of an array, and next takes an object patch:

    • next({ context }) extends the typed context flowing downstream (shallow-merged; bounded generics TContextOut extends TContextIn accumulate across composeActivityMiddleware's overloads — amqp-contract's model). defineActivityMiddleware pins a middleware's context types; EmptyContext is the empty seed.
    • next({ input }) replaces the positional next(input) substitution (still re-validated against the contract schema).
    • createContext now seeds the accumulated context; helpers.context is the seed plus every middleware injection (an empty object when unconfigured, no longer undefined).
    • Client interceptors: TypedClient.create({ interceptors }) wraps startWorkflow / executeWorkflow / signalWithStart and handle-level signal / query / update, outermost-first, outside validation — patch args via next({ input }), retry by calling next again, short-circuit by returning without calling next.
    • The demesne Layer.forkScope recipe is documented as the recommended createContext engine for scoped, resource-releasing contexts.

    Testing — in-process story (#303). New @temporal-contract/testing/time-skipping entry point: a Vitest fixture (it with a worker-scoped testEnv) plus createTimeSkippingEnvironment() wrapping Temporal's time-skipping TestWorkflowEnvironment — full contract-pipeline tests (validation, middleware, typed errors, rehydration) without Docker. @temporalio/testing ^1 is a new peer dependency of the testing package.

    Consistency cleanup (#304). activityOptions on declareWorkflow is now optional when every reachable activity carries contract-level defaultOptions (or an activityOptionsByName entry) — a descriptive declaration-time error lists uncovered activities otherwise. The direction-aware inference primitives (ClientInferInput / ClientInferOutput / WorkerInferInput / WorkerInferOutput) are centralized in @temporal-contract/contract (worker/client re-export them unchanged). The obsolete migrating-to-neverthrow guide is removed, stale JSDoc fixed, and docs/examples adopt the composition-first rule (define resources first, then reference them in defineContract).

  • 52d4c01: Contract-declared typed domain errors, activity middleware + typed dependency context, and contract-level default activity options.

    • Typed domain errorsdefineActivity / defineWorkflow accept an errors map ({ data?: StandardSchema, message?, nonRetryable? } per name). Activity implementations receive typed constructors via a new helpers argument ((args, { errors }) => Err(errors.PaymentDeclined({ reason }))); the worker serializes them as ApplicationFailure (type = error name, details[0] = validated payload, nonRetryable from the contract). On the workflow side, errors-declaring activities now return AsyncResult<Output, ContractError union | ActivityError | ActivityCancelledError> (mirroring the child-workflow API); activities without declared errors keep the throwing Promise shape. Workflows can declare their own errors and fail with throw context.errors.X(data); the typed client rehydrates matching failures into ContractError on executeWorkflow and handle.result(). New @temporal-contract/contract/errors entry point exports ContractError and the supporting types.
    • Activity middleware + typed contextdeclareActivitiesHandler accepts createContext (typed dependency injection, surfaced to implementations as helpers.context) and middleware (contract-aware chain running inside the validation boundary, operating on the unthrown AsyncResult).
    • Contract-level activity option defaultsdefineActivity accepts defaultOptions (timeouts, retry policy). Merge precedence at the worker: declareWorkflow activityOptions < contract defaultOptions < activityOptionsByName.

Patch Changes

  • 1ec704a: Require unthrown >= 4.1.0 (peer range ^4^4.1.0).

    unthrown 4.1 renames several operators and deprecates the old aliases (orElseflatMapErr, recoverrecoverErr, unwrap/unwrapErr/unwrapOr/unwrapOrElseget/getErr/getOr/getOrElse). The packages' own code never used the deprecated names, so no runtime behavior changes — the docs and guides now reference the new names, and raising the peer minimum guarantees the renamed operators exist for consumers following them.

@temporal-contract/client@7.0.0

Choose a tag to compare

Major Changes

  • dc4a0cd: Cross-project DNA alignment with amqp-contract (#301, #302, #303, #304).

    Breaking — AsyncResult-returning creation (#301). The runtime factories now model creation failures on the Err channel instead of throwing, matching the org-wide Typed*.create() shape:

    • TypedClient.create({ contract, client, interceptors? })AsyncResult<TypedClient, TechnicalError> (single options object; surfaces a missing Schedule API and eager-connection failures via connection.ensureConnected).
    • createWorker(options)AsyncResult<Worker, TechnicalError> (bundling/connection failures modeled).
    • TechnicalError (tag @temporal-contract/TechnicalError) is exported from @temporal-contract/contract/errors and re-exported by client and worker.
    • Migration: deprecated throwing aliases TypedClient.createOrThrow(contract, client) and createWorkerOrThrow(options) preserve the old behavior and will be removed in a future major.

    Breaking — unified context model (#302). declareActivitiesHandler's middleware option now takes a single middleware (compose chains with composeActivityMiddleware(...), outermost-first) instead of an array, and next takes an object patch:

    • next({ context }) extends the typed context flowing downstream (shallow-merged; bounded generics TContextOut extends TContextIn accumulate across composeActivityMiddleware's overloads — amqp-contract's model). defineActivityMiddleware pins a middleware's context types; EmptyContext is the empty seed.
    • next({ input }) replaces the positional next(input) substitution (still re-validated against the contract schema).
    • createContext now seeds the accumulated context; helpers.context is the seed plus every middleware injection (an empty object when unconfigured, no longer undefined).
    • Client interceptors: TypedClient.create({ interceptors }) wraps startWorkflow / executeWorkflow / signalWithStart and handle-level signal / query / update, outermost-first, outside validation — patch args via next({ input }), retry by calling next again, short-circuit by returning without calling next.
    • The demesne Layer.forkScope recipe is documented as the recommended createContext engine for scoped, resource-releasing contexts.

    Testing — in-process story (#303). New @temporal-contract/testing/time-skipping entry point: a Vitest fixture (it with a worker-scoped testEnv) plus createTimeSkippingEnvironment() wrapping Temporal's time-skipping TestWorkflowEnvironment — full contract-pipeline tests (validation, middleware, typed errors, rehydration) without Docker. @temporalio/testing ^1 is a new peer dependency of the testing package.

    Consistency cleanup (#304). activityOptions on declareWorkflow is now optional when every reachable activity carries contract-level defaultOptions (or an activityOptionsByName entry) — a descriptive declaration-time error lists uncovered activities otherwise. The direction-aware inference primitives (ClientInferInput / ClientInferOutput / WorkerInferInput / WorkerInferOutput) are centralized in @temporal-contract/contract (worker/client re-export them unchanged). The obsolete migrating-to-neverthrow guide is removed, stale JSDoc fixed, and docs/examples adopt the composition-first rule (define resources first, then reference them in defineContract).

Minor Changes

  • 52d4c01: Contract-declared typed domain errors, activity middleware + typed dependency context, and contract-level default activity options.

    • Typed domain errorsdefineActivity / defineWorkflow accept an errors map ({ data?: StandardSchema, message?, nonRetryable? } per name). Activity implementations receive typed constructors via a new helpers argument ((args, { errors }) => Err(errors.PaymentDeclined({ reason }))); the worker serializes them as ApplicationFailure (type = error name, details[0] = validated payload, nonRetryable from the contract). On the workflow side, errors-declaring activities now return AsyncResult<Output, ContractError union | ActivityError | ActivityCancelledError> (mirroring the child-workflow API); activities without declared errors keep the throwing Promise shape. Workflows can declare their own errors and fail with throw context.errors.X(data); the typed client rehydrates matching failures into ContractError on executeWorkflow and handle.result(). New @temporal-contract/contract/errors entry point exports ContractError and the supporting types.
    • Activity middleware + typed contextdeclareActivitiesHandler accepts createContext (typed dependency injection, surfaced to implementations as helpers.context) and middleware (contract-aware chain running inside the validation boundary, operating on the unthrown AsyncResult).
    • Contract-level activity option defaultsdefineActivity accepts defaultOptions (timeouts, retry policy). Merge precedence at the worker: declareWorkflow activityOptions < contract defaultOptions < activityOptionsByName.

Patch Changes

  • 1ec704a: Require unthrown >= 4.1.0 (peer range ^4^4.1.0).

    unthrown 4.1 renames several operators and deprecates the old aliases (orElseflatMapErr, recoverrecoverErr, unwrap/unwrapErr/unwrapOr/unwrapOrElseget/getErr/getOr/getOrElse). The packages' own code never used the deprecated names, so no runtime behavior changes — the docs and guides now reference the new names, and raising the peer minimum guarantees the renamed operators exist for consumers following them.

  • Updated dependencies [dc4a0cd]

  • Updated dependencies [52d4c01]

  • Updated dependencies [1ec704a]

    • @temporal-contract/contract@7.0.0

@temporal-contract/worker@6.1.0

Choose a tag to compare

Minor Changes

  • 2960244: Add the qualify(type, options?) helper to @temporal-contract/worker/activity.

    It builds the qualifier function fromPromise needs, replacing the
    ApplicationFailure.create({ type, message: error instanceof Error ? ... })
    boilerplate previously repeated in every activity:

    import { declareActivitiesHandler, qualify } from "@temporal-contract/worker/activity";
    import { fromPromise } from "unthrown";
    
    export const activities = declareActivitiesHandler({
      contract,
      activities: {
        sendEmail: (args) =>
          fromPromise(emailService.send(args), qualify("EMAIL_SEND_FAILED")).map(() => ({
            sent: true,
          })),
      },
    });

    An Error rejection keeps its own message and is preserved as cause;
    non-Error rejections fall back to options.message (or String(error)).
    options.nonRetryable and options.details are forwarded to the failure.
    The qualifier always wraps — even an ApplicationFailure rejection — so the
    declared type is guaranteed for retry policies.

  • d3e71fc: Upgrade the unthrown peer dependency to ^4 (from ^3).

    unthrown 4 is not compatible with unthrown 3 — most notably, TaggedError
    now reserves name and message as payload fields (they are set via
    Error, not passed as structured data). The client and worker error classes
    were migrated accordingly; their public shape is unchanged (_tag, name,
    message, and the typed payload fields are all still present and behave
    identically). Consumers must be on unthrown@4.

    Released as a minor rather than a major: these packages have no external
    consumers pinned to unthrown@3, so the peer-range change carries no
    real-world break. If you depend on @temporal-contract/{contract,client,worker},
    bump unthrown to ^4 alongside this release.

Patch Changes

  • 3b88b3f: Audit fixes across the published packages.

    @temporal-contract/testing: @temporalio/client and @temporalio/worker
    moved from dependencies to peerDependencies (^1). Both packages' types are
    exposed through the public it fixture (Connection / NativeConnection), so
    consumers must resolve them to a single instance to avoid disjoint nominal
    types. Package managers that auto-install peers (npm 7+, pnpm with
    autoInstallPeers) are unaffected; other setups must add the two packages
    explicitly — any project using this testing helper already depends on them in
    practice. Because that install-shape change can require consumer action, this is
    released as a minor for @temporal-contract/testing. The stale config
    entry was also dropped from files.

    All packages: sideEffects: false is now declared, enabling bundler
    tree-shaking. The worker package's createTypedChildHandle no longer uses
    any internally, and JSDoc examples were fixed to use ESM-correct imports
    (.js extensions, workflowsPathFromURL instead of require.resolve).

  • Updated dependencies [3b88b3f]

  • Updated dependencies [d3e71fc]

    • @temporal-contract/contract@6.1.0

@temporal-contract/testing@6.1.0

Choose a tag to compare

Minor Changes

  • 3b88b3f: Audit fixes across the published packages.

    @temporal-contract/testing: @temporalio/client and @temporalio/worker
    moved from dependencies to peerDependencies (^1). Both packages' types are
    exposed through the public it fixture (Connection / NativeConnection), so
    consumers must resolve them to a single instance to avoid disjoint nominal
    types. Package managers that auto-install peers (npm 7+, pnpm with
    autoInstallPeers) are unaffected; other setups must add the two packages
    explicitly — any project using this testing helper already depends on them in
    practice. Because that install-shape change can require consumer action, this is
    released as a minor for @temporal-contract/testing. The stale config
    entry was also dropped from files.

    All packages: sideEffects: false is now declared, enabling bundler
    tree-shaking. The worker package's createTypedChildHandle no longer uses
    any internally, and JSDoc examples were fixed to use ESM-correct imports
    (.js extensions, workflowsPathFromURL instead of require.resolve).

@temporal-contract/contract@6.1.0

Choose a tag to compare

Minor Changes

  • d3e71fc: Upgrade the unthrown peer dependency to ^4 (from ^3).

    unthrown 4 is not compatible with unthrown 3 — most notably, TaggedError
    now reserves name and message as payload fields (they are set via
    Error, not passed as structured data). The client and worker error classes
    were migrated accordingly; their public shape is unchanged (_tag, name,
    message, and the typed payload fields are all still present and behave
    identically). Consumers must be on unthrown@4.

    Released as a minor rather than a major: these packages have no external
    consumers pinned to unthrown@3, so the peer-range change carries no
    real-world break. If you depend on @temporal-contract/{contract,client,worker},
    bump unthrown to ^4 alongside this release.

Patch Changes

  • 3b88b3f: Audit fixes across the published packages.

    @temporal-contract/testing: @temporalio/client and @temporalio/worker
    moved from dependencies to peerDependencies (^1). Both packages' types are
    exposed through the public it fixture (Connection / NativeConnection), so
    consumers must resolve them to a single instance to avoid disjoint nominal
    types. Package managers that auto-install peers (npm 7+, pnpm with
    autoInstallPeers) are unaffected; other setups must add the two packages
    explicitly — any project using this testing helper already depends on them in
    practice. Because that install-shape change can require consumer action, this is
    released as a minor for @temporal-contract/testing. The stale config
    entry was also dropped from files.

    All packages: sideEffects: false is now declared, enabling bundler
    tree-shaking. The worker package's createTypedChildHandle no longer uses
    any internally, and JSDoc examples were fixed to use ESM-correct imports
    (.js extensions, workflowsPathFromURL instead of require.resolve).

@temporal-contract/client@6.1.0

Choose a tag to compare

Minor Changes

  • d3e71fc: Upgrade the unthrown peer dependency to ^4 (from ^3).

    unthrown 4 is not compatible with unthrown 3 — most notably, TaggedError
    now reserves name and message as payload fields (they are set via
    Error, not passed as structured data). The client and worker error classes
    were migrated accordingly; their public shape is unchanged (_tag, name,
    message, and the typed payload fields are all still present and behave
    identically). Consumers must be on unthrown@4.

    Released as a minor rather than a major: these packages have no external
    consumers pinned to unthrown@3, so the peer-range change carries no
    real-world break. If you depend on @temporal-contract/{contract,client,worker},
    bump unthrown to ^4 alongside this release.

Patch Changes

  • 3b88b3f: Audit fixes across the published packages.

    @temporal-contract/testing: @temporalio/client and @temporalio/worker
    moved from dependencies to peerDependencies (^1). Both packages' types are
    exposed through the public it fixture (Connection / NativeConnection), so
    consumers must resolve them to a single instance to avoid disjoint nominal
    types. Package managers that auto-install peers (npm 7+, pnpm with
    autoInstallPeers) are unaffected; other setups must add the two packages
    explicitly — any project using this testing helper already depends on them in
    practice. Because that install-shape change can require consumer action, this is
    released as a minor for @temporal-contract/testing. The stale config
    entry was also dropped from files.

    All packages: sideEffects: false is now declared, enabling bundler
    tree-shaking. The worker package's createTypedChildHandle no longer uses
    any internally, and JSDoc examples were fixed to use ESM-correct imports
    (.js extensions, workflowsPathFromURL instead of require.resolve).

  • Updated dependencies [3b88b3f]

  • Updated dependencies [d3e71fc]

    • @temporal-contract/contract@6.1.0

@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