Repository navigation
Use Arr.getSomes for optional array entries - #207
Merged
Merged
Conversation
Option.match that returns [] or [value] is Arr.getSomes. The remaining service call sites now use that helper, and the Effect lint rule blocks the manual pattern. Four other Effect rules that the service code already follows are errors too. Co-authored-by: Jonathan Beckman <jonathantbeckman@gmail.com>
jonbeckman
marked this pull request as ready for review
November 29, 2026 09:20
Contributor
TegamiThis repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under Create a changelog → · Changelog format No changelogs yetThis PR has no pending changelog files. If your changes require a release, add a changelog before merging. Run Managed by Tegami. |
Contributor
🟢 e2e solzero-core: 5 passed, 26 left out by filtersChange 8 files changed since 26 tests left out by filters
All 5 tests in 4 files
Tested by e2e 0.23.0 · 1m 46s · local-cloudflare · run artifacts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Service code already keeps present
Optionvalues withArr.getSomes. Ten call sites still did that by hand:flatMapplusOption.matchreturning[]or[value]. Those sites now useArr.getSomes. The kept values, their order, and the records built from them are unchanged.effect/prefer-array-fromoption-over-option-match-emptyis an error on the Effect service files, so that manual pattern cannot come back. Four other Effect rules already had no violations on those files, and they are errors now:effect/no-effect-ignore-then-aseffect/avoid-yield-refeffect/avoid-mutable-stateeffect/context-tag-extendsThis change has no user-visible effect. It uses the
release:nonelabel and does not add a Tegami entry.Validation
nub run config:checknub run typechecknub run lint(clean with the new rules)nub run formatnub run testwas not run. Each call still drops empty options and keeps the same values in the same order. No route or screen changed.Checklist
.tegami/release entry, or explained why this pull request usesrelease:none.nub run config:check,nub run typecheck,nub run lint,nub run format, andnub run test.THIRD_PARTY_NOTICES.mdfor new third-party code or separately licensed assets.