@depup/typebox 1.3.34-depup.0 → 1.3.36-depup.0

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.
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/typebox
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [typebox](https://www.npmjs.com/package/typebox) @ 1.3.34 |
17
- | Processed | 2026-09-20 |
16
+ | Original | [typebox](https://www.npmjs.com/package/typebox) @ 1.3.36 |
17
+ | Processed | 2026-10-09 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 0 |
20
20
 
@@ -12,7 +12,7 @@ export function FromObject(context, type, value) {
12
12
  return value;
13
13
  const additionalProperties = GetAdditionalProperties(type);
14
14
  for (const key of Guard.Keys(value)) {
15
- if (Guard.HasPropertyKey(type.properties, key)) {
15
+ if (Guard.HasPropertyKey(type.properties, key) && IsSchema(type.properties[key])) {
16
16
  value[key] = FromType(context, type.properties[key], value[key]);
17
17
  continue;
18
18
  }
@@ -1,11 +1,12 @@
1
1
  // deno-fmt-ignore-file
2
2
  import Guard from '../../guard/index.mjs';
3
- import { IsArray, Array as _Array_, ArrayOptions } from '../../type/index.mjs';
4
- import { IsUnion, Union } from '../../type/index.mjs';
3
+ import { Array as _Array_, ArrayOptions, IsArray } from '../../type/index.mjs';
4
+ import { Intersect, IsIntersect } from '../../type/index.mjs';
5
5
  import { IsObject, Object as _Object_ } from '../../type/index.mjs';
6
- import { IsRecord, Record, RecordKey, RecordValue } from '../../type/index.mjs';
6
+ import { IsRecord, Record, RecordPattern, RecordValue } from '../../type/index.mjs';
7
+ import { String } from '../../type/index.mjs';
7
8
  import { IsTuple, Tuple } from '../../type/index.mjs';
8
- import { IsIntersect, Intersect } from '../../type/index.mjs';
9
+ import { IsUnion, Union } from '../../type/index.mjs';
9
10
  import { Priority } from '../../type/index.mjs';
10
11
  // ------------------------------------------------------------------
11
12
  // Modifiers (Mutable)
@@ -34,6 +35,18 @@ function FromProperties(properties) {
34
35
  return result;
35
36
  }
36
37
  // ------------------------------------------------------------------
38
+ // FromRecordKey
39
+ //
40
+ // This is required because RecordKey(...) returns a canonical
41
+ // decoded type derived from the pattern. When the pattern is an
42
+ // unrecognized user-defined one, the result falls through to
43
+ // TString (^.*$) and the user-defined pattern is lost. This
44
+ // function ensures the exact pattern is retained.
45
+ // ------------------------------------------------------------------
46
+ function FromRecordKey(type) {
47
+ return String({ pattern: RecordPattern(type) });
48
+ }
49
+ // ------------------------------------------------------------------
37
50
  // PriorityTypes
38
51
  // ------------------------------------------------------------------
39
52
  function FromPriorityTypes(types) {
@@ -43,7 +56,7 @@ function FromPriorityTypes(types) {
43
56
  // Types
44
57
  // ------------------------------------------------------------------
45
58
  function FromTypes(types) {
46
- return types.map(type => FromType(type));
59
+ return types.map((type) => FromType(type));
47
60
  }
48
61
  // ------------------------------------------------------------------
49
62
  // Type
@@ -53,7 +66,7 @@ function FromType(type) {
53
66
  IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :
54
67
  IsUnion(type) ? Union(FromPriorityTypes(type.anyOf)) :
55
68
  IsObject(type) ? _Object_(FromProperties(type.properties)) :
56
- IsRecord(type) ? Record(RecordKey(type), FromType(RecordValue(type))) :
69
+ IsRecord(type) ? Record(FromRecordKey(type), FromType(RecordValue(type))) :
57
70
  IsTuple(type) ? Tuple(FromTypes(type.items)) :
58
71
  type);
59
72
  return Modifiers(type, next);
package/changes.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "bumped": {},
3
- "timestamp": "2026-09-20T01:02:49.478Z",
3
+ "timestamp": "2026-10-09T15:09:33.723Z",
4
4
  "totalUpdated": 0
5
5
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depup/typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript (with updated dependencies)",
4
- "version": "1.3.34-depup.0",
4
+ "version": "1.3.36-depup.0",
5
5
  "keywords": [
6
6
  "typebox",
7
7
  "depup",
@@ -94,8 +94,8 @@
94
94
  "changes": {},
95
95
  "depsUpdated": 0,
96
96
  "originalPackage": "typebox",
97
- "originalVersion": "1.3.34",
98
- "processedAt": "2026-09-20T01:02:50.022Z",
97
+ "originalVersion": "1.3.36",
98
+ "processedAt": "2026-10-09T15:09:34.473Z",
99
99
  "smokeTest": "passed"
100
100
  }
101
101
  }