daxle 3.1.1
daxle: ^3.1.1 copied to clipboard
A lightweight Dart utility package offering common abstractions and missing features to write safer, more expressive code.
3.1.1 - 2026-07-20 #
- BUG FIXES:
- Prevented
nullvalues insideSomeinstances by throwing anArgumentErrorifSomeis initialized withnull. - Fixed
Option.mapto acceptB? Function(T)and convertnullreturn values intoNone()(Option.fromNullable(f(value))), preventingSome(null)values.
- Prevented
3.1.0 - 2026-07-17 #
- PERFORMANCE & REFACTORING:
- Improved
TaskEitherandTaskperformance by migrating toFuture.thento avoid async/await overhead. - Optimized memory allocations and performance in AOT for
EitherandOptionby using pragma annotations and direct constructor instantiation. - Refactored
EitherandOptionto delegate combinators directly to their respective subclasses. - Inlined async transformation helpers in
TaskEitherto further reduce runtime overhead.
- Improved
- TESTS:
- Added regression tests for
TaskandTaskEitherexception handling.
- Added regression tests for
3.0.0 - 2026-07-14 #
-
BREAKING CHANGES / ARCHITECTURE REDESIGN:
- Removed
Result<T, E>entirely. UseEither<L, R>as the single abstraction for explicit success/failure. - Removed
Pipeline<T>andAsyncPipeline<T>. Most useful functionality is now handled byTaskEither<L, R>with explicit control flow. - Core primitives are now strictly single-responsibility:
Option<T>,Either<L, R>,Task<T>,TaskEither<L, R>, andUnit.
- Removed
-
NEW FEATURES:
- Added
Task<T>primitive for lazy asynchronous computations that do not model explicit failures. - Enhanced
TaskEither<L, R>with comprehensive combinators:- Added
mapLeft,bimap,tap,tapLeft,ensure,sequence, andtraverse. - Added support for exception catching in
flatMap.
- Added
- Standardized
sequenceandtraverseas static methods acrossEither,Task, andTaskEitherfor consistency and easier discovery.
- Added
-
DOCUMENTATION & REFACTORING:
- Re-architected implementation of
TaskEitherandEitherto strictly usefoldfor value transformations and exhaustiveswitchfor control flow branching, reducing code duplication. - Improved
_transformWithErrorHandlingdocstrings and formatting. - Instantiations of
Option.none()now use theconstconstructor for improved performance.
- Re-architected implementation of
2.2.0 - 2026-07-11 #
-
NEW FEATURES:
- Re-exported key utilities from
package:asyncto simplify asynchronous control flow and stream manipulation. These include:FutureGroup,AsyncCache, andAsyncMemoizerfor advanced future handling.StreamZip,StreamQueue,StreamGroup, andStreamSplitterfor streamlined stream consumption and combination.
- Re-exported key utilities from
-
DOCUMENTATION & REFACTORING:
- Updated library documentation in
lib/daxle.dartandREADME.mdto document the newasyncutilities. - Completed the incomplete documentation example for
Unitinsidelib/daxle.dart. - Removed outdated record extensions references from
lib/daxle.dartandREADME.md.
- Updated library documentation in
2.1.0 - 2026-07-01 #
-
NEW FEATURES:
- Re-introduced
Result<T, E>withOkandErrvariants for representing operations that can succeed or fail.
- Re-introduced
-
BREAKING CHANGES:
- Removed all record extensions (
zipped(),map(),flatMap(), andfilter()on Dart tuples/records) to keep the library lean and focus on a single explicit way of doing things. - Removed all function extension methods (
.result(),.either(), and.option()).
- Removed all record extensions (
-
DOCUMENTATION & REFACTORING:
- Reorganized internal folder structure inside
lib/src/into logical subfolders (types/). - Added comprehensive
{@template}and{@macro}documentation to all core data types and classes to maximize readability and reduce doc comments redundancy. - Added
example/example.mdto showcase the primary library features on pub.dev. - Formatted the codebase to ensure a 160/160 pub points quality score.
- Reorganized internal folder structure inside
2.0.0 - 2026-06-27 #
-
BREAKING CHANGES / API REWRITE:
- Removed
Lazy<T>type. Use deferred pipelines or standard closures. - Redesigned
Option<T>andEither<L, R>as sealed classes with direct subclasses (Some/None,Left/Right) for full compile-time exhaustive pattern matching. - Changed
Option.getOrElseto take an eager default valueTinstead of a resolver callback. - Changed
Either.getOrElseto take a resolver callbackR Function(L left)instead of an eager default value.
- Removed
-
NEW FEATURES:
- Added
TaskEither<L, R>type to represent lazy, asynchronous computations that can fail (Future<Either<L, R>>), supporting monadic chaining (map,flatMap,orElse,fold). - Added
Pipeline<T>andAsyncPipeline<T>classes to build deferred, type-safe operation chains.- Supports observational side-effects (
tap). - Supports recovery from errors (
recoverandrecoverWith). - Supports error mapping (
mapError). - Supports cleanup logic (
finalize/finallyequivalent). - Supports folding success and failure states.
- Supports concurrent combination of asynchronous pipelines (
zip).
- Supports observational side-effects (
- Added
Unittype andunitconstant to represent the absence of a meaningful value. - Added
zipped(),map(),flatMap(), andfilter()extension methods on Dart 3Recordtuples of size 2, 3, 4, and 5 containingOption,Either, orTaskEithervalues (runsTaskEithertasks concurrently). - Added
Option.fromPredicateandEither.condfactory constructors, andOption.filtermethod for clean, explicit conditional evaluation.
- Added
1.1.0 #
- Introduced
Lazytype for lazy evaluation and memoization of values. - Supported transforming
LazytoResult,Option, andEither.
1.0.0 #
- Initial version. (2026-01-10)
- Implemented
Eithertype for representing success or failure. - Implemented
Optiontype for representing the presence or absence of a value. - Implemented
Resulttype for representing a result of an operation that can either succeed or fail.
- Implemented