All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Initial release of Effect.dart library
- Core
Effect<Success, Error, Requirements>type with type-safe error handling - Basic effect constructors:
Effect.succeed()- Create successful effectsEffect.fail()- Create failed effectsEffect.sync()- Synchronous computations that may throwEffect.async()- Asynchronous computationsEffect.service()- Dependency injection effects
- Effect transformation methods:
map()- Transform success valuesmapError()- Transform error valuesflatMap()- Chain effects togethercatchAll()- Handle and recover from errors
- Context system for dependency injection:
Context<R>type for managing servicesprovideContext()andprovideService()for providing dependencies- Type-safe service retrieval
- Exit system representing effect results:
Success<A>andFailure<E>exit typesCause<E>system for error classification (FailvsDie)
- Runtime system for executing effects:
Runtime.defaultRuntimesingletonrunToExit()for safe executionrunUnsafe()for throwing execution- Concurrent execution with
runConcurrently()andrunRace() - Fiber system for managing concurrent effects
- Either type for functional error handling:
Either<L, R>withLeftandRightcases- Functional operations like
map,flatMap,fold
- Option type for handling nullable values:
Option<A>withSomeandNonecases- Safe operations:
map,flatMap,fold,getOrElse - Utilities:
some,none,fromNullable
- Comprehensive Array utilities (40+ functions):
- Constructors:
of,empty,fromIterable,ensure - Manipulation:
prepend,append,prependAll,appendAll - Slicing:
take,takeRight,takeWhile,drop,dropRight,dropWhile - Access:
get,head,last,tail,init - Queries:
isEmpty,isNotEmpty,length,contains - Functional:
map,filter,find,some,every,partition - Advanced:
zip,flatten,reduce,foldLeft,reverse,join
- Constructors:
- Comprehensive test suite covering all major functionality (65 tests)
- Example code demonstrating library usage
- Complete API documentation in README.md
- Melos configuration for project management
- Strict linting rules for code quality
- Type Safety: Complete type safety for success values, errors, and dependencies
- Lazy Evaluation: Effects are pure descriptions that don't execute until run
- Composability: Chain and combine effects using functional operations
- Error Handling: Built-in typed error handling with recovery mechanisms
- Dependency Injection: Type-safe context system inspired by Effect-TS
- Concurrency: Built-in support for parallel and concurrent execution
- Resource Management: Safe resource handling through the effect system
- Comprehensive README with examples and API reference
- Inline documentation for all public APIs
- Working examples in
example/directory - Test suite demonstrating usage patterns
- Melos configuration for monorepo-style development
- Comprehensive linting rules
- Automated testing setup
- Example code for library demonstration
- More concurrent combinators (timeout, retry, etc.)
- Resource management with bracket patterns
- Streaming support with Effect streams
- Performance optimizations
- Additional utility functions and combinators