Skip to content

Effect

4.0.0-beta.47

Patch Changes

  • #2017 c584726 Thanks @gcanti! - Schema: add annotateEncoded function for annotating the encoded side of a schema.

  • #2013 86a91a4 Thanks @gcanti! - Schema: add withDecodingDefaultTypeKey / withDecodingDefaultType, closes #2012

  • #2018 131caf9 Thanks @gcanti! - Schema: allow Class constructors to accept void when all fields are optional, closes #2015.

  • #2016 c3615c8 Thanks @gcanti! - Schema: rename "~rebuild.out" to "Rebuild"

4.0.0-beta.46

Patch Changes

  • #2008 3a30b9e Thanks @tim-smart! - fix eventlog skipping entries

4.0.0-beta.45

Patch Changes

  • #1883 5c3af6d Thanks @tim-smart! - Add EventLogServerUnencrypted module

4.0.0-beta.44

Patch Changes

  • #1943 e3f0621 Thanks @gcanti! - Add DateFromString, BigIntFromString, BigDecimalFromString, TimeZoneNamedFromString, TimeZoneFromString, and DateTimeZonedFromString schemas, closes #1941.

  • #1996 5b476ab Thanks @gcanti! - Schema: add StringFromBase64, StringFromBase64Url, StringFromHex, and StringFromUriComponent schemas for decoding encoded strings into UTF-8 strings, closes #1995.

  • #1952 6b40e5a Thanks @tim-smart! - Effect.repeat now uses effect return value when using options

  • #1961 7bb5dce Thanks @IMax153! - Rename Atom’s Context type to AtomContext

  • #1975 3b09fb3 Thanks @tim-smart! - catch defects when building Entity handlers

  • #2000 2370410 Thanks @tim-smart! - fix cache constructor inference by moving the lookup option

  • #1928 dabc272 Thanks @tim-smart! - Add schema.makeEffect(input, options?) to Schema.Bottom and schema-backed classes, matching the existing constructor behavior exposed by makeUnsafe / makeOption while returning an Effect failure with Schema.SchemaError.

  • #1949 08b63c3 Thanks @tim-smart! - Update the unstable HTTP middleware logger to annotate only the request path in http.url instead of including the full URL (query / fragment), and add a regression test.

  • #1962 dfff04c Thanks @tim-smart! - Add KeyValueStore.layerSql to back key-value storage with a SQL database via SqlClient.

  • #1963 9baed9e Thanks @tim-smart! - Fix Unify.unify so Layer unions merge correctly, and add type tests covering Layer unification.

  • #2004 7846792 Thanks @tim-smart! - Fix Stream.toQueue types and implementation to return a Queue.Dequeue in both overloads and delegate to Channel.toQueueArray.

  • #1974 1556a24 Thanks @juliusmarminge! - Fix unstable CLI boolean flags so Flag.optional(Flag.boolean(...)) returns Option.none() when omitted, and support canonical --no-<flag> negation for boolean flags.

  • #1980 7c11bc2 Thanks @tim-smart! - fix Entity.keepAlive

  • #1929 b5ea591 Thanks @gcanti! - Simplify and align the default-value APIs.

    Schema.withConstructorDefault now accepts an Effect<T> instead of (o: Option<undefined>) => Option<T> | Effect<Option<T>>.

    Schema.withDecodingDefault / Schema.withDecodingDefaultKey now accept an Effect<T> instead of () => T, enabling effectful defaults.

    SchemaGetter.withDefault follows the same change, accepting Effect<T> instead of () => T.

  • #1966 0853afa Thanks @gcanti! - Reuse existing references when duplicate identifiers have the same representation, closes #1927.

  • #1942 ac845f3 Thanks @gcanti! - Fix ErrorClass and TaggedErrorClass toString to match native Error output format (e.g. E: my message instead of E({"message":"my message"})), closes #1940.

    Also fix prototype properties (e.g. name) being lost after .extend().

  • #1956 b80c462 Thanks @gcanti! - Add Schema.resolveAnnotationsKey API to retrieve the context (key-level) annotations from a schema, closes #1947.

    Also rename Schema.resolveInto to Schema.resolveAnnotations.

  • #2005 b3f535d Thanks @gcanti! - Fix Stream.splitLines to correctly handle standalone \r as a line terminator and flush the final unterminated line when the stream ends, closes #2002.

  • #1936 6fe2e93 Thanks @IMax153! - Fix Stream.groupedWithin dropping partial batches when the upstream ends or goes idle.

  • #1981 cda8004 Thanks @tim-smart! - add rpc ConnectionHooks

  • #1965 8335477 Thanks @tim-smart! - return resolvers directly from SqlModel.makeResolvers

  • #1960 8c836f9 Thanks @IMax153! - Add ChildProcessHandle.unref, returning an Effect that restores the child process reference when run.

  • #1984 718ff6f Thanks @jannabiforever! - Make Effect.retry with times argument to propagate the original error.

  • #1930 7eed84f Thanks @mikearnaldi! - Add Stream.service and Stream.serviceOption for accessing services as single-element streams.

  • #1935 5df46fe Thanks @gcanti! - Schema: add asClass API to turn any schema into a class with static method support.

    Example

    import { Schema } from "effect";
    class MyString extends Schema.asClass(Schema.String) {
    static readonly decodeUnknownSync = Schema.decodeUnknownSync(this);
    }
    MyString.decodeUnknownSync("a"); // "a"
  • #1958 82dd0f2 Thanks @gcanti! - Schema: add MissingSelfGeneric compile-time error for Class, TaggedClass, ErrorClass, and TaggedErrorClass when the Self type parameter is omitted.

  • #1957 03ae41e Thanks @gcanti! - Schema: remove "~annotate.in" type from Bottom interface, inlining it where needed

  • #1951 4677a0a Thanks @gcanti! - Rename Schema.makeUnsafe instance method back to Schema.make on all schemas and schema-backed classes.

    Also remove the static readonly make override from ShardId to avoid conflicting with the inherited schema make method. The module-level ShardId.make(group, id) function is still available.

  • #1999 87e1fc8 Thanks @tim-smart! - use NoInfer in Layer constructors to prevent type erasure

  • #1971 c1af1b7 Thanks @joepjoosten! - Allow unstable CLI fallback prompts to be created dynamically from an Effect.

  • #1961 7bb5dce Thanks @IMax153! - Rename the ServiceMap module to Context across exports, docs, and tests.

  • #1973 c8a877b Thanks @joepjoosten! - Underline the active label in CLI multi-select prompts and add a scratchpad example for manual verification.

  • #1967 7da961a Thanks @tim-smart! - clean up ShardId

