Skip to content

Commit

Permalink
version 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-bailly committed Sep 3, 2023
1 parent 6d69827 commit 90402af
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@miroir-framework/jzod",
"private": false,
"version": "0.1.2",
"version": "0.5.0",
"description": "The Json bootstrapper for Zod.",
"main": "dist/bundle.js",
"types": "dist/bundle.d.ts",
Expand All @@ -21,7 +21,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@babel/preset-env": "^7.22.5",
"@jest/globals": "^29.3.1",
"@miroir-framework/jzod-ts": "0.1.2",
"@miroir-framework/jzod-ts": "0.5.0",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-json": "^6.0.0",
"@types/jest": "^29.2.4",
Expand Down
6 changes: 3 additions & 3 deletions src/ZodToJzod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const zodToJzod = (zod: ZodTypeAny, identifier: string): JzodElement => {

const isStrict = zod._def["unknownKeys"] === "strict";

console.log("isStrict",isStrict, zod._def["unknownKeys"]);
// console.log("isStrict",isStrict, zod._def["unknownKeys"]);

const propertiesJzodSchema = properties.map(([key, value]) => {
const nextZodNode = value as ZodTypeAny;
Expand Down Expand Up @@ -103,7 +103,7 @@ export const zodToJzod = (zod: ZodTypeAny, identifier: string): JzodElement => {
break;
}
case "ZodOptional": {
console.log("zodToJzod ZodOptional", typeName, JSON.stringify(zod));
// console.log("zodToJzod ZodOptional", typeName, JSON.stringify(zod));

const jzodDefinition = { ...zodToJzod(zod._def.innerType, identifier), optional: true };
return jzodDefinition;
Expand All @@ -115,7 +115,7 @@ export const zodToJzod = (zod: ZodTypeAny, identifier: string): JzodElement => {
break;
}
case "ZodUnion": {
console.log("zodToJzod converting ZodUnion", JSON.stringify(zod));
// console.log("zodToJzod converting ZodUnion", JSON.stringify(zod));

const jzodUnionElements: JzodElement[] = zod._def.options.map((option: ZodTypeAny) =>
zodToJzod(option, identifier)
Expand Down
2 changes: 1 addition & 1 deletion tests/jzod.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ describe(
]),
"test20"
);
console.log("Zod to Jzod testJzodSchema test20",JSON.stringify(test20));
// console.log("Zod to Jzod testJzodSchema test20",JSON.stringify(test20));

expect(
test20
Expand Down

0 comments on commit 90402af

Please sign in to comment.