github Effect-TS/effect @effect/platform-bun@0.32.0

latest releases: @effect/vitest@0.10.5, @effect/sql-sqlite-wasm@0.13.0, @effect/sql-sqlite-react-native@0.16.0...
7 months ago

Minor Changes

  • #2119 2b62548 Thanks @tim-smart! - add Scope to Http client

    This change adds a scope to the default http client, ensuring connections are
    cleaned up if you abort the request at any point.

    Some response helpers have been added to reduce the noise.

    import * as Http from "@effect/platform/HttpClient";
    import { Effect } from "effect";
    
    // instead of
    Http.request.get("/").pipe(
      Http.client.fetchOk(),
      Effect.flatMap((_) => _.json),
      Effect.scoped,
    );
    
    // you can do
    Http.request.get("/").pipe(Http.client.fetchOk(), Http.response.json);
    
    // other helpers include
    Http.response.text;
    Http.response.stream;
    Http.response.arrayBuffer;
    Http.response.urlParamsBody;
    Http.response.formData;
    Http.response.schema * Effect;

Patch Changes

  • Updated dependencies [2b62548]:
    • @effect/platform@0.45.0
    • @effect/platform-node-shared@0.1.8

Don't miss a new effect release

NewReleases is sending notifications on new releases.