Skip to content

Releases: cevr/ftld

ftld@5.0.4

08 May 22:48
a51cf23
Compare
Choose a tag to compare

Patch Changes

ftld@5.0.3

08 May 22:31
126b989
Compare
Choose a tag to compare

Patch Changes

  • 28ed0a9: fix generics in static creators

ftld@5.0.2

28 Apr 16:46
cf576cb
Compare
Choose a tag to compare

Patch Changes

ftld@5.0.1

28 Apr 16:28
0c0f369
Compare
Choose a tag to compare

Patch Changes

  • ff7bd76: improve inner Do workings

ftld@5.0.0

28 Apr 16:27
Compare
Choose a tag to compare

Major Changes

  • f62b683: Simplify Do, remove promise support.

    Do no longer needs the unwrapper function.

    // before
    const x = Do(function*($) {
      const a = yield* $(Result.Ok(1))
      const b = yield* $(Option.Some(2))
      return a + b;
    });
    
    // after
    const x = Do(function*() {
      const a = yield* Result.Ok(1);
      const b = yield* Option.Some(2);
      return a + b;
    });
    

    A side effect of this is that unwrapping promises is no longer supported. This is a breaking change, but it is for the better.

    Promises are not a good fit for the Do notation, and it is better to use async/await instead. Promises also have no way of tracking the Error type, which is a big limitation.

ftld@4.0.0

21 Apr 21:37
d341ee7
Compare
Choose a tag to compare

Major Changes

  • 88b7726: Change Result/Task generic order, remove UnknownError class, simplify

    Now instead of having Result<Error, Value>, it will be Result<Value, Error>.

    This makes the happy path less verbose.

    // Before
    const x: Result<unknown, number> = Result.from(() => 1);
    
    // After
    const x: Result<number, unknown> = Result.from(() => 1);
    // which now can be simplified to
    const x: Result<number> = Result.from(() => 1);

ftld@3.2.0

15 Apr 02:52
855f3e9
Compare
Choose a tag to compare

Minor Changes

  • 6ee87d6: fix unintended internal export

ftld@3.1.0

14 Apr 18:16
92ab539
Compare
Choose a tag to compare

Minor Changes

ftld@3.0.0

12 Apr 01:04
3f600c3
Compare
Choose a tag to compare

Major Changes

  • d325357: remove records as collections in option/result/task types

    Supporting records greatly complicated the code and increased the bundle size for relatively little gain. It's not common to use records as iterable collections in JS, and the ergonomics of using records as collections in the API were not great. This change removes the ability to use records as collections in option/result/task types.

    This is a breaking change for users who were using records as collections in option/result/task types.

ftld@2.0.1

04 Apr 13:58
a053f6c
Compare
Choose a tag to compare

Patch Changes