Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "zod", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Typescript-first schema declaration and validation library with static type inference", | ||
"main": "index.ts", | ||
"main": "./lib/main.js", | ||
"types": "./lib/main.d.ts", | ||
"files": [ | ||
"lib" | ||
], | ||
"repository": { | ||
@@ -32,5 +36,28 @@ "type": "git", | ||
], | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"**/__tests__/*" | ||
], | ||
"scripts": { | ||
"clean": "rm -rf lib/*", | ||
"build": "yarn run clean && tsc", | ||
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", | ||
"lint": "tslint -p tsconfig.json", | ||
"test": "jest --config jestconfig.json", | ||
"prepare": "npm run build", | ||
"play": "nodemon -e ts -w . -x ts-node playground.ts" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^25.1.4", | ||
"jest": "^25.1.0", | ||
"nodemon": "^2.0.2", | ||
"prettier": "^1.19.1", | ||
"ts-jest": "^25.2.1", | ||
"tslint": "^6.1.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.8.3" | ||
} | ||
} |
@@ -180,3 +180,3 @@ ### Table of contents | ||
F.parse(undefined); // => undefined | ||
F.parse(null); // => 42 | ||
F.parse(null); // => null | ||
F.parse({}); // => throws Error! | ||
@@ -266,8 +266,8 @@ | ||
const Category: z.ZodType<Category> = z.lazy(() => { | ||
return z.object({ | ||
const Category: z.ZodType<Category> = z.lazy(() => | ||
z.object({ | ||
name: z.string(), | ||
subcategories: z.array(Category), | ||
}); | ||
}); | ||
}) | ||
); | ||
@@ -296,4 +296,4 @@ Category.parse({ | ||
const args = z.tuple([ | ||
z.object({ nameStartsWith: z.string() }), | ||
z.object({ skip: z.number(), limit: z.number() }), | ||
z.object({ nameStartsWith: z.string() }), // filters | ||
z.object({ skip: z.number(), limit: z.number() }), // pagination | ||
]); | ||
@@ -340,3 +340,5 @@ | ||
} | ||
); // => returns { id: string; name: string; }[] | ||
); | ||
// `typeof users` => { id: string; name: string; }[] | ||
``` | ||
@@ -343,0 +345,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79245
57
1144
433
8
1