@sinclair/typebox 0.33.9 → 0.33.11

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.
@@ -118,7 +118,7 @@ function FromTuple(schema, references, value) {
118
118
  function FromUnion(schema, references, value) {
119
119
  const defaulted = ValueOrDefault(schema, value);
120
120
  for (const inner of schema.anyOf) {
121
- const result = Visit(inner, references, defaulted);
121
+ const result = Visit(inner, references, (0, index_2.Clone)(defaulted));
122
122
  if ((0, index_1.Check)(inner, result)) {
123
123
  return result;
124
124
  }
@@ -114,7 +114,7 @@ function FromTuple(schema, references, value) {
114
114
  function FromUnion(schema, references, value) {
115
115
  const defaulted = ValueOrDefault(schema, value);
116
116
  for (const inner of schema.anyOf) {
117
- const result = Visit(inner, references, defaulted);
117
+ const result = Visit(inner, references, Clone(defaulted));
118
118
  if (Check(inner, result)) {
119
119
  return result;
120
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.33.9",
3
+ "version": "0.33.11",
4
4
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
@@ -17,12 +17,20 @@
17
17
  "scripts": {
18
18
  "test": "echo test"
19
19
  },
20
- "esm.sh": {
21
- "bundle": false
22
- },
23
20
  "types": "./build/cjs/index.d.ts",
24
21
  "main": "./build/cjs/index.js",
25
22
  "module": "./build/esm/index.mjs",
23
+ "esm.sh": {
24
+ "bundle": false
25
+ },
26
+ "sideEffects": [
27
+ "./build/esm/type/registry/format.mjs",
28
+ "./build/esm/type/registry/type.mjs",
29
+ "./build/esm/type/system/policy.mjs",
30
+ "./build/cjs/type/registry/format.js",
31
+ "./build/cjs/type/registry/type.js",
32
+ "./build/cjs/type/system/policy.js"
33
+ ],
26
34
  "exports": {
27
35
  ".": {
28
36
  "require": {