Repository navigation
Open
Description
Recreated from #37 (body and comments folded in) now that the Schema modules live in this repo's @thomasfosterau/effect-utilities. Read the original for its history.
Task
Track the switch of effect-jsonapi from its interim copies to @thomasfosterau/effect-utilities, once 0.1.0 is published. The work itself lands in thomasfosterau/effect-jsonapi (this repo cannot write there); open the matching issue there and link it from here.
What moves, from effect-jsonapi main:
src/internal/schemaExt.ts:pathToJsonPointer,issueLeaves,suppliedValue(its own comment says it moves here) →Issues/TriState.src/FlatQuery.ts:PageOffset,pageLimit,pagination(+PaginationOptions,DefaultedPagination,RequiredPagination),idList/IdList/DEFAULT_MAX_ID_LIST,Uuid,SLUG_PATTERN,slug/Slug→Bounded/Ids.
Names, defaults and messages match FlatQuery's; the "FlatQuery parity" tests in packages/effect-utilities/tests/Bounded.test.ts and Ids.test.ts pin that. Once switched, delete the interim copies so one copy wins.
Decisions carried over from effect-schema-ext#12
- Messages: parity kept. A
NaN/±Infinitypage limit or offset still fails with "Expected an integer" (effect-schema-ext PR thomasfosterau/effect-schema-ext#85), althoughpageLimit/PageOffsetnow declareSchema.Finite(effect-schema-ext#75). - Option objects: accepted break (owner, effect-schema-ext#79). Optional option members are
Option-valued: calls becomeslug({ reserved: Option.some([...]) }),idList({ maxLength: Option.some(n), dedupe: Option.some(true) })andpagination({ maxLimit, defaultLimit: Option.some(n) }), andpagination({ maxLimit, defaultLimit: false })becomesrequiredPagination({ maxLimit }). So the switch rewrites those call sites as well as the imports. - Package and import path changed.
@thomasfosterau/effect-schema-ext/<Module>is now@thomasfosterau/effect-utilities/<Module>, with the same module names. - The
ServerErrors.schemaIssueToErrorsString(leaf)detail bug is already fixed upstream (effect-jsonapi#187, which usesSchemaIssue.makeFormatterDefault(), asIssues.pointersdoes). - Peer floor. effect-schema-ext declared
effect>=4.0.0-rc.118. The merged package's floor is set and tested in the merge PR. Check it against effect-jsonapi's pin before switching.
Done when
@thomasfosterau/effect-utilities0.1.0 is published.- An issue exists in thomasfosterau/effect-jsonapi, linked here, and its PR is merged.
- effect-jsonapi depends on
@thomasfosterau/effect-utilitiesand no longer defines the helpers listed above.
Related: effect-jsonapi#172, website#2015.
Metadata
Metadata
Assignees
Labels
No labels
Activity
thomasfosterau commentedon Nov 7, 2026
Status 2026-11-07:
@thomasfosterau/effect-ext, noteffect-utilities; module names are unchanged.Bounded,Ids,IssuesandTriState.issueLeaves. Its fix merged in fix(Issues): keep a pointed struct-level check's message #73:Issues.Leaf.describedByplusIssues.message(leaf), so effect-jsonapi can build its error objects onIssues.leaves. It ships in the next effect-ext release (minor, 0.2.0).The rest of the work lands in effect-jsonapi, so I'm parking this until that release and effect-jsonapi's switch to it. "Done when" is met once effect-jsonapi drops
src/internal/schemaExt.ts'sissueLeaves.Generated by Claude Code