Repository navigation
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.
effectis 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.runForkreturnsFiber.Fiber<A, E>(wasFiber.RuntimeFiber).Service<Shape>andCapability.EnvironmentareContext.Service<Shape, Shape>(wasContext.Tag).- Schemas in
Command,Event,StateandApplicationareSchema.Codec<A, I>(wasSchema.Schema<A, I>). CommandValidationError.causeand a validatedEvent.subscribefail withSchema.SchemaError(wasParseResult.ParseError).EventBusShape.subscribeyields aPubSub.Subscription(wasQueue.Dequeue).ShutdownOptions.graceis aDuration.Input(wasDuration.DurationInput).
- Validation issue strings change.
CommandValidationError.issuesandStateValidationError.issuesare now Effect 4'sString(SchemaError)format, for exampleSchemaError(Expected string\n at ["n"]). Code that matches the old strings must be updated. Runtime.runrejects with the squashedCause(Effect 4'srunPromise): a refusal rejects with theRefusalitself, soRuntime.isRefusal(rejection)now holds.
Changed
Runtime.refusalOfno longer unwraps aFiberFailure(Effect 4 has none); it still finds the refusal in aCauseor as the rejection itself.- Internal: the registry keeps a built
Contextinstead of an EffectRuntime.isolated(the caller-isolation helper) is removed fromRuntime.make's layer build, where Effect 4 restores the fiber's Context after a build and has noFiberRef; it stays for the scope close at termination and insettleWork. The architecture explanation changed to match. - The event bus closes each subscription with its own scope, and
Stateends its streams by shutting down its ref'sPubSub, so closing ends streams normally, as before. Event.subscribesubscription 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.