Skip to content

Effect

Version 4.0.0-beta.6

Patch Changes

  • #1338 3247da2 Thanks @Leka74! - Add showOperationId to HttpApiScalar.ScalarConfig.

  • #1326 f205705 Thanks @gcanti! - Schema: add BigDecimal schema with comparison checks (isGreaterThanBigDecimal, isGreaterThanOrEqualToBigDecimal, isLessThanBigDecimal, isLessThanOrEqualToBigDecimal, isBetweenBigDecimal).

  • #1328 f35022c Thanks @gcanti! - Schema: add DateTimeZoned, TimeZoneOffset, TimeZoneNamed, and TimeZone schemas.

  • #1325 8622721 Thanks @KhraksMamtsov! - Make Data.Class, Data.TaggedClass, and Cause.YieldableError pipeable.

  • #1323 fc660ab Thanks @KhraksMamtsov! - Port Pipeable.Class from v3.

    class MyClass extends Pipeable.Class() {
    constructor(public a: number) {
    super();
    }
    methodA() {
    return this.a;
    }
    }
    console.log(new MyClass(2).pipe((x) => x.methodA())); // 2
    class A {
    constructor(public a: number) {}
    methodA() {
    return this.a;
    }
    }
    class B extends Pipeable.Class(A) {
    constructor(private b: string) {
    super(b.length);
    }
    methodB() {
    return [this.b, this.methodA()];
    }
    }
    console.log(new B("pipe").pipe((x) => x.methodB())); // ['pipe', 4]
  • #1337 f37dc33 Thanks @IMax153! - Encoding: consolidate effect/encoding sub-modules (Base64, Base64Url, Hex, EncodingError) into a top-level Encoding module. Functions are now prefixed: encodeBase64, decodeBase64, encodeHex, decodeHex, etc. The effect/encoding sub-path export is removed.

  • #1351 3662f32 Thanks @tim-smart! - add Schema.HashSet for decoding and encoding HashSet values.

  • #1336 a7d436f Thanks @mikearnaldi! - Extract Semaphore and Latch into their own modules.

    Semaphore.make / Semaphore.makeUnsafe replace Effect.makeSemaphore / Effect.makeSemaphoreUnsafe. Latch.make / Latch.makeUnsafe replace Effect.makeLatch / Effect.makeLatchUnsafe.

    Merge PartitionedSemaphore into Semaphore as Semaphore.Partitioned, Semaphore.makePartitioned, Semaphore.makePartitionedUnsafe.

  • #1345 6856a41 Thanks @tim-smart! - allocate less effects when reading a file

  • #1350 8c417d0 Thanks @tim-smart! - Add “Previously Known As” JSDoc migration notes for the Semaphore and Latch APIs extracted from Effect.

  • #1355 5419570 Thanks @tim-smart! - ensure non-middleware http errors are correctly handled

  • #1352 449c5ed Thanks @tim-smart! - Add Schema.HashMap for decoding and encoding HashMap values.

  • #1347 4b5ec12 Thanks @tim-smart! - use .toJSON for default .toString implementations

  • #1329 df87937 Thanks @gcanti! - Schema: extract shared dateTimeUtcFromString transformation for DateTimeUtc and DateTimeUtcFromString.

  • #1318 5dbfca8 Thanks @gcanti! - Schema: rename $ suffix to $ prefix for type-level identifiers that conflict with built-in names (Array$$Array, Record$$Record, ReadonlyMap$$ReadonlyMap, ReadonlySet$$ReadonlySet).

  • #1356 e629497 Thanks @tim-smart! - allow passing void for request constructors

  • #1348 981c991 Thanks @tim-smart! - Fix Schedule.andThenResult to initialize the right schedule only after the left schedule completes. This removes the extra immediate transition tick and correctly completes when the right schedule is finite.

  • #1320 1ca2ed6 Thanks @gcanti! - Struct: add Struct.Record constructor for creating records with the given keys and value.

  • #1342 45722bd Thanks @cevr! - Schema.TaggedErrorClass, Schema.Class, and Schema.ErrorClass constructors now allow omitting the props argument when all fields have constructor defaults (e.g. new MyError() instead of new MyError({})).

  • #1322 eb2a85e Thanks @tim-smart! - Add a requireServicesAt option to PersistedCache.make so lookup-service requirements can be configured like Cache.