Packages

ata-validator

1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed

Your version

1.30.2

25 Sep 2026Where it was published

1.61.3 is the newest release of 1.x.

Release note

A second silent accept of the class 1.30.1 fixed, found by sweeping for the rest of it rather than by a report.

The generators coordinate within one schema node using a couple of flags: "this node's patternProperties already emitted the propertyNames check", and "this node already emitted its key count early". Those were kept on the compile context, which outlives the node, and were never reset.

const schema = { type: 'object', properties: {
  a: { type: 'object', patternProperties: { '^x': { type: 'number' } }, propertyNames: { pattern: '^x' } },
  b: { type: 'object', propertyNames: { pattern: '^y' } },
} }

new Validator(schema).validate({ b: { zzz: 1 } })   // true, where the interpreted engine says false

a is compiled first and sets the flag. b reads it and emits no propertyNames check at all, so the constraint is not misplaced but absent, and the document is accepted rather than refused. The flag was clobbered downward as well as sideways, since a node's children are compiled between the point it is set and the point it is read, so a parent's propertyNames could vanish because a child had one of its own.

Reachable on the verdict and combined generators. The error generator has its own handling and was already right.

Both flags are locals now, so the class is gone by construction rather than by a reset a later edit could forget. A new test enumerates every compile-context field and fails on any that is not genuinely per-compile, so the next such flag has to justify itself. Both shapes are in the engine differential, where they split the two engines on 12 of 23664 cases without the fix.

Draft 2020-12 1301 of 1301, draft 7 929 of 929, the v1 dialect 1135 of 1135, identical with code generation blocked.