The full, worked guide lives in the docs: Upgrade from 4.x to 5.0. The headline breaking surface, so you have it up front:
- Error combinators renamed with a
…Casessuffix (each takes an exhaustive matcher):mapErr→mapErrCases,flatMapErr→flatMapErrCases,recoverErr→recoverErrCases,tapErr→tapErrCases,flatTapErr→flatTapErrCases. match's error handler renamederr→errCases(it takes the matcher, not the error value). This one was a silent runtime break in the first betas — a leftovererr:handler that threw compiled and then threw the matcher object; the renamed key makes it an excess-property compile error.- Removed 4.x aliases:
unwrap/unwrapErr/unwrapOr/unwrapOrElse(useget/getErr/getOr/getOrElse),orElse/recover(useflatMapErrCases/recoverErrCases), andmatchTags/ theTagHandlerstype (usematch({ …, errCases: (m) => m.with(P.tag("…"), …) })). - Renamed export:
UnwrapError→GetError. getOrThrow()is now gated to a non-empty error channel; on aResult<T, never>useget().- The matcher is built-in — nothing to install alongside
unthrown. (The early v5 betas tookts-patternas a peer; the built-in matcher replaced it, keeping the same.with(…)/Pcall-site shape.) @unthrown/patternwas absorbed into core — importmatch/Pfromunthrown.- Renamed: the standalone
tag("…")pattern helper is nowP.tag("…"), alongside every other pattern constructor. The old export is removed. - New:
ensure,DoAsync, and thematch/Pre-exports.