Repository navigation
fix(Query): omit a JSON object member from the canonical query (#536) - #562
Merged
Merged
Conversation
`pairsOf` wrote a JSON object member as `key=[object Object]`; it has no flat wire form, so it is omitted like `null`. With its one site gone, `typescript/no-base-to-string` is back at `error`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5G6PMx5cf5KQSi9sQ4tu1
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
Part of #536, the
typescript/no-base-to-stringrow. The issue stays open for its other rules.pairsOfinsrc/internal/canonical.tswrote a flat query member whose encoded value is a JSON object askey=[object Object]. The issue asked for a behaviour to be chosen ("omit, likenull, or fail"). This takes omit:orderPairsalready omits the other member without one (null).Query.canonical, and so everyselfand pagination link built from it, throw on a consumer's flat schema, inside link building, where no caller handles it.numberandbooleanmembers are now stringified explicitly. Arrays are unchanged (repeated key, orinclude's comma form). The doc comments oforderPairsandQuery.canonicalPairssay so.With its only site gone, the
"typescript/no-base-to-string": "warn"line leavesvite.config.ts, so the rule is back at thesuspiciouscategory'serror.Verification
pnpm install --frozen-lockfile: passvp run build: passvp check: pass.no-base-to-stringreports 0 sites, now aterror.vp run check: passvp run -r test:unit: pass, including the new "omits a JSON object member" case insrc/Query.test.tsvp run docgen: passvp run test:coverage, thenfallow audit --base origin/trunk: pass (1 inherited finding excluded)pnpm audit --audit-level highwas not run here. CI runs it.Changeset
.changeset/canonical-omits-json-object.md, patch, as the issue says.Notes
No signature change.
Generated by Claude Code