New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zod

Package Overview
Dependencies
Maintainers
2
Versions
372
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zod - npm Package Compare versions

Comparing version 3.21.0 to 3.22.0-canary.20230305T082229

8

lib/locales/en.js

@@ -42,3 +42,9 @@ "use strict";

if (typeof issue.validation === "object") {
if ("startsWith" in issue.validation) {
if ("includes" in issue.validation) {
message = `Invalid input: must include "${issue.validation.includes}"`;
if (typeof issue.validation.position === "number") {
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
}
}
else if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;

@@ -45,0 +51,0 @@ }

@@ -122,2 +122,7 @@ import { enumUtil } from "./helpers/enumUtil";

} | {
kind: "includes";
value: string;
position?: number;
message?: string;
} | {
kind: "cuid2";

@@ -181,2 +186,6 @@ message?: string;

regex(regex: RegExp, message?: errorUtil.ErrMessage): ZodString;
includes(value: string, options?: {
message?: string;
position?: number;
}): ZodString;
startsWith(value: string, message?: errorUtil.ErrMessage): ZodString;

@@ -183,0 +192,0 @@ endsWith(value: string, message?: errorUtil.ErrMessage): ZodString;

@@ -74,2 +74,5 @@ import type { TypeOf, ZodType } from ".";

export declare type StringValidation = "email" | "url" | "emoji" | "uuid" | "regex" | "cuid" | "cuid2" | "datetime" | "ip" | {
includes: string;
position?: number;
} | {
startsWith: string;

@@ -76,0 +79,0 @@ } | {

2

package.json
{
"name": "zod",
"version": "3.21.0",
"version": "3.22.0-canary.20230305T082229",
"description": "TypeScript-first schema declaration and validation library with static type inference",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc