Repository navigation
fix!: validity is json-rules' answer on the builder's targets — 0.31.0 - #10
Merged
Merged
Conversation
- validate(target) passes the lens root's map/mapName/model (A1) - leaf/array valid includes validateRule on every target; the path picker offers only same-kind refs every target compiles (A2) - delete the stale validateAggregate copy; offer filter on aggregates where every target takes a window (A3) - remove runSources/SourceRows; examples use json-rules materializeSources (A4) - useActionRuleBuilder rel walks read the view's visit at every hop (A5) - peer @inixiative/json-rules ^3.5.0 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Fixes the adversarial-review findings A1–A5 (TDD:
test/targetValidation.test.tsxfailed 11/12 before the fix).useRuleBuilder().validate(target)passes the narrowed lens root'smap/mapName/model(as json-rulesdescribeRuledoes) —{field:'name',operator:'equals',path:'nick'}now validates for toPrisma, matchingdescribe().validinclude json-rulesvalidateRuleon every builder target with the lens schema. The path picker offers only refs of the field's own kind (an enum: its own enum) that every target compiles; empty scopes are left out (toPrisma drops$$.).validateAggregatecopy;filteris offered on aggregates where every target takes a window (check, toPrisma) or one is already authored. The aggregate-target picker's own validity still folds intovalid. The aggregate test fixture gained FK fields so toPrisma can actually compile it.runSources/SourceRows(no consumers outside the examples). Examples now use json-rulesmaterializeSourceswith bridge far sides stitched inline (indexBridges); sample users gainedaccountIdso the bridgedindustrysource has data.useActionRuleBuilderrel walks read the view's visit at every hop (norawView).resourceFieldsstays for the raw-record builders only (permissions, transitions).@inixiative/json-rules^3.5.0; version 0.31.0; CHANGELOG.bun run check: typecheck, examples typecheck, lint, 422 tests pass.🤖 Generated with Claude Code