Releases: seasonedcc/composable-functions
v1.6.0 - 'collect' and other improvements 🫴
Updates
We just introduced a new collect
combinator. Check it out in the README, you'll love it!
We've also improved our README - thanks Landon! -, fixed some type-level bugs and made the output type of a composition look better:
// From this
const result = merge(a, b)
// ^? DomainFunction<{ resultA: number } & { resultB: string }>
// To this
const result = merge(a, b)
// ^? DomainFunction<{ resultA: number; resultB: string }>
What's Changed
- 🫴 Add a new
collect
combinator and warn about pitfalls withmerge
by @gustavoguichard in #66 - 💅 Add a prettify type to make the presented MergeObjects type more read… by @gustavoguichard in #65
- 🐛 Fix MergeObjs type to behave more like JS's Object.assign and add som… by @gustavoguichard in #68
- 📖 README: improvements and punctuation by @jly36963 in #63
New Contributors
Full Changelog: v1.5.1...v1.6.0
v1.5.1 - Type-level bug fixes 🐞
What's Changed
- 🐛 Fix type bug with trace function by @gustavoguichard in #59
- Type tests by @gustavoguichard in #58
- Simplify Unpack types by @gustavoguichard in #60
- Add legacy types back with deprecation messages 👴🏼 by @gustavoguichard in #61
Full Changelog: v1.5.0...v1.5.1
v1.5.0 - 'trace' and more improvements 🕵🏽
Highlights
- Allow the user to define DFs that will take no input parameters by @diogob in #52
- Zod as peer dependency by @diogob in #56
- Create a trace function that will capture the inputs and outputs of any DF and call an arbitraty function. by @diogob in #57
Other changes
- Update README to show original exception after PR #47 by @diogob in #48
- Correct return type of errorMessageFor example by @yurilaguardia in #50
- Fix bug in "errorMessagesFor" example by @yurilaguardia in #49
- doc: correct-function-name by @phifa in #53
- Update remix example for more modern techniques by @gustavoguichard in #54
New Contributors
- @yurilaguardia made their first contribution in #50
- @phifa made their first contribution in #53
Full Changelog: v1.4.0...v1.5.0
v1.4.0 - Preserve exceptions 🚨
What's Changed
- Replace npm with deno task by @diogob in #46
- Preserve original exception when domain function is handling an unknown thrown value by @diogob in #47
Possible breaking change
If you test the error results with strict equality, the additional data in the ErrorResult
will break some tests. A quick fix is to use toMatchObject
instead.
Full Changelog: v1.3.0...v1.4.0
v1.3.0 - 'first', 'fromSuccess', 'ResultError', and more 🧪
What's Changed
- First combinator by @gustavoguichard and @diogob in #43
- New primitives: fromSuccess and ResultError by @gustavoguichard and @diogob in #44
- change function type declarations by @diogob and @gustavoguichard in #45
For more information: check the updated README for ResultError
, first
, and fromSuccess
.
Full Changelog: v1.2.0...v1.3.0
v1.2.0 - 'sequence' domain functions 🚥
What's Changed
- Creates a 'sequence' function which is like a pipe function but saving results by @gustavoguichard in #33
Full Changelog: v1.1.0...v1.2.0
v1.1.0 - 'merge' domain functions! 🥘
New utility for domain function compositions
Check the merge documentation on README to learn more about it.
What's Changed
- Add merge utility to domainFunctions by @gustavoguichard in #39
Full Changelog: v1.0.2...v1.1.0
v1.0.2 - Add CommonJS back to build 😅
What's Changed
- Refactor Types by @gustavoguichard in #38
- Reintroduce CommonJS module by @diogob in #41
Full Changelog: v1.0.1...v1.0.2
v1.0.1 - Domain functions can now be used everywhere JS is running ✨
New name
We changed the name of this lib from remix-domains to domain-functions and made a few changes to ensure this package can run everywhere 🔥!
- It can be used with any JS framework! Beyond Remix, make sure you also try it in NextJS, CRA, etc.
- It can be used with any non-React framework as well: Solidjs, Vuejs, and so on.
- It can even be used on Deno now 🤯! We already tried it out in Fresh and it feels goooood! 🤤
To use it with Deno start with:
import { makeDomainFunction } from "https://deno.land/x/domain_functions/mod.ts";
Send a PR
If you happen to play with domain-functions in your non-remix framework, we'd be happy to accept a PR to our ./examples
folder. 🫱🏾🫲🏽
What's Changed
- Remove most references to Remix and create a remix folder inside exam… by @gustavoguichard in #35
- Use GitHub repo as homepage by @danielweinmann in #36
- Deno version by @diogob and @gustavoguichard in #37
Full Changelog: v0.3.2...v1.0.1