Releases: emmanueltouzery/prelude-ts
Releases · emmanueltouzery/prelude-ts
v0.8.0
0.8.0 breaks API compatibility but mostly for Future
and if you used lifting. The rest stays the same except for really minor changes.
With 0.8.0, prelude.ts now requires Typescript 3.0.
Future
- add 'do notation' to Future, thanks @RPallas92
- Futures: no more laziness, thanks @qm3ster
- Futures: it was wrong to create new Futures in onFailure, onComplete and onSuccess. Return 'this' rather, now.
- drop Future.orElse, introduce Future.recoverWith
- Future: modify ofCallbackApi to take the same parameters as 'new Promise', and rename it to 'ofPromiseCtor'.
- add Future.ofCallback (thanks @qm3ster for the suggestion)
- add new option for Future.traverse: maxConcurrent
Everything else
- add HashMap & HashSet .forEach()
- some apidoc improvements
- fix #15 [api change] Option.getOrThrow() should take Error as argument -- thanks @bwbuchanan
- fix #12: [api change] move FunctionX.liftOption to Option.lift, FunctionX.liftNullable to Option.liftNullable, FunctionX.liftEither to Either.lift. Thanks @qm3ster for the tip for the implementation. This requires TS3.0
- upgrade to funkia/list 2.0.16 and have the Vector using Funkia list again as a backend (we already had
list
for the backend of Vector in the past but had to revert it due to bugs inlist
in 0.7.10). - Add fuzzer to Seq to try to find possible bugs
- add IMap.toJsMap & ISet.toJsSet.
v0.7.13
- fix bug #17 -- Vector.appendAll() could crash in certain circumstances (depending on the length of the vector and the length of the iterable you would add) -- thanks @bwbuchanan for the report!
v0.7.12
- fixes #14 Vector.map on empty vector (thanks to @bwbuchanan for reporting)
v0.7.11
- fixes #13 -- support findAny on an empty HashMap (thanks to @bwbuchanan for reporting)
v0.7.10
v0.7.9
- fix calling
containsKey
on an emptyHashMap
(thanks to @antoine-wdg-rmz)
v0.7.8
fix another brown paper bag Future.mapFailure bug
v0.7.7
- Drop the internal
Vector
implementation, instead add a dependency to https://github.com/funkia/list which has a high-performance implementation. Especially append & prepend in loop should be much faster now - Optimize LinkedList.partition
- Future.mapFailure was broken, fix it.
v0.7.6
- add Either.filter
- optimize Option.sequence & Either.sequence
- add Option.traverse & Either.traverse
- add support for Futures (Promise wrapper)
- take advantage of conditional types for a more precise type for partition, see http://emmanueltouzery.github.io/blog/posts/2018-04-07-prelude-type-guards.html
With this release, prelude.ts now requires typescript 2.8.3 or newer (or plain javascript of course).
v0.7.5
- fixes #5: add
Option.try_
,Option.tryNullable
,Either.try_
thanks @davinkevin for the useful feedback & suggestions - add
Option.mapNullable
for a more handy workflow when working with code usingnull
to represent failure - add
Seq.scanLeft
andSeq.scanRight
- bugfix:
LinkedList.of()
andStream.of()
(without parameters) would return a list with a single item,undefined
. That call was impossible in typescript (wouldn't compile) but it was possible in javascript. Now it returns an empty list as you would expect, while retaining the intended feature, that if there are parameters, the compiler knows we're dealing with a non-empty list (thanks to typescript overloads).