Skip to content

🍾 🥳 Release 2.0.0#70

Merged
myugen merged 16 commits intomainfrom
beta
May 11, 2025
Merged

🍾 🥳 Release 2.0.0#70
myugen merged 16 commits intomainfrom
beta

Conversation

@myugen
Copy link
Collaborator

@myugen myugen commented May 11, 2025

This pull request introduces significant updates to the README.md documentation and the Either monad implementation, along with minor adjustments to the package.json file and test cases. The changes focus on improving the clarity and functionality of the monads, particularly Either, Option, and Try, while replacing the match method with more explicit methods like fold, onRight, and onLeft.

Documentation Enhancements:

  • Expanded README.md to include detailed examples of new methods (recover, fold, onRight, onLeft, etc.) for Either, Option, and Try monads. These updates replace the previous match method with more descriptive alternatives. [1] [2] [3] [4]
  • Clarified the usage of Try monad creation methods (Try.success, Try.failure, and Try.execute) and added examples for retrieving values using getOrElse and getOrThrow. [1] [2]

Code Enhancements:

  • BREAKING CHANGES: Replaced the match method with fold and added onRight and onLeft methods to the Either monad for handling side effects and unwrapping values. [1] [2]
  • Updated Option and Try monads with similar fold and side-effect handling methods (onSome, onNone, onSuccess, onFailure). [1] [2]

Testing Improvements:

  • Added new test cases to validate onRight, onLeft, and recover methods for the Either monad.
  • Removed outdated test cases for the deprecated match method.

Minor Adjustments:

  • Updated package.json to correct the types path and updated contributor information. [1] [2]
  • Fixed minor typos in imports across files. [1] [2]

These changes improve the usability and readability of the library, making it easier for developers to work with monads in TypeScript.

@myugen myugen merged commit 36aca5e into main May 11, 2025
6 of 7 checks passed
@github-actions
Copy link

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants