Skip to content

Releases: facile-it/fortepiano

0.1.9

14 May 20:30
Compare
Choose a tag to compare

0.1.8

10 Jul 04:52
c0aa5e2
Compare
Choose a tag to compare

Added

  • Complete the list of Http errors.

Security

0.1.7

02 Jan 12:58
Compare
Choose a tag to compare

Added

0.1.6

30 Sep 07:17
Compare
Choose a tag to compare

Added

  • Add collectWithIndex function to ReadonlyRecord module.

0.1.5

22 Sep 14:21
Compare
Choose a tag to compare

Added

  • Add prefix to string module.
  • Add suffix to string module.

Changed

  • Changed overloads of $mock.union function.

Fixed

  • Update yarn.lock in order to fix "typescript (18.x)" and "jest (18.x)" jobs in CI.

0.1.4

24 Jun 10:18
488c7fd
Compare
Choose a tag to compare

Security

0.1.3

31 May 09:11
Compare
Choose a tag to compare

Added

  • Add AggregateError inspired from TC39.

  • Add decode method to Type module to help wrapping io-ts Errors into an Error subclass.

  • Add unit tests for the set function of the Redis module.

  • Add Has module and enhance ReaderTaskEither for smart dependencies management (inspired by Effect-TS):

    // Foo.ts
    import { TaskEither } from 'fp-ts/TaskEither'
    import { $has, $readerTaskEither } from 'fortepiano'
    
    export interface Foo {
      bar(a: number): TaskEither<Error, string>
    }
    
    export const TagFoo = $has.tag<Foo>()
    
    export const $foo = {
      bar: $readerTaskEither.derivesTaskEither(TagFoo, 'bar'),
    }
    // Bar.ts
    import { IOEither } from 'fp-ts/IOEither'
    import { $has, $readerTaskEither } from 'fortepiano'
    
    export interface Bar {
      (a: string): IOEither<Error, boolean>
    }
    
    export const TagBar = $has.tag<Bar>()
    
    export const bar = $readerTaskEither.deriveIOEither(TagBar)
    // index.ts
    import { $has } from 'fortepiano'
    import { ioEither, readerTaskEither, taskEither } from 'fp-ts'
    import { pipe } from 'fp-ts/function'
    import { TagBar, bar } from './Bar'
    import { $foo, TagFoo } from './Foo'
    
    // const a: ReaderTaskEither<Has<Foo> & Has<Bar>, Error, boolean>
    const a = pipe($foo.bar(42), readerTaskEither.chainW(bar))
    
    // const b: TaskEither<Error, boolean>
    const b = a(
      // Let's mock our dependencies.
      pipe(
        $has.singleton(TagFoo, { bar: () => taskEither.of('foobar') }),
        $has.upsertAt(TagBar, () => ioEither.of(true)),
      ),
    )

Changed

  • Replace struct type with Struct.
  • Rename GeneratorL module to Yield.
  • Use cause property to record wrapped errors (inspired by TC39).

Deprecated

  • Deprecate struct (use Struct instead).
  • Deprecate GeneratorL module (use Yield instead).

Fixed

  • Decode from Json and then from the given codec in the get function of the Redis module.

0.1.2

29 Apr 09:18
Compare
Choose a tag to compare

Added

  • Add LICENSE.md.
  • Add CONTRIBUTING.md.
  • Add CHANGELOG.md.

Changed

  • Relicense as MIT.
  • Update README.md.

Deprecated

  • Deprecate $got (use $axios instead).

0.1.1

26 Apr 14:50
809f2e3
Compare
Choose a tag to compare

Added

  • Support tree shaking via top-level imports:
    import { curry } from 'fortepiano/function'
    // ...instead of `import { curry } from 'fortepiano/lib/function'`

Deprecated

  • Discourage imports from fortepiano/lib/* as they break tree shaking.

0.1.0

20 Apr 15:56
ef348eb
Compare
Choose a tag to compare

Added

  • First public release of fortepiano.