github Effect-TS/effect effect@4.0.0-beta.99

pre-release3 hours ago

Patch Changes

  • #6397 8ce4795 Thanks @IMax153! - Add a scoped CliConfig service for customizing the built-in global flags used by CLI command runners.

    For example, provide an explicit list that omits GlobalFlag.LogLevel to remove the built-in --log-level flag:

    import { Effect } from "effect";
    import { CliConfig, Command, GlobalFlag } from "effect/unstable/cli";
    
    const program = Command.run(command, { version: "1.0.0" }).pipe(
      Effect.provide(
        CliConfig.layer({
          builtIns: [GlobalFlag.Help, GlobalFlag.Version, GlobalFlag.Completions],
        }),
      ),
    );
  • #6409 80b539f Thanks @IMax153! - Reintroduce interactive CLI wizard mode through the --wizard flag and Command.wizard.

  • #6394 88a54cc Thanks @lloydrichards! - add a radius option to Graph search configuration, allowing dfs, bfs, and dfsPostOrder traversals to limit returned nodes by edge distance from the configured start nodes. Traversals can also use direction: "undirected" to follow edges in either direction.

  • #6457 e6e6dba Thanks @fubhy! - Improve Graph.dijkstra and Graph.astar priority queue performance.

  • #6468 bfb203e Thanks @gcanti! - Distribute HttpApiBuilder handler requirements per service so request middleware layers can provide them, closes #6464.

  • #6389 2e9a34a Thanks @IMax153! - Report an error when a CLI flag, including --completions, is provided without its required value.

  • #6359 55d4eb3 Thanks @evermake! - - Fix Command.withSubcommands collapsing the inferred requirements type to never when given more than one subcommand

    • Export a Command.Services utility type to extract the required services from a Command
  • #6462 bddb010 Thanks @fubhy! - Fix immutable Graph equality and hashing to include future node and edge identifier allocation.

  • #6425 a328835 Thanks @fubhy! - Fix Graph.bellmanFord to detect reachable negative cycles when the source and target are the same node.

  • #6454 5560d05 Thanks @fubhy! - Fix standalone data-last Graph.getNode and Graph.getEdge inference.

  • #6418 8f6e3ad Thanks @fubhy! - Fix Graph.mapEdges and Graph.filterMapEdges to preserve Graph.Edge instances when transforming edge data.

  • #6426 46997fa Thanks @fubhy! - Reject NaN and -Infinity edge weights in Graph shortest-path algorithms.

  • #6461 9e6e12d Thanks @fubhy! - Fix mutable Graph equality and hashing to use reference identity while preserving structural semantics for immutable graphs.

  • #6456 3394b93 Thanks @fubhy! - Fix topological walkers silently completing with an incomplete order when a mutable graph becomes cyclic after walker creation.

  • #6460 febeabc Thanks @fubhy! - Restrict Graph.topo to directed graphs at the type level while retaining runtime validation for unsafe undirected inputs.

  • #6455 54161c9 Thanks @fubhy! - Fix Graph.Walker to create a fresh iterable for each direct iteration.

  • #6414 385f7a4 Thanks @fubhy! - Fix Graph.toGraphViz to quote DOT graph names and escape labels as literal text.

  • #6438 7eea4d0 Thanks @tim-smart! - Fix one-shot iterable handling in Array.rotate, Iterable.cartesian, and in-memory RunnerStorage acquisition

  • #6371 7543afe Thanks @polRk! - Tool: preserve the tool kind when cloning provider-defined and dynamic tools.

    Tool.addDependency, setParameters, setSuccess, setFailure, annotate, and annotateMerge previously rebuilt the tool as a user-defined tool, which flipped Tool.isProviderDefined to false, corrupted the provider id (e.g. anthropic.memory_20250818), and crashed Tool.getStrictMode. These operations now clone the tool while preserving its prototype, id, and kind. Provider-defined tools also now carry an empty annotations context so Tool.getStrictMode/annotate work on them. Closes #2615.

  • #6421 44b9cf3 Thanks @fubhy! - Preserve null edge data in Graph.floydWarshall costs.

  • #6438 7eea4d0 Thanks @tim-smart! - ensure one-shot iterables work with Fiber apis

  • #6420 0a8aa6a Thanks @fubhy! - Fix Graph.isAcyclic to detect cycles formed by parallel undirected edges.

  • #6417 c8d9fcf Thanks @fubhy! - Reject Graph mutation operations on mutable handles after Graph.endMutation finalizes them.

  • #6423 9ca7f9a Thanks @fubhy! - Fix Graph.isGraph narrowing for mutable and undirected graphs.

  • #6459 e7aca89 Thanks @fubhy! - Reject asynchronous Graph mutation callbacks and finalize scoped mutable handles when callbacks fail.

  • #6458 55d7560 Thanks @fubhy! - Fix undirected Graph equality and hashing to ignore stored edge endpoint orientation.

  • #6415 f809189 Thanks @fubhy! - Fix Graph.Walker iteration for receiver-sensitive iterables.

  • #6394 88a54cc Thanks @lloydrichards! - added graph set operations for combining and comparing graphs

    • Graph.make - creates a graph constructor for a dynamically selected graph kind
    • Graph.compose - composition of two graphs, merging nodes by identity
    • Graph.intersection - intersection of two graphs, keeping only common nodes and edges
    • Graph.difference - difference of two graphs, removing edges present in the second graph
    • Graph.symmetricDifference - symmetric difference of two graphs, keeping edges present in exactly one graph
  • #6395 0ebdbe7 Thanks @Chaoran-Huang! - Fix multipart parser limit violations being silently swallowed

  • #6419 7517d09 Thanks @fubhy! - Make the public Graph interfaces opaque by hiding internal mutable storage fields from their TypeScript surface.

  • #6390 212493b Thanks @alvarosevilla95! - Fix Redis script evaluation so transient SCRIPT LOAD failures are retried instead of being cached indefinitely.

  • #6394 88a54cc Thanks @lloydrichards! - add advanced graph set operations for deriving related graph structures

    • Graph.complement - complement over the existing node set, adding missing edges between distinct nodes
    • Graph.neighborhood - induced subgraph containing nodes within a radius of a node
    • Graph.sum - disjoint union of two graphs without merging equal node data
  • #6430 80ea8cb Thanks @fubhy! - Fix Graph BFS, topological sort, and DFS postorder iterators to skip nodes removed from a MutableGraph without recursive self-calls.

  • #6465 8df19f4 Thanks @gcanti! - Fix isInt32 to apply custom annotations only to its filter group.

Don't miss a new effect release

NewReleases is sending notifications on new releases.