Skip to content

Releases: gcanti/fp-ts

2.0.0-rc.7

20 Jun 14:16
Compare
Choose a tag to compare
2.0.0-rc.7 Pre-release
Pre-release

use default type parameters for constructors / lifting functions

2.0.0-rc.6

18 Jun 09:43
Compare
Choose a tag to compare
2.0.0-rc.6 Pre-release
Pre-release
OptionT renaming

1.19.0

18 Jun 08:25
Compare
Choose a tag to compare

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
    • IOEither
      • add foldIO and foldIOEither (@bwlt)
    • Record
    • Map
    • Ord
      • make Ord a contravariant functor (@gcanti)
  • Bug Fix
    • fix MonadThrow definition (@gcanti)
    • TraversableWithIndex
      • fix TraverseWithIndex2 definition (@gcanti)
      • fix TraverseWithIndex2C definition (@gcanti)
  • Deprecations
    • HKT
      • deprecate URI2HKT<n> in favour of URItoKind<n> (@gcanti)
      • deprecate Type<n> in favour of Kind<n> (@gcanti)
    • deprecate Setoid in favour of Eq (@gcanti)
    • Applicative
    • Apply
      • deprecate applyFirst, use pipeable's apFirst (@gcanti)
      • deprecate applySecond, use pipeable's apSecond (@gcanti)
    • Array
      • deprecate catOptions in favour of compact (@gcanti)
      • deprecate mapOptions in favour of filterMap (@gcanti)
      • deprecate uncurried filter in favour of curried, data-last filter (@gcanti)
      • deprecate uncurried partition in favour of curried, data-last partition (@gcanti)
      • deprecate uncurried partitionMap in favour of curried, data-last partitionMap (@gcanti)
      • deprecate fold / foldL in favour of foldLeft (@gcanti)
      • deprecate foldr in favour of foldRight (@gcanti)
      • deprecate take in favour of takeLeft (@gcanti)
      • deprecate takeEnd in favour of takeRight (@gcanti)
      • deprecate takeWhile in favour of takeLeftWhile (@gcanti)
      • deprecate span in favour of spanLeft (@gcanti)
      • deprecate drop in favour of dropLeft (@gcanti)
      • deprecate dropEnd in favour of dropRight (@gcanti)
      • deprecate dropWhile in favour of dropLeftWhile (@gcanti)
      • deprecate uncurried findIndex in favour of curried, data-last findIndex (@gcanti)
      • deprecate uncurried findFirst in favour of curried, data-last findFirst (@gcanti)
      • deprecate uncurried findFirstMap in favour of curried, data-last findFirstMap (@gcanti)
      • deprecate uncurried findLast in favour of curried, data-last findLast (@gcanti)
      • deprecate uncurried findLastMap in favour of curried, data-last findLastMap (@gcanti)
      • deprecate uncurried findLastIndex in favour of curried, data-last findLastIndex (@gcanti)
      • deprecate uncurried insertAt in favour of curried, data-last insertAt (@gcanti)
      • deprecate uncurried updateAt in favour of curried, data-last updateAt (@gcanti)
      • deprecate uncurried deleteAt in favour of curried, data-last deleteAt (@gcanti)
      • deprecate uncurried modifyAt in favour of curried, data-last modifyAt (@gcanti)
      • deprecate uncurried rotate in favour of curried, data-last rotate (@gcanti)
      • deprecate uncurried chop in favour of curried, data-last chop (@gcanti)
      • deprecate split in favour of splitAt (@gcanti)
      • deprecate uncurried chunksOf in favour of curried, data-last chunksOf (@gcanti)
    • Chain
      • deprecate flatten, use pipeable's flatten (@gcanti)
    • Const
      • deprecate Const constructor in favour of make (@gcanti)
    • Contravariant
      • deprecate lift, use pipeable's contramap (@gcanti)
    • Exception module is deprecated (@gcanti)
    • Extend
      • deprecate duplicate, use pipeable's duplicate (@gcanti)
    • Foldable2v
    • Free module is deprecated (@gcanti)
    • FreeGroup module is deprecated (@gcanti)
    • function
      • deprecate Function* types, use FunctionN (@gcanti)
      • deprecate Kleisli type (@gcanti)
      • deprecate Cokleisli type (@gcanti)
      • deprecate concat function, use Array's getSemigroup (@gcanti)
      • deprecate compose function in favour of flow (@gcanti)
      • deprecate pipe function in favour of flow (@gcanti)
      • deprecate curried function (@gcanti)
      • deprecate curry function (@gcanti)
      • deprecate toString function, use Show 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)
    • Functor
    • Validation
      • deprecate Validation module in favour of Either's:
    • Either
      • deprecate getCompactable, getFilterable in favour of getWitherable (@gcanti)
    • IOEither
      • deprecate right in favour of rightIO (@gcanti)
      • deprecate left in favour of leftIO (@gcanti)
      • deprecate fromLeft in favour of left2v (@gcanti)
      • add right2v (@gcanti)
    • IxIO module is deprecated (@gcanti)
    • IxMonad module is deprecated (@gcanti)
    • Map
      • deprecate insert in favour of insertAt (@gcanti)
      • deprecate remove in favour of deleteAt (@gcanti)
    • MonadThrow
    • Monoid
      • deprecate getArrayMonoid in favour of Array's getMonoid (@gcanti)
    • Monoidal module is deprecated (@gcanti)
    • NonEmptyArray
      • deprecate uncurried groupBy in favour of curried, data-last groupBy (@gcanti)
      • deprecate findFirst in favour of Array's findFirst (@gcanti)
      • deprecate findLast in favour of Array's findLast (@gcanti)
      • deprecate findIndex in favour of Array's findIndex (@gcanti)
      • deprecate findLastIndex in favour of Array's findLastIndex (@gcanti)
      • deprecate uncurried insertAt in favour of curried, data-last insertAt (@gcanti)
      • deprecate uncurried updateAt in favour of curried, data-last updateAt (@gcanti)
      • deprecate uncurried modifyAt in favour of curried, data-last modifyAt (@gcanti)
      • deprecate uncurried filter in favour of curried, data-last filter (@gcanti)
      • deprecate uncurried filterWithIndex in favour of curried, data-last filterWithIndex (@gcanti)
    • Ord
      • deprecate lessThan in favour of lt (@gcanti)
      • deprecate greaterThan in favour of gt (@gcanti)
      • deprecate lessThanOrEq in favour of leq (@gcanti)
      • deprecate greaterThanOrEq in favour of geq (@gcanti)
      • swap contramap arguments (@gcanti)
    • Pair module is deprecated (@gcanti)
    • Profunctor
    • ReaderTaskEither
      • deprecate right in favour of rightTask (@gcanti)
      • deprecate left in favour of leftTask (@gcanti)
      • deprecate fromReader in favour of rightReader (@gcanti)
      • deprecate fromIO in favour of rightIO (@gcanti)
      • deprecate fromLeft in favour of left2v (@gcanti)
      • add right2v (@gcanti)
    • Record
      • deprecate uncurried collect in favour of curried, data-last collect (@gcanti)
      • deprecate insert in favour of insertAt (@gcanti)
      • deprecate remove in favour of deleteAt (@gcanti)
      • deprecate uncurried pop in favour of curried, data-last pop (@gcanti)
      • deprecate mapWithKey in favour of mapWithIndex (@gcanti)
      • deprecate reduceWithKey in favour of reduceWithIndex (@gcanti)
      • deprecate foldMapWithKey in favour of foldMapWithIndex (@gcanti)
      • deprecate `foldrWithKe...
Read more

2.0.0-rc.5

17 Jun 08:26
Compare
Choose a tag to compare
2.0.0-rc.5 Pre-release
Pre-release
fix MonadTask definition

2.0.0-rc.4

08 Jun 10:38
Compare
Choose a tag to compare
2.0.0-rc.4 Pre-release
Pre-release
curry leftOrBoth, rightOrBoth

2.0.0-rc.3

06 Jun 12:26
Compare
Choose a tag to compare
2.0.0-rc.3 Pre-release
Pre-release
add isNonEmpty

2.0.0-rc.2

31 May 15:39
Compare
Choose a tag to compare
2.0.0-rc.2 Pre-release
Pre-release
add of functions when missing

2.0.0-rc.1

21 May 15:41
Compare
Choose a tag to compare
2.0.0-rc.1 Pre-release
Pre-release
remove fluent module

1.18.2

21 May 15:01
Compare
Choose a tag to compare
  • Polish
    • fix NonEmptyArray definition (@gcanti)
  • Deprecation
    • deprecate NonEmptyArray.make in favour of cons (@gcanti)

1.18.1

15 May 10:03
Compare
Choose a tag to compare
  • Bug Fix