introduces a non-breaking API renaming and alignment for the dart_either package, primarily to match Arrow/Kotlin naming conventions#36
Conversation
…ty; update documentation
…; improve documentation
…w/Kotlin mental models
…nd deprecate old aliases
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #36 +/- ##
==========================================
- Coverage 98.07% 93.91% -4.17%
==========================================
Files 5 6 +1
Lines 208 230 +22
==========================================
+ Hits 204 216 +12
- Misses 4 14 +10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR aligns dart_either’s public API naming with Arrow/Kotlin conventions by introducing new method names while retaining deprecated aliases for backward compatibility, and updates docs/examples/tests accordingly.
Changes:
- Added new
EitherAPIs (onLeft,onRight,getOrNull,getOrDefault,isRightAnd) and kept old names as@Deprecatedaliases. - Updated README + example code to use the new names and documented the alias mapping/migration notes.
- Expanded unit tests to cover both new APIs and deprecated aliases, including eager vs lazy fallback behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
lib/src/dart_either.dart |
Introduces new method names and deprecated aliases; updates API docs/examples. |
test/dart_either_test.dart |
Adds/updates tests for new API names and deprecated alias compatibility. |
README.md |
Updates snippets + API table and adds a deprecation/migration note. |
example/lib/dart_either_readme.dart |
Updates example usage to new API names. |
CHANGELOG.md |
Documents the naming alignment and migration guidance under Unreleased. |
.github/skills/api-rename-flow/SKILL.md |
Adds a repo-local workflow guide for non-breaking API renames. |
names.md |
Adds a naming alignment/rollout strategy table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…o hoc/new-name
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…o hoc/new-name # Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ted documentation
…sponding documentation and tests
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a non-breaking API naming alignment for the
dart_eitherpackage, bringing its public API closer to Arrow/Kotlin conventions while preserving backward compatibility. New API names are added, with the old names retained as deprecated aliases, and all relevant documentation, examples, and tests are updated accordingly. Additionally, the semantics ofgetOrDefaultare clarified to be eager, and a skill document is added to guide future API renames.API Naming Alignment and Deprecations
onLeft(fromtapLeft),onRight(fromtap),getOrNull(fromorNull),getOrDefault(fromgetOrElse), andisRightAnd(fromexists). Old methods are kept as deprecated aliases with clear replacement messages to ensure backward compatibility. (lib/src/dart_either.dart,README.md,test/dart_either_test.dart, [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Documentation and Example Updates
README.mdandexample/lib/dart_either_readme.dart. Deprecated aliases are clearly marked. (README.md,example/lib/dart_either_readme.dart, [1] [2] [3] [4] [5] [6]Test Coverage Enhancements
getOrDefaultandgetOrHandle. (test/dart_either_test.dart, [1] [2] [3]Behavioral Clarification
getOrDefaultuses eager fallback value semantics and updated its signature; users are directed to usegetOrHandlefor lazy evaluation. (lib/src/dart_either.dart, lib/src/dart_either.dartL755-R834)Project Process and Guidance
.github/skills/api-rename-flow/SKILL.md, .github/skills/api-rename-flow/SKILL.mdR1-R62)CHANGELOG.md, [1]names.md, [2]