Skip to content

chore: Track effect-jsonapi switching to @thomasfosterau/effect-utilities #15

Open

Description

@thomasfosterau

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 / ±Infinity page limit or offset still fails with "Expected an integer" (effect-schema-ext PR thomasfosterau/effect-schema-ext#85), although pageLimit / PageOffset now declare Schema.Finite (effect-schema-ext#75).
  • Option objects: accepted break (owner, effect-schema-ext#79). Optional option members are Option-valued: calls become slug({ reserved: Option.some([...]) }), idList({ maxLength: Option.some(n), dedupe: Option.some(true) }) and pagination({ maxLimit, defaultLimit: Option.some(n) }), and pagination({ maxLimit, defaultLimit: false }) becomes requiredPagination({ 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.schemaIssueToErrors String(leaf) detail bug is already fixed upstream (effect-jsonapi#187, which uses SchemaIssue.makeFormatterDefault(), as Issues.pointers does).
  • 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-utilities 0.1.0 is published.
  • An issue exists in thomasfosterau/effect-jsonapi, linked here, and its PR is merged.
  • effect-jsonapi depends on @thomasfosterau/effect-utilities and no longer defines the helpers listed above.

Related: effect-jsonapi#172, website#2015.

Activity

  1. thomasfosterau commented on Nov 7, 2026

    @thomasfosterau
    OwnerAuthor

    Status 2026-11-07:

    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's issueLeaves.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions