Skip to content

[Refactor] Use lookup map for JSON schema comparison wording - #8810

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
refactor-maintenance-37552062697
Draft

github-actions[bot] wants to merge 1 commit into
mainfrom
refactor-maintenance-37552062697

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

The JSON schema error formatter mapped comparison operators to human-readable wording with a 14-line switch and a reassigned let. The mapping is pure data, so a lookup table states it more directly and keeps the already-long convertJsonSchemaErrors branch readable.

WHAT is this pull request doing?

Replace the switch in convertJsonSchemaErrors with a module-level comparisonDescriptions lookup map in packages/cli-kit/src/public/node/json-schema.ts. The ?? comparison fallback preserves the previous default of echoing the raw operator when it isn't one of the four known comparisons, so error messages are unchanged.

How to manually test your changes?

CI

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants