Releases: gcanti/fp-ts
Releases · gcanti/fp-ts
2.0.0-rc.7
use default type parameters for constructors / lifting functions
2.0.0-rc.6
OptionT renaming
1.19.0
The goal of this release is to make the migration to v2 easier.
Since in v2 data types are no more implemented with classes, chainable APIs will be deprecated (in v1.20.0).
As an alternative, a pipe
function is provided, along with suitable data-last top level functions (one for each deprecated method).
Example
Before
import * as O from 'fp-ts/lib/Option'
O.some(1)
.map(n => n * 2)
.chain(n => n === 0 ? O.none : O.some(1 / n))
.filter(n => n > 1)
.foldL(() => 'ko', () => 'ok')
After
import * as O from 'fp-ts/lib/Option'
import { pipe } from 'fp-ts/lib/pipeable'
pipe(
O.some(1),
O.map(n => n * 2),
O.chain(n === 0 ? O.none : O.some(1 / n)),
O.filter(n => n > 1),
O.fold(() => 'ko', () => 'ok')
)
Custom tslint rule
In order to make easier to spot all the occurrences of chainable APIs without depending on @deprecated
, which would force you to migrate in one shot, a custom tslint rule is provided (@obsolete
).
Configuration
Add the following lines to your tslint.json
to turn the @obsolete
rule on:
{
+ "rulesDirectory": ["./node_modules/fp-ts/rules"],
"rules": {
+ "obsolete": true
}
}
- New Feature
- add
Eq
module (@gcanti) - backport top level data-last functions from v2 (@gcanti)
- backport
pipeable
module form v2 (@gcanti) - backport
pipe
function form v2 (@gcanti) - backport
flow
function form v2 (@gcanti) Array
- add
isNonEmpty
(@Stouffi)
- add
IOEither
- add
foldIO
andfoldIOEither
(@bwlt)
- add
Record
Map
Ord
- make
Ord
a contravariant functor (@gcanti)
- make
- add
- Bug Fix
- Deprecations
HKT
- deprecate
Setoid
in favour ofEq
(@gcanti) Applicative
Apply
Array
- deprecate
catOptions
in favour ofcompact
(@gcanti) - deprecate
mapOptions
in favour offilterMap
(@gcanti) - deprecate uncurried
filter
in favour of curried, data-lastfilter
(@gcanti) - deprecate uncurried
partition
in favour of curried, data-lastpartition
(@gcanti) - deprecate uncurried
partitionMap
in favour of curried, data-lastpartitionMap
(@gcanti) - deprecate
fold
/foldL
in favour offoldLeft
(@gcanti) - deprecate
foldr
in favour offoldRight
(@gcanti) - deprecate
take
in favour oftakeLeft
(@gcanti) - deprecate
takeEnd
in favour oftakeRight
(@gcanti) - deprecate
takeWhile
in favour oftakeLeftWhile
(@gcanti) - deprecate
span
in favour ofspanLeft
(@gcanti) - deprecate
drop
in favour ofdropLeft
(@gcanti) - deprecate
dropEnd
in favour ofdropRight
(@gcanti) - deprecate
dropWhile
in favour ofdropLeftWhile
(@gcanti) - deprecate uncurried
findIndex
in favour of curried, data-lastfindIndex
(@gcanti) - deprecate uncurried
findFirst
in favour of curried, data-lastfindFirst
(@gcanti) - deprecate uncurried
findFirstMap
in favour of curried, data-lastfindFirstMap
(@gcanti) - deprecate uncurried
findLast
in favour of curried, data-lastfindLast
(@gcanti) - deprecate uncurried
findLastMap
in favour of curried, data-lastfindLastMap
(@gcanti) - deprecate uncurried
findLastIndex
in favour of curried, data-lastfindLastIndex
(@gcanti) - deprecate uncurried
insertAt
in favour of curried, data-lastinsertAt
(@gcanti) - deprecate uncurried
updateAt
in favour of curried, data-lastupdateAt
(@gcanti) - deprecate uncurried
deleteAt
in favour of curried, data-lastdeleteAt
(@gcanti) - deprecate uncurried
modifyAt
in favour of curried, data-lastmodifyAt
(@gcanti) - deprecate uncurried
rotate
in favour of curried, data-lastrotate
(@gcanti) - deprecate uncurried
chop
in favour of curried, data-lastchop
(@gcanti) - deprecate
split
in favour ofsplitAt
(@gcanti) - deprecate uncurried
chunksOf
in favour of curried, data-lastchunksOf
(@gcanti)
- deprecate
Chain
- deprecate
flatten
, usepipeable
'sflatten
(@gcanti)
- deprecate
Const
- deprecate
Const
constructor in favour ofmake
(@gcanti)
- deprecate
Contravariant
- deprecate
lift
, usepipeable
'scontramap
(@gcanti)
- deprecate
Exception
module is deprecated (@gcanti)Extend
- deprecate
duplicate
, usepipeable
'sduplicate
(@gcanti)
- deprecate
Foldable2v
Free
module is deprecated (@gcanti)FreeGroup
module is deprecated (@gcanti)function
- deprecate
Function*
types, useFunctionN
(@gcanti) - deprecate
Kleisli
type (@gcanti) - deprecate
Cokleisli
type (@gcanti) - deprecate
concat
function, useArray
'sgetSemigroup
(@gcanti) - deprecate
compose
function in favour offlow
(@gcanti) - deprecate
pipe
function in favour offlow
(@gcanti) - deprecate
curried
function (@gcanti) - deprecate
curry
function (@gcanti) - deprecate
toString
function, useShow
type class (@gcanti) - deprecate
apply
function (@gcanti) - deprecate
applyFlipped
function (@gcanti) - deprecate
constIdentity
function (@gcanti) - deprecate
phantom
(@gcanti) - deprecate
or
(@gcanti) - deprecate
and
(@gcanti) - deprecate
on
(@gcanti) - deprecate
BinaryOperator
(@gcanti)
- deprecate
Functor
Validation
Either
- deprecate
getCompactable
,getFilterable
in favour ofgetWitherable
(@gcanti)
- deprecate
IOEither
IxIO
module is deprecated (@gcanti)IxMonad
module is deprecated (@gcanti)Map
MonadThrow
Monoid
- deprecate
getArrayMonoid
in favour ofArray
'sgetMonoid
(@gcanti)
- deprecate
Monoidal
module is deprecated (@gcanti)NonEmptyArray
- deprecate uncurried
groupBy
in favour of curried, data-lastgroupBy
(@gcanti) - deprecate
findFirst
in favour ofArray
'sfindFirst
(@gcanti) - deprecate
findLast
in favour ofArray
'sfindLast
(@gcanti) - deprecate
findIndex
in favour ofArray
'sfindIndex
(@gcanti) - deprecate
findLastIndex
in favour ofArray
'sfindLastIndex
(@gcanti) - deprecate uncurried
insertAt
in favour of curried, data-lastinsertAt
(@gcanti) - deprecate uncurried
updateAt
in favour of curried, data-lastupdateAt
(@gcanti) - deprecate uncurried
modifyAt
in favour of curried, data-lastmodifyAt
(@gcanti) - deprecate uncurried
filter
in favour of curried, data-lastfilter
(@gcanti) - deprecate uncurried
filterWithIndex
in favour of curried, data-lastfilterWithIndex
(@gcanti)
- deprecate uncurried
Ord
Pair
module is deprecated (@gcanti)Profunctor
ReaderTaskEither
Record
- deprecate uncurried
collect
in favour of curried, data-lastcollect
(@gcanti) - deprecate
insert
in favour ofinsertAt
(@gcanti) - deprecate
remove
in favour ofdeleteAt
(@gcanti) - deprecate uncurried
pop
in favour of curried, data-lastpop
(@gcanti) - deprecate
mapWithKey
in favour ofmapWithIndex
(@gcanti) - deprecate
reduceWithKey
in favour ofreduceWithIndex
(@gcanti) - deprecate
foldMapWithKey
in favour offoldMapWithIndex
(@gcanti) - deprecate `foldrWithKe...
- deprecate uncurried
2.0.0-rc.5
fix MonadTask definition
2.0.0-rc.4
curry leftOrBoth, rightOrBoth
2.0.0-rc.3
add isNonEmpty
2.0.0-rc.2
add of functions when missing
2.0.0-rc.1
remove fluent module