Skip to content

Effect

Version 4.0.0-beta.51

Patch Changes

  • #2049 778d2af Thanks @bohdanbirdie! - Add RpcSerialization.makeMsgPack for creating MessagePack serialization with custom msgpackr options. On Cloudflare Workers with allow_eval_during_startup (default for compatibility_date >= 2025-06-01), pass { useRecords: false } to prevent msgpackr’s JIT code generation via new Function(), which is blocked during request handling. Also fixes silent error swallowing in the msgPack decode path — non-incomplete errors are now rethrown instead of returning [].

  • #2010 4e24dcf Thanks @tim-smart! - process schema properties / elements concurrently

  • #2052 4b1c015 Thanks @gcanti! - Schema: expand FilterOutput and add FilterIssue for richer filter failures.

    The return type of a Schema.makeFilter predicate now supports two additional shapes:

    • { path, issue } where issue is string | SchemaIssue.Issue (previously only { path, message: string } was accepted). The issue arm lets you attach a fully-formed Issue at a nested path without manually constructing a Pointer.
    • ReadonlyArray<Schema.FilterIssue> to report several failures at once. An empty array is success, a single-element array is equivalent to returning that element, and multi-entry arrays are grouped into an Issue.Composite. This removes the need to import SchemaIssue and hand-build a Composite for multi-field validators.

    The single-failure shapes (undefined, true, false, string, SchemaIssue.Issue) are unchanged.

    Breaking: the object shape renamed from { path, message } to { path, issue }. Call sites that used the old shape must rename the field; the migration is mechanical.

    // before
    Schema.makeFilter((o) => ({ path: ["a"], message: "bad" }));
    // after
    Schema.makeFilter((o) => ({ path: ["a"], issue: "bad" }));

    Also renamed { path, message } to { path, issue } in the accepted return type of SchemaGetter.checkEffect.

  • #2047 454f8ad Thanks @gcanti! - Fix SchemaAST.isJson rejecting DAGs as cycles, closes #2021.

    The previous implementation marked every visited object in a single seen set and never removed it, so any value that referenced the same object through two different paths (a DAG, e.g. { x: shared, y: shared }) was treated as a cycle and returned false. Cycle detection now tracks only the current recursion path (popping on exit) and memoizes fully validated subtrees, so DAGs are accepted while true cycles are still rejected.

  • #2051 6754a0c Thanks @tim-smart! - disable sql traces for EventLog, RunnerStorage

  • #2053 90f7fd5 Thanks @tim-smart! - remove use of bigint literals

  • #2046 d7e1519 Thanks @gcanti! - Remove the options parameter from OpenApi.fromApi.

    The parameter only carried additionalProperties, but the function caches results in a WeakMap keyed solely on the api instance. Passing different options across calls for the same api was silently ignored, making the parameter order-dependent and effectively single-shot. No call sites were using it, so the signature is now simply fromApi(api).

  • #2044 72a8122 Thanks @tim-smart! - ensure envelope payloads are correctly encoded for notify path