Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
cevr committed Apr 28, 2024
2 parents 3e195dd + 67065c9 commit 761f897
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
27 changes: 0 additions & 27 deletions .changeset/nine-terms-agree.md

This file was deleted.

28 changes: 28 additions & 0 deletions lib/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# ftld

## 5.0.0

### 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.

## 4.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ftld",
"private": false,
"version": "4.0.0",
"version": "5.0.0",
"description": "a small, focused, library that provides a set of functional primitives for building robust and resilient applications in TypeScript",
"license": "MIT",
"author": "Cristian Ramos <hello@cvr.im>",
Expand Down

0 comments on commit 761f897

Please sign in to comment.