Skip to content

Releases: btravstack/amqp-contract

@amqp-contract/worker@2.0.0

27 Jun 23:31

Choose a tag to compare

Patch Changes

  • Updated dependencies [8707df1]
    • @amqp-contract/contract@2.0.0
    • @amqp-contract/core@2.0.0

@amqp-contract/worker@1.0.0

27 Jun 00:33

Choose a tag to compare

Patch Changes

  • Updated dependencies [d5fec7e]
  • Updated dependencies [4ed4abe]
    • @amqp-contract/contract@1.0.0
    • @amqp-contract/core@1.0.0

@amqp-contract/testing@2.0.0

27 Jun 23:31

Choose a tag to compare

@amqp-contract/testing@2.0.0

@amqp-contract/testing@1.0.0

27 Jun 09:59

Choose a tag to compare

@amqp-contract/testing@1.0.0

@amqp-contract/core@2.0.0

27 Jun 23:31

Choose a tag to compare

Patch Changes

  • Updated dependencies [8707df1]
    • @amqp-contract/contract@2.0.0

@amqp-contract/core@1.0.0

27 Jun 00:34

Choose a tag to compare

Patch Changes

  • Updated dependencies [d5fec7e]
  • Updated dependencies [4ed4abe]
    • @amqp-contract/contract@1.0.0

@amqp-contract/contract@2.0.0

27 Jun 23:31

Choose a tag to compare

Major Changes

  • 8707df1: BREAKING: Upgrade unthrown to 1.0.0.

    unthrown 1.0 renames the value constructors — okOk, errErr, defectDefect (the lowercase forms are removed). All packages now depend on unthrown@1.0.0, so consumers that build Result / AsyncResult values directly must update their call sites:

    - import { ok, err } from "unthrown";
    - return ok(undefined).toAsync();
    - return err(new RetryableError("...")).toAsync();
    + import { Ok, Err } from "unthrown";
    + return Ok(undefined).toAsync();
    + return Err(new RetryableError("...")).toAsync();

    Everything else is unchanged: the .match({ ok, err, defect }) handler keys stay lowercase (they're case branches, not constructors), and fromPromise / fromSafePromise / fromThrowable / all / allAsync / TaggedError(tag, { name }) / .isOk() / .toAsync() / .unwrap() keep the same signatures.

@amqp-contract/contract@1.0.0

27 Jun 00:34

Choose a tag to compare

Major Changes

  • d5fec7e: BREAKING: Replace the neverthrow dependency with unthrown for value-based error handling across all packages.

    unthrown keeps the errors-as-values model but adds a third Defect channel for unexpected failures, and renames/​reshapes several APIs. If you consume the Result / AsyncResult values returned by the client, worker, and core, you will need to update your call sites.

    What changed

    • ResultAsyncAsyncResult. All async-returning methods (publish, call, create, close, handler return types, …) now return unthrown's AsyncResult<T, E>.
    • .match() is now boxed and has three channels. result.match(okFn, errFn)result.match({ ok, err, defect }). The extra defect branch handles unexpected throws.
    • .andThen.flatMap, .andTee.tap, .orTee.tapErr (.map, .mapErr, .orElse are unchanged).
    • No okAsync / errAsync. Build async results with ok(value).toAsync() / err(error).toAsync().
    • No static ResultAsync.fromPromise / Result.fromThrowable. Use the free functions fromPromise(promise, qualify), fromSafePromise(promise), and fromThrowable(fn, qualify). The qualify mapper returns E | Defect.
    • ._unsafeUnwrap().unwrap(), ._unsafeUnwrapErr().unwrapErr() (these now throw UnwrapError on the wrong variant, and re-throw the original cause on a Defect).
    • .isOk() / .isErr() / .isDefect() narrow like neverthrow's did (they guard this); standalone isOk(result) / isErr(result) / isDefect(result) functions are also available.
    • Error classes are now TaggedErrors. TechnicalError, MessageValidationError, RetryableError, NonRetryableError, RpcTimeoutError, and RpcCancelledError each carry a _tag for exhaustive dispatch via matchTags. The tags are namespaced"@amqp-contract/TechnicalError", "@amqp-contract/RetryableError", etc. — so they don't collide with other libraries' tags in a shared matchTags. The human-facing Error.name is kept bare ("TechnicalError", "RetryableError", …), so stack traces and .name checks are unaffected. Their positional constructors are unchanged.
    • HandlerError is now a tagged-union type, not an abstract class. It is RetryableError | NonRetryableError. Replace error instanceof HandlerError with isHandlerError(error).

Patch Changes

@amqp-contract/client@2.0.0

27 Jun 23:31

Choose a tag to compare

Patch Changes

  • Updated dependencies [8707df1]
    • @amqp-contract/contract@2.0.0
    • @amqp-contract/core@2.0.0

@amqp-contract/client@1.0.0

27 Jun 00:33

Choose a tag to compare

Patch Changes

  • Updated dependencies [d5fec7e]
  • Updated dependencies [4ed4abe]
    • @amqp-contract/contract@1.0.0
    • @amqp-contract/core@1.0.0