@sinclair/typebox 0.28.1 → 0.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -342,7 +342,7 @@ var TypeCompiler;
342
342
  yield `Object.getOwnPropertyNames(${value}).length <= ${schema.maxProperties}`;
343
343
  const [patternKey, patternSchema] = globalThis.Object.entries(schema.patternProperties)[0];
344
344
  const local = PushLocal(`new RegExp(/${patternKey}/)`);
345
- const check1 = CreateExpression(patternSchema, references, value);
345
+ const check1 = CreateExpression(patternSchema, references, 'value');
346
346
  const check2 = Types.TypeGuard.TSchema(schema.additionalProperties) ? CreateExpression(schema.additionalProperties, references, value) : schema.additionalProperties === false ? 'false' : 'true';
347
347
  const expression = `(${local}.test(key) ? ${check1} : ${check2})`;
348
348
  yield `(Object.entries(${value}).every(([key, value]) => ${expression}))`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.28.1",
3
+ "version": "0.28.2",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",