Releases: facile-it/fortepiano
Releases · facile-it/fortepiano
0.1.9
0.1.8
Added
- Complete the list of
Http
errors.
Security
- Fix CVE-2022-46175.
- Fix CVE-2022-25881.
- Fix CVE-2023-26136.
0.1.7
Added
- Add infix to string module (@davidecaruso, @angeloLed, @Negator1989, @yodosan).
0.1.6
Added
- Add
collectWithIndex
function toReadonlyRecord
module.
0.1.5
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
Security
- Fix CVE-2022-33987.
0.1.3
Added
-
Add
AggregateError
inspired from TC39. -
Add
decode
method toType
module to help wrappingio-ts
Errors
into anError
subclass. -
Add unit tests for the
set
function of theRedis
module. -
Add
Has
module and enhanceReaderTaskEither
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 withStruct
. - Rename
GeneratorL
module toYield
. - Use
cause
property to record wrapped errors (inspired by TC39).
Deprecated
- Deprecate
struct
(useStruct
instead). - Deprecate
GeneratorL
module (useYield
instead).
Fixed
- Decode from Json and then from the given codec in the
get
function of theRedis
module.
0.1.2
0.1.1
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.