Skip to content

Releases: option-t/option-t

v42.1.0

04 Apr 15:55
9b47a08
Compare
Choose a tag to compare

New Features

  • Implement isOkAnd()/isErrAnd() for PlainResult. #1804, #2199

Internals

  • Enable ESLint's sort-keys for packages/api_tests/__tests__/exposed_path/. #2200, #2203
  • Separate code path internally in inspect for PlainResult. #2198
  • Add comments about why we don't expose operators to compose a data flow from each of root endpoints. #2197
  • Add why we need to keep simple union for Nullable, Maybe, and Undefinable.#2196

v42.0.1

04 Apr 01:32
3de7411
Compare
Choose a tag to compare

What's Changed

v41.2.1

04 Apr 01:30
12e4bac
Compare
Choose a tag to compare

Fix Regressions

v42.0.0

03 Apr 17:12
36312cd
Compare
Choose a tag to compare

Breaking Changes

Remove deprecated unwrapOrThrowErrorFromResult. #2191

unwrapOrThrowErrorFromResult in option-t/PlainResult/unwrapOrThrowError has been deprecated in v41.2.0 by the same reason with #2188.

Please use unwrapOrThrowErrorForResult provided by option-t/PlainResult/unwrapOrThrowError instead.

Unship filter from option-t/{Maybe, Nullable, Undefinable} and option-t/{Maybe, Nullable, Undefinable}/namespace. #2192

We introduced them in v41.1.0 but it was too early decision.
We unship them from option-t/{Maybe, Nullable, Undefinable} and option-t/{Maybe, Nullable, Undefinable}/namespace.

If you would like to use them, please use option-t/<TypeName>/{filter, filterAsync}.

v41.2.0

03 Apr 10:52
1406e6e
Compare
Choose a tag to compare

New Deprecations

  • Deprecate unwrapOrThrowErrorFromResult in ./PlainResult/unwrapOrThrowError. #2189

v41.1.0

03 Apr 08:11
84710be
Compare
Choose a tag to compare

New Features

  • Add more strict type restriction for type conversion APIs. #2185
  • Implement filter, filterAsync, and filterWithEnsureType for Nullable<T>, Maybe<T>, and Undefinable<T>. #2179, #2180, #2182, #2183, #2184

Documentation

  • Add jscodeshift codmod example to docs/migration/v41.md. #2171
  • Add examples to import option-t/<TypeName>/namespace. #2172
  • Add some notes to examples for option-t/*/namespace. #2174

Internals

  • Insert more assert to the test for filter for PlainOption. #2181

v41.0.0

02 Apr 06:14
6c22507
Compare
Choose a tag to compare

Breaking Changes

This version removed bunch of deprecated items.
See more details https://github.com/option-t/option-t/blob/main/docs/migration/v41.md

  • Remove deprecated NotNullAndUndefined/isNotNullAndUndefined in ./Maybe/Maybe. #2164
  • Remove deprecated ./<TypeName>/expect & ./<TypeName>/unwrap. #2165
  • Remove deprecated unwrapOrFrom***/unwrapOrElseFrom***/unwrapOrElseAsyncFrom***. #2167
  • Drop ./PlainResult/toOption. #2158
  • Remove deprecated APIs in ./PlainResult/transpose. #2159
  • Drop deprecated inspectOk/inspectErr/inspectBoth. #2160

Documentation

  • Remove obsoleted parts by v40 from documents. #2166
  • Follow up 6424d95: Remove comments about ./PlainResult/toOption. #2169
  • Update docs/migration/v41.md. #2170, #2163

v40.7.0

01 Apr 16:23
feaa108
Compare
Choose a tag to compare

Deprecation

Use For instead of Of preposition to types for ./PlainResult/inspect. #2161

option-t/PlainResult

  • inspectBothOfResult: Use inspectBothForResult instead.
  • inspectErrOfResult: Use inspectErrForResult instead.
  • inspectOkForResult: Use inspectOkForResult instead.

option-t/PlainResult/inspect

  • inspectBothOfResult: Use inspectBothForResult instead.
  • inspectErrOfResult: Use inspectErrForResult instead.
  • inspectOkForResult: Use inspectOkForResult instead.

Internals

  • Update TypeScript to v5.4. #2157

Documentation

  • Add docs/migration/v41.md for the next major release. #2155

v40.6.1

01 Apr 15:14
da948e5
Compare
Choose a tag to compare

Documentation

  • Add version info to @deprecated tag added recently. #2154

v40.6.0

01 Apr 10:39
1fc5090
Compare
Choose a tag to compare

New Deprecation

Use For instead of From preposition to types for unwrapOr/unwrapOrElse/unwrapOrElseAsync. #2151

It was a long standing issue since 2d77cf8....
By this change, we use From preposition only if an item is designed to type conversion. It simplifies the naming rule and improves naming consistency with mapOr, mapOrElse, or others.

NOTE: We filed #2152 to clean up this deprecation

Followings are deprecated items:

PlainOption

  • unwrapOrFromOption exported by option-t/PlainOption/unwrapOr or option-t/PlainOption.
    • Use unwrapOrForOption instead.
  • unwrapOrElseFromOption exported by option-t/PlainOption/unwrapOrElse or option-t/PlainOption.
    • Use unwrapOrElseForOption instead.
  • unwrapOrElseAsyncFromOption exported by option-t/PlainOption/unwrapOrElseAsync or option-t/PlainOption.
    • Use unwrapOrElseAsyncForOption instead.

PlainResult

  • unwrapOrFromResult exported by option-t/PlainResult/unwrapOr or option-t/PlainResult.
    • Use unwrapOrForResult instead.
  • unwrapOrElseFromResult exported by option-t/PlainResult/unwrapOrElse or option-t/PlainResult.
    • Use unwrapOrElseForResult instead.
  • unwrapOrElseAsyncFromResult exported by option-t/PlainResult/unwrapOrElseAsync or option-t/PlainResult.
    • Use unwrapOrElseAsyncForResult instead.

Maybe

  • unwrapOrFromMaybe exported by option-t/Maybe/unwrapOr or option-t/Maybe.
    • Use unwrapOrForMaybe instead.
  • unwrapOrElseFromMaybe exported by option-t/Maybe/unwrapOrElse or option-t/Maybe.
    • Use unwrapOrElseForMaybe instead.
  • unwrapOrElseAsyncFromMaybe exported by option-t/Maybe/unwrapOrElseAsync or option-t/Maybe.
    • Use unwrapOrElseAsyncForMaybe instead.

Nullable

  • unwrapOrFromNullable exported by option-t/Nullable/unwrapOror option-t/Nullable.
    • Use unwrapOrForNullable instead.
  • unwrapOrElseFromNullable exported by option-t/Nullable/unwrapOrElseor option-t/Nullable.
    • Use unwrapOrElseForNullable instead.
  • unwrapOrElseAsyncFromNullable exported by option-t/Nullable/unwrapOrElseAsyncor option-t/Nullable.
    • Use unwrapOrElseAsyncForNullable instead.

Undefinable

  • unwrapOrFromUndefinable exported by option-t/Undefinable/unwrapOror option-t/Undefinable.
    • Use unwrapOrForUndefinable instead.
  • unwrapOrElseFromUndefinable exported by option-t/Undefinable/unwrapOrElseor option-t/Undefinable.
    • Use unwrapOrElseForUndefinable instead.
  • unwrapOrElseAsyncFromUndefinable exported by option-t/Undefinable/unwrapOrElseAsyncor option-t/Undefinable.
    • Use unwrapOrElseAsyncForUndefinable instead.