Repository navigation
fix(validate): warn when where-clause operators omit the leading $ (#546) - #551
Open
theroimasters1-dev wants to merge 1 commit into
Open
theroimasters1-dev wants to merge 1 commit into
theroimasters1-dev wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Closes #546
What changed for users
validatenow warns (⚠) when a where-clause object has no$key and all of its keys are known operator names written without the leading$, e.g.:Before this change, sandtable treated
{ gt: 2000 }as an exact object equality check rather than an operator condition, so the rule silently never fired.validatenow prints:$containselements).--strict), keeping existing workflows non-breaking.address: { zip: "94105" }or{ gt: 1, zip: 2 }) produce no warning.How you verified it
npx vitest run test/operators.test.ts(all 70 tests passing, covering single & multi-bare operators, recursion,$containselements, and CLI YAML output)npm run typecheck(passed with 0 errors)npm run build(clean compilation)node scripts/changelog.mjs check(CHANGELOG.md ok)node scripts/sync-version.mjs --check(npm 1.4.0 <-> PyPI 1.4.0)npm run smoke(all 52 freight and 25 clinic tasks passed with 100% pass^1 rate)npm run checkpassesAn entry under
## [Unreleased]in CHANGELOG.md, or theno-changeloglabel when no user can notice the changeThe docs, the plugin skills and the README follow any command, flag or spec change (AGENTS.md, "Keep docs, plugin and README in sync")