xsschema 0.2.0-beta.4 → 0.2.0-beta.6

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.
@@ -1,4 +1,4 @@
1
- import { t as tryImport } from './index-EEBc7g4U.js';
1
+ import { t as tryImport } from './index-BeZ6D_oD.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { JSONSchema } = await tryImport(import('effect'), "effect");
@@ -10,11 +10,11 @@ const getToJsonSchemaFn = async (vendor) => {
10
10
  case "arktype":
11
11
  return import('./arktype-C-GObzDh.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
12
12
  case "effect":
13
- return import('./effect-E6O7VEao.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
13
+ return import('./effect-AvyXEvwH.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
14
14
  case "valibot":
15
- return import('./valibot-B8FGAgCn.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
15
+ return import('./valibot-BI4iQMg3.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
16
16
  case "zod":
17
- return import('./zod-BlHQnRFu.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
17
+ return import('./zod-CxRm5Gac.js').then(async ({ getToJsonSchemaFn: getToJsonSchemaFn2 }) => getToJsonSchemaFn2());
18
18
  default:
19
19
  throw new Error(`xsschema: Unsupported schema vendor "${vendor}"`);
20
20
  }
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { i as initToJsonSchemaSyncVendor, a as toJsonSchema, b as toJsonSchemaSync, v as validate } from './index-EEBc7g4U.js';
1
+ export { i as initToJsonSchemaSyncVendor, a as toJsonSchema, b as toJsonSchemaSync, v as validate } from './index-BeZ6D_oD.js';
@@ -1,4 +1,4 @@
1
- import { t as tryImport } from './index-EEBc7g4U.js';
1
+ import { t as tryImport } from './index-BeZ6D_oD.js';
2
2
 
3
3
  const getToJsonSchemaFn = async () => {
4
4
  const { toJsonSchema } = await tryImport(import('@valibot/to-json-schema'), "@valibot/to-json-schema");
@@ -6,12 +6,12 @@ const getToJsonSchemaFn = async () => {
6
6
  throw new Error('xsschema: Missing dependencies "zod-to-json-schema".');
7
7
  };
8
8
  try {
9
- const { z } = await import('./index-DsAjdUis.js');
9
+ const { z } = await import('@zod/mini');
10
10
  toJSONSchema = z.toJSONSchema;
11
11
  } catch {
12
12
  }
13
13
  try {
14
- const { z } = await import('./index-BiC_3bGT.js');
14
+ const { z } = await import('zod');
15
15
  if ("toJSONSchema" in z)
16
16
  toJSONSchema = z.toJSONSchema;
17
17
  } catch (err) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xsschema",
3
3
  "type": "module",
4
- "version": "0.2.0-beta.4",
4
+ "version": "0.2.0-beta.6",
5
5
  "description": "extra-small, Standard Schema-based alternative to typeschema.",
6
6
  "author": "Moeru AI",
7
7
  "license": "MIT",
@@ -32,20 +32,28 @@
32
32
  ],
33
33
  "peerDependencies": {
34
34
  "@valibot/to-json-schema": "^1.0.0",
35
+ "@zod/mini": "^4.0.0-beta",
35
36
  "arktype": "^2.1.16",
36
37
  "effect": "^3.14.5",
38
+ "zod": "^3.24.3 || ^4.0.0-beta",
37
39
  "zod-to-json-schema": "^3.24.5"
38
40
  },
39
41
  "peerDependenciesMeta": {
40
42
  "@valibot/to-json-schema": {
41
43
  "optional": true
42
44
  },
45
+ "@zod/mini": {
46
+ "optional": true
47
+ },
43
48
  "arktype": {
44
49
  "optional": true
45
50
  },
46
51
  "effect": {
47
52
  "optional": true
48
53
  },
54
+ "zod": {
55
+ "optional": true
56
+ },
49
57
  "zod-to-json-schema": {
50
58
  "optional": true
51
59
  }