Repository navigation
chore: take the pure Schema helpers from @thomasfosterau/effect-ext - #553
Merged
Merged
Conversation
…552) FlatQuery's page window, UUID / id-list codecs, slugs and suppliedValue, and ServerErrors.pathToJsonPointer, now delegate to effect-ext 0.1.0's Bounded, Ids, TriState and Issues subpaths. Names, option objects and declared types are unchanged, and no declaration names effect-ext, so it is a runtime dependency rather than a peer. issueLeaves and closedStruct stay local: Issues.pointers formats a struct-level check's message differently, and effect-ext has no closed struct. entry-points.test.ts now permits exactly those four subpaths, never /Negotiate. It proves that they resolve only effect's core and that no .d.ts names effect-ext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5G6PJCD4Y6tQPCM8tvdbz
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This was referenced Nov 7, 2026
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
This adopts
@thomasfosterau/effect-ext0.1.0's pure Schema helpers wherever their published behaviour matches the local copies, and deletes those copies. It is tracked in effect-ext#37 and effect-ext#15.FlatQuery.PageOffset,pageLimit,pagination(incl.defaultLimit: false)Bounded.PageOffset,pageLimit,pagination/requiredPaginationOptionones.FlatQuery.Uuid,SLUG_PATTERN,slug,SlugIds.*FlatQuery.idList,IdList,DEFAULT_MAX_ID_LISTBounded.*FlatQuery.suppliedValueTriState.suppliedValueServerErrors.pathToJsonPointerIssues.pathToJsonPointerinternal/schemaExt.issueLeavesclosedStruct,validateMaxUndeclaredMemberErrorsLiteralExact,Ast,UrlThe public API and the wire format are unchanged. Each export keeps its name, its plain-value option object and its declared
Schema.*type.Bounded'sSchema.FiniteextendsSchema.Number, so the declared types still hold. I checked each replaced helper side by side against the local one, and they produce identical decoded values, error messages (Expected an integer, the slug messages, the id-list bounds), JSON Schema and string-tree coercions ("NaN","Infinity","abc"). The existing wire and OpenAPI suites also pass unchanged.Dependency shape. effect-ext is a runtime
dependency(catalog^0.1.0), not a peer. No effect-ext type reaches a published declaration, so a consumer never needs to share our copy. A new test enforces that. effect-ext peerseffect ^4.0.0, the same as ours, so theeffectpeer floor doesn't move.Cycle. Only the
Bounded,Ids,IssuesandTriStatesubpaths are imported, never/Negotiateor the barrel. Those subpaths import onlyeffect's core.Entry points.
test/entry-points.test.tsnow permits exactly those four subpaths. The schema tier reachesBounded,IdsandTriStatethroughFlatQuery;Issuesis reached only from the HTTP tier. The test adds two checks:.d.ts) resolves onlyeffect's core, with no HTTP surface.dist/*.d.tsnames effect-ext.README, CONTRIBUTING and the
/schemamodule doc change "effectalone" to say this.Closes #552
Verification
Run in the worktree, in AGENTS.md order:
pnpm install --frozen-lockfile: passvp run build: passvp check: pass (0 errors; the warnings are the existing staged-rollout tier)vp run check(sources, type-level tests, examples, emitted declarations): pass, 8/8 tasksvp run -r test:unit: pass. Root 3974 tests, and the examples 50, 73 and 56.entry-points.test.tsran all 27 cases againstdist/, none skipped.vp run docgen(every JSDoc@examplecompiled and executed): passvp run test:coverage, thenvp exec fallow audit --base origin/trunk: pass. Its one complexity finding (visitintest/entry-points.test.ts) was already on trunk and is excluded as inherited.Changeset
.changeset/effect-ext-schema-helpers.md(patch). It covers the new runtime dependency, which helpers now delegate to effect-ext, and the/schemaentry point's new effect-ext externals.Notes
Issues.leaves/Issues.pointersdiffer fromissueLeaves. The difference shows when a struct-level check carries amessageannotation and returns{ path: ["b"], issue: new SchemaIssue.InvalidValue(...) }.ServerErrors.schemaIssueToErrorsreports"b must equal a", butIssues.pointersreports"Expected a valid value". The local walk carries the nearestFilterdown throughPointers (describedBy). effect-ext only formats from aFilterthat sits directly over the bareInvalidValue, andIssues.leavesexposes no format node at all. SoissueLeavesstays. This is a finding for effect-ext#37: onceIssuescarries the nearestFilterdown,issueLeavescan go.@thomasfosterau/effect-jsonapi >=0.16.1gets resolved in this workspace's own install. pnpm puts the published effect-jsonapi 0.20.1 undernode_modules/@thomasfosterau/effect-ext/node_modules/. Nothing loads that copy, and a scopedoverridesentry ("-") cannot drop a peer edge. A consumer's install is unaffected. The catalog comment records this.minimumReleaseAgeExcludeentry for@thomasfosterau/*admits the fresh 0.1.0 release..d.ts, dist and README.Generated by Claude Code