@composio/json-schema-to-zod 0.1.17 → 0.1.18

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/dist/index.cjs CHANGED
@@ -731,7 +731,8 @@ var addDefaults = (jsonSchema, zodSchema, refs) => {
731
731
  if (jsonSchema.default !== void 0) {
732
732
  if (jsonSchema.default === null) {
733
733
  const inAnyOfOrOneOf = refs?.path.some((segment) => segment === "anyOf" || segment === "oneOf");
734
- if (inAnyOfOrOneOf && jsonSchema.type && jsonSchema.type !== "null" && !jsonSchema.nullable) {
734
+ if (inAnyOfOrOneOf && jsonSchema.type && jsonSchema.type !== "null" && // @ts-ignore: `nullable` is not publicly available in Zod 4
735
+ !jsonSchema.nullable) {
735
736
  return zodSchema;
736
737
  }
737
738
  }
package/dist/index.js CHANGED
@@ -695,7 +695,8 @@ var addDefaults = (jsonSchema, zodSchema, refs) => {
695
695
  if (jsonSchema.default !== void 0) {
696
696
  if (jsonSchema.default === null) {
697
697
  const inAnyOfOrOneOf = refs?.path.some((segment) => segment === "anyOf" || segment === "oneOf");
698
- if (inAnyOfOrOneOf && jsonSchema.type && jsonSchema.type !== "null" && !jsonSchema.nullable) {
698
+ if (inAnyOfOrOneOf && jsonSchema.type && jsonSchema.type !== "null" && // @ts-ignore: `nullable` is not publicly available in Zod 4
699
+ !jsonSchema.nullable) {
699
700
  return zodSchema;
700
701
  }
701
702
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/json-schema-to-zod",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -27,16 +27,18 @@
27
27
  "tsup": "^8.5.0",
28
28
  "typescript": "^5.9.2",
29
29
  "vitest": "^3.2.4",
30
- "zod-to-json-schema": "^3.24.5",
31
- "zod": "3.25.76"
30
+ "zod": "^4.1.0"
32
31
  },
33
32
  "peerDependencies": {
34
- "zod": ">=3.25.76 <5"
33
+ "zod": ">=3.25.76 <4 || >=4.1 <5"
35
34
  },
36
35
  "scripts": {
37
36
  "clean": "git clean -xdf node_modules",
38
37
  "build": "tsup",
39
- "test": "vitest run"
38
+ "test": "vitest run",
39
+ "typecheck:src": "tsc --noEmit -p ./tsconfig.src.json",
40
+ "typecheck:test": "tsc --noEmit -p ./tsconfig.test.json",
41
+ "typecheck": "pnpm run typecheck:src && pnpm run typecheck:test"
40
42
  },
41
43
  "types": "dist/index.d.ts"
42
44
  }