4.0.0-beta.43

Patch Changes

  • #1904 2ae33d0 Thanks @juliusmarminge! - Fix JSON-RPC serialization for id values that are falsey but valid, including 0 and "", while still mapping null to Effect’s internal notification sentinel.

  • #1900 979811a Thanks @tim-smart! - Fix AI structured output schema generation for Schema.Class and Schema.ErrorClass by resolving top-level $ref entries before passing JSON Schema to providers and default codec transformers.

  • #1908 eb7dbef Thanks @tim-smart! - Fix stream requests in Entity.toLayerQueue

  • #1907 cf50eb4 Thanks @tim-smart! - add WorkflowEngine interruptUnsafe

  • #1903 1d046fe Thanks @kitlangton! - Add Layer.suspend as a lazy constructor for dynamically choosing a layer while preserving normal layer sharing.

4.0.0-beta.42

Patch Changes

  • #1897 924e216 Thanks @IMax153! - Append concrete choice values to CLI flag help descriptions so generated help shows valid command-line inputs.

  • #1894 80e7f0c Thanks @tim-smart! - Fix MutableList.appendAll / appendAllUnsafe so empty arrays are treated as a no-op instead of leaving behind an empty internal bucket.

  • #1895 f8328bf Thanks @tim-smart! - Changed socket close handling so all close codes are treated as errors by default unless closeCodeIsError is overridden.

  • #1899 66d1c06 Thanks @gcanti! - SchemaRepresentation: support anyOf/oneOf with sibling keywords in fromJsonSchemaMultiDocument

  • #1893 bee800b Thanks @gcanti! - Number.remainder: fix incorrect results for small floats in scientific notation (e.g. 1e-7).

  • #1898 8930441 Thanks @mikearnaldi! - Rename Effect.transaction to Effect.tx and Effect.retryTransaction to Effect.txRetry, remove Effect.transactionWith / Effect.withTxState, make nested Effect.tx calls compose into the active transaction, and make the public Tx* APIs establish atomic transactions without requiring Transaction in common usage.

