Skip to content

NEXUS v0.18.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Nov 11:17
66ce65a

NEXUS v0.18 release notes

v0.18.0

Prepared 2026-10-31 (nothing tagged or published: v0.17.0 is the latest release).

v0.18.0 is a minor release that moves NEXUS to Effect 4. North-star tier: none (no NEXUS API is added; every change follows Effect 4's types). No scorecard audit moves.

Breaking

  • Requires Effect 4. effect is now a peer dependency (^4.1.0, developed against 4.1.0), so an application and NEXUS share one Effect. Node >=22.19, Effect 4's own floor.
  • Public signatures follow Effect 4's types.
    • Runtime.runFork returns Fiber.Fiber<A, E> (was Fiber.RuntimeFiber).
    • Service<Shape> and Capability.Environment are Context.Service<Shape, Shape> (was Context.Tag).
    • Schemas in Command, Event, State and Application are Schema.Codec<A, I> (was Schema.Schema<A, I>).
    • CommandValidationError.cause and a validated Event.subscribe fail with Schema.SchemaError (was ParseResult.ParseError).
    • EventBusShape.subscribe yields a PubSub.Subscription (was Queue.Dequeue).
    • ShutdownOptions.grace is a Duration.Input (was Duration.DurationInput).
  • Validation issue strings change. CommandValidationError.issues and StateValidationError.issues are now Effect 4's String(SchemaError) format, for example SchemaError(Expected string\n at ["n"]). Code that matches the old strings must be updated.
  • Runtime.run rejects with the squashed Cause (Effect 4's runPromise): a refusal rejects with the Refusal itself, so Runtime.isRefusal(rejection) now holds.

Changed

  • Runtime.refusalOf no longer unwraps a FiberFailure (Effect 4 has none); it still finds the refusal in a Cause or as the rejection itself.
  • Internal: the registry keeps a built Context instead of an Effect Runtime. isolated (the caller-isolation helper) is removed from Runtime.make's layer build, where Effect 4 restores the fiber's Context after a build and has no FiberRef; it stays for the scope close at termination and in settleWork. The architecture explanation changed to match.
  • The event bus closes each subscription with its own scope, and State ends its streams by shutting down its ref's PubSub, so closing ends streams normally, as before.
  • Event.subscribe subscription setup is uninterruptible between making its scope and registering the finalizer, so an interruption cannot leave an unclosed subscription.

Upgrade

Move the application to effect@^4.1.0 on Node 22.19 or later. Replace Effect 3 names in code that touches NEXUS's types (Schema.Schema to Schema.Codec, ParseError to SchemaError, Context.Tag to Context.Service), and update any match on validation issue strings. Other behavior is unchanged.

Verification

pnpm typecheck, pnpm test (38 files, 543 tests) and pnpm build pass; pnpm pack produces valancex-nexus-0.18.0.tgz containing dist/index.js.

Release steps

Valance and Port consume the unreleased pack through local packs and overrides in commits marked DO NOT MERGE BEFORE THE RELEASES:. After NEXUS 0.18.0 is published, revert those, then tag v0.18.0.