Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 37 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,56 @@
## 2.0.0 - Sep 01, 2024
# Changelog

- Require Dart 3.0.0 or higher `>=3.0.0 <4.0.0`.
All notable changes to this project will be documented in this file.

- Make `Either` a sealed class, `EitherEffect` a sealed class, and `ControlError` a final class.
Now you can use exhaustive switch expressions on `Either` instances.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2024-09-01

### Changed

- **BREAKING**: Require Dart SDK `>=3.0.0 <4.0.0`
- **BREAKING**: Made `Either` a sealed class for exhaustive pattern matching
- **BREAKING**: Made `EitherEffect` a sealed class
- **BREAKING**: Made `ControlError` a final class

### Added

- ✨ **Dart 3.0 Pattern Matching**: Full support for exhaustive switch expressions
```dart
final Either<String, int> either = Either.right(10);

// Use the `when` method to handle
// Use the `when` method
either.when(
ifLeft: (l) => print('Left: $l'),
ifRight: (r) => print('Right: $r'),
); // Prints Right: Either.Right(10)
); // Prints: Right: Either.Right(10)

// Or use Dart 3.0 switch expression syntax 🀘
// Or use Dart 3.0 switch expressions πŸš€
print(
switch (either) {
Left() => 'Left: $either',
Right() => 'Right: $either',
},
); // Prints Right: Either.Right(10)
); // Prints: Right: Either.Right(10)
```

## 1.0.0 - Aug 23, 2022
## [1.0.0] - 2022-08-23

### Changed

- πŸŽ‰ First stable release
- Production-ready API with comprehensive test coverage

## [0.0.1] - 2021-04-27

- This is our first stable release.
### Added

## 0.0.1 - Apr 27, 2021
- Initial version created by Stagehand
- Core `Either` monad implementation
- Support for `Left` and `Right` types
- Basic functional operations (map, flatMap, fold)

- Initial version, created by Stagehand
[2.0.0]: https://github.com/hoc081098/dart_either/compare/v1.0.0...v2.0.0
[1.0.0]: https://github.com/hoc081098/dart_either/compare/v0.0.1...v1.0.0
[0.0.1]: https://github.com/hoc081098/dart_either/releases/tag/v0.0.1
Loading