4.0.0-beta.41

Patch Changes

  • #1881 36f5c21 Thanks @gcanti! - Added BigDecimal.sumAll and BigDecimal.multiplyAll for feature parity with Number and BigInt, closes #1880.

  • #1869 d8ce758 Thanks @gcanti! - Schema: collapse same-type literal branches in JSON Schema output into a single enum array, closes #1868.

    Before:

    {
    "anyOf": [
    { "type": "string", "enum": ["A"] },
    { "type": "string", "enum": ["B"] }
    ]
    }

    After:

    {
    "type": "string",
    "enum": ["A", "B"]
    }
  • #1879 11aab4c Thanks @tim-smart! - Highlight active option labels in Prompt.select and Prompt.multiSelect using cyan text so selection state is visible beyond the pointer / checkbox icon.

  • #1884 3bc1efb Thanks @tim-smart! - Fail RpcClient HTTP requests when the server response contains no RPC messages instead of leaving requests pending.

  • #1875 70e724e Thanks @IMax153! - Fix AI text method toolkit typing to support generic handler toolkits, preserve toolkit union inference, and keep response part narrowing by tool name.

  • #1876 738dee7 Thanks @tim-smart! - Track ManagedRuntime fibers in a scope

  • #1886 2111963 Thanks @tim-smart! - add ClusterSchema.WithTransaction annotation

  • #1877 198a553 Thanks @tim-smart! - allow Context.Key to be covariant

4.0.0-beta.40

Patch Changes

  • #1863 f62860f Thanks @tim-smart! - fix issues with metro bundler

  • #1866 973f281 Thanks @tim-smart! - add Stream.timeoutOrElse

4.0.0-beta.39

Patch Changes

  • #1844 f91fd3d Thanks @tim-smart! - Relax HttpApiClient.urlBuilder to accept HttpApi.Any instead of requiring HttpApi.AnyWithProps. This allows use in helpers generic over HttpApi.Any while preserving inferred URL builder types.

  • #1851 edaae9d Thanks @tim-smart! - Re-export additional core runtime references from effect/References, including logger and error reporter references.

  • #1856 b47db0b Thanks @gcanti! - Fix Struct utility return types (for example pick) to preserve the previous simplified shape instead of exposing raw utility types like Pick<T, K>, closes #1855.

  • #1849 82d3c8e Thanks @tim-smart! - Fix the Queue.takeN documentation example to end the queue before showing a partial batch.

  • #1848 7c22b31 Thanks @tim-smart! - Remove Schedule.compose in favor of Schedule.both, and update schedule examples to use Schedule.both.

4.0.0-beta.38

Patch Changes

  • #1842 f4dbe5b Thanks @gcanti! - Schema: rename MakeOptions.disableValidation to disableChecks. Apply constructor defaults when disableChecks is true, closes #1841.

  • #1837 a71a607 Thanks @kitlangton! - Fix HttpApiBuilder security middleware caching so separate handler builds do not reuse the first provided middleware implementation.

  • #1840 66a0494 Thanks @tim-smart! - Rename HttpApiClient request option withResponse to responseMode and add support for responseMode: "response-only" to return the raw HttpClientResponse without decoding.

  • #1838 5ef7218 Thanks @tim-smart! - Update HttpApiClient.urlBuilder to mirror client shape, and encode params/query via endpoint schemas before building URLs.

  • #1700 472d260 Thanks @tim-smart! - add useCodecs option to HttpClientEndpoint constructors