🦋 Fantasy Land compliant (monadic) alternative to Promises
:warning: Breaking changes
tryP
was renamed to encaseP
Future
function have been removed
encaseN
and friends have been removed
encase2
and up have been removed
encaseP2
and up have been removed
:sparkles: New features
Corrects an issue in the TypeScript typings for the chainRej
function.
:warning: Breaking changes
hook
are no longer allowed to reject. When they do, an Error is raised, and the process should be treated as corrupt.debugMode
and Future.alt
.:sparkles: New Features
alt
). As a result, the or
function is now an alias of alt
.:sparkles: New Features
stack
property, allowing users to trace
the origin of an exception across multiple ticks.Future.debugMode
: A function to turn async stack traces on or off.:rocket: Improvements
:sparkles: New Features
Future#pipe
: A method for inclusion of regular functions in a
fluent method-chain.:rocket: Improvements
:warning: Breaking changes
index.mjs.js
to
index.mjs
.Future.ap
, Future.map
,
Future.bimap
, Future.chain
, or Future.alt
on non-Fantasy Land types.
If you were using any of these functions from Fluture to treat JavaScript's
native types as Fantasy Land algebraic types, you should migrate those
call-sites to use the Ramda or Sanctuary exported dispatchers instead.Future.finally
no longer runs the cleanup Future when it is cancelled.
If you rely on this behaviour, I urge you to rewrite the relevant code with
Future.hook
(even if you don't upgrade Fluture).:sparkles: New features
Future.of
function now has an alias resolve
, which is exported
statically as well as exposed as a property on the Future constructor.:bug: Bug fixes and improvements
Fluture.finally
are gone now that the behaviour has been removed.:warning: Breaking changes
fork
.never
now use a
generic instead.hook
, the cancellation
signal is no longer sent to the disposal Future.:sparkles: New features
forkCatch
, which allows for exception recovery.This release updates sanctuary-type-classes, which contains a breaking change. This change will only affect you if you are using Future.map
on other Functors, specifically, Objects.
:warning: Breaking changes
Future.map
, inherited properties are no longer transformed.:sparkles: New features
:bug: Bug fixes