@sinclair/typebox 0.25.0 → 0.25.1

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.
@@ -6,10 +6,10 @@ export declare enum ValueErrorType {
6
6
  ArrayUniqueItems = 3,
7
7
  Boolean = 4,
8
8
  Date = 5,
9
- DateExclusiveMinimum = 6,
10
- DateExclusiveMaximum = 7,
11
- DateMinimum = 8,
12
- DateMaximum = 9,
9
+ DateExclusiveMinimumTimestamp = 6,
10
+ DateExclusiveMaximumTimestamp = 7,
11
+ DateMinimumTimestamp = 8,
12
+ DateMaximumTimestamp = 9,
13
13
  Function = 10,
14
14
  Integer = 11,
15
15
  IntegerMultipleOf = 12,
package/errors/errors.js CHANGED
@@ -41,10 +41,10 @@ var ValueErrorType;
41
41
  ValueErrorType[ValueErrorType["ArrayUniqueItems"] = 3] = "ArrayUniqueItems";
42
42
  ValueErrorType[ValueErrorType["Boolean"] = 4] = "Boolean";
43
43
  ValueErrorType[ValueErrorType["Date"] = 5] = "Date";
44
- ValueErrorType[ValueErrorType["DateExclusiveMinimum"] = 6] = "DateExclusiveMinimum";
45
- ValueErrorType[ValueErrorType["DateExclusiveMaximum"] = 7] = "DateExclusiveMaximum";
46
- ValueErrorType[ValueErrorType["DateMinimum"] = 8] = "DateMinimum";
47
- ValueErrorType[ValueErrorType["DateMaximum"] = 9] = "DateMaximum";
44
+ ValueErrorType[ValueErrorType["DateExclusiveMinimumTimestamp"] = 6] = "DateExclusiveMinimumTimestamp";
45
+ ValueErrorType[ValueErrorType["DateExclusiveMaximumTimestamp"] = 7] = "DateExclusiveMaximumTimestamp";
46
+ ValueErrorType[ValueErrorType["DateMinimumTimestamp"] = 8] = "DateMinimumTimestamp";
47
+ ValueErrorType[ValueErrorType["DateMaximumTimestamp"] = 9] = "DateMaximumTimestamp";
48
48
  ValueErrorType[ValueErrorType["Function"] = 10] = "Function";
49
49
  ValueErrorType[ValueErrorType["Integer"] = 11] = "Integer";
50
50
  ValueErrorType[ValueErrorType["IntegerMultipleOf"] = 12] = "IntegerMultipleOf";
@@ -127,16 +127,16 @@ var ValueErrors;
127
127
  return yield { type: ValueErrorType.Date, schema, path, value, message: `Expected Date object` };
128
128
  }
129
129
  if (schema.exclusiveMinimumTimestamp && !(value.getTime() > schema.exclusiveMinimumTimestamp)) {
130
- yield { type: ValueErrorType.DateExclusiveMinimum, schema, path, value, message: `Expected Date timestamp to be greater than ${schema.exclusiveMinimum}` };
130
+ yield { type: ValueErrorType.DateExclusiveMinimumTimestamp, schema, path, value, message: `Expected Date timestamp to be greater than ${schema.exclusiveMinimum}` };
131
131
  }
132
132
  if (schema.exclusiveMaximumTimestamp && !(value.getTime() < schema.exclusiveMaximumTimestamp)) {
133
- yield { type: ValueErrorType.DateExclusiveMaximum, schema, path, value, message: `Expected Date timestamp to be less than ${schema.exclusiveMaximum}` };
133
+ yield { type: ValueErrorType.DateExclusiveMaximumTimestamp, schema, path, value, message: `Expected Date timestamp to be less than ${schema.exclusiveMaximum}` };
134
134
  }
135
135
  if (schema.minimumTimestamp && !(value.getTime() >= schema.minimumTimestamp)) {
136
- yield { type: ValueErrorType.DateMinimum, schema, path, value, message: `Expected Date timestamp to be greater or equal to ${schema.minimum}` };
136
+ yield { type: ValueErrorType.DateMinimumTimestamp, schema, path, value, message: `Expected Date timestamp to be greater or equal to ${schema.minimum}` };
137
137
  }
138
138
  if (schema.maximumTimestamp && !(value.getTime() <= schema.maximumTimestamp)) {
139
- yield { type: ValueErrorType.DateMaximum, schema, path, value, message: `Expected Date timestamp to be less or equal to ${schema.maximum}` };
139
+ yield { type: ValueErrorType.DateMaximumTimestamp, schema, path, value, message: `Expected Date timestamp to be less or equal to ${schema.maximum}` };
140
140
  }
141
141
  }
142
142
  function* Function(schema, references, path, value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",