Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zod

Package Overview
Dependencies
Maintainers
2
Versions
363
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.4 to 3.21.5-alpha.0

3

lib/helpers/parseUtil.js

@@ -92,3 +92,4 @@ "use strict";

status.dirty();
if (typeof value.value !== "undefined" || pair.alwaysSet) {
if (key.value !== "__proto__" &&
(typeof value.value !== "undefined" || pair.alwaysSet)) {
finalObject[key.value] = value.value;

@@ -95,0 +96,0 @@ }

@@ -70,3 +70,3 @@ import { enumUtil } from "./helpers/enumUtil";

superRefine<RefinedOutput extends Output>(refinement: (arg: Output, ctx: RefinementCtx) => arg is RefinedOutput): ZodEffects<this, RefinedOutput, Input>;
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void): ZodEffects<this, Output, Input>;
superRefine(refinement: (arg: Output, ctx: RefinementCtx) => void | Promise<void>): ZodEffects<this, Output, Input>;
constructor(def: Def);

@@ -622,2 +622,4 @@ optional(): ZodOptional<this>;

export declare class ZodMap<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> extends ZodType<Map<Key["_output"], Value["_output"]>, ZodMapDef<Key, Value>, Map<Key["_input"], Value["_input"]>> {
get keySchema(): Key;
get valueSchema(): Value;
_parse(input: ParseInput): ParseReturnType<this["_output"]>;

@@ -735,3 +737,3 @@ static create: <Key_1 extends ZodTypeAny = ZodTypeAny, Value_1 extends ZodTypeAny = ZodTypeAny>(keyType: Key_1, valueType: Value_1, params?: RawCreateParams) => ZodMap<Key_1, Value_1>;

export declare type Refinement<T> = (arg: T, ctx: RefinementCtx) => any;
export declare type SuperRefinement<T> = (arg: T, ctx: RefinementCtx) => void;
export declare type SuperRefinement<T> = (arg: T, ctx: RefinementCtx) => void | Promise<void>;
export declare type RefinementEffect<T> = {

@@ -747,3 +749,3 @@ type: "refinement";

type: "preprocess";
transform: (arg: T) => any;
transform: (arg: T, ctx: RefinementCtx) => any;
};

@@ -761,3 +763,3 @@ export declare type Effect<T> = RefinementEffect<T> | TransformEffect<T> | PreprocessEffect<T>;

static create: <I extends ZodTypeAny>(schema: I, effect: Effect<I["_output"]>, params?: RawCreateParams) => ZodEffects<I, I["_output"], input<I>>;
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
static createWithPreprocess: <I extends ZodTypeAny>(preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
}

@@ -969,3 +971,3 @@ export { ZodEffects as ZodTransformer };

declare const nullableType: <T extends ZodTypeAny>(type: T, params?: RawCreateParams) => ZodNullable<T>;
declare const preprocessType: <I extends ZodTypeAny>(preprocess: (arg: unknown) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
declare const preprocessType: <I extends ZodTypeAny>(preprocess: (arg: unknown, ctx: RefinementCtx) => unknown, schema: I, params?: RawCreateParams) => ZodEffects<I, I["_output"], unknown>;
declare const pipelineType: typeof ZodPipeline.create;

@@ -972,0 +974,0 @@ declare const ostring: () => ZodOptional<ZodString>;

{
"name": "zod",
"version": "3.21.4",
"version": "3.21.5-alpha.0",
"author": "Colin McDonnell <colin@colinhacks.com>",

@@ -38,9 +38,11 @@ "repository": {

"tsx": "^3.8.0",
"typescript": "~4.5.0"
"typescript": "~4.5.0",
"vitest": "^0.31.4",
"zod": "latest"
},
"exports": {
".": {
"types": "./index.d.ts",
"require": "./lib/index.js",
"import": "./lib/index.mjs",
"types": "./index.d.ts"
"import": "./lib/index.mjs"
},

@@ -75,6 +77,6 @@ "./package.json": "./package.json",

"scripts": {
"prettier:check": "prettier --check src/**/*.ts deno/lib/**/*.ts --no-error-on-unmatched-pattern",
"prettier:fix": "prettier --write src/**/*.ts deno/lib/**/*.ts --ignore-unknown --no-error-on-unmatched-pattern",
"lint:check": "eslint --cache --ext .ts ./src",
"lint:fix": "eslint --cache --fix --ext .ts ./src",
"prettier:check": "prettier --check src/**/*.ts __tests__/**/*.ts deno/lib/**/*.ts --no-error-on-unmatched-pattern",
"prettier:fix": "prettier --write src/**/*.ts __tests__/**/*.ts deno/lib/**/*.ts --ignore-unknown --no-error-on-unmatched-pattern",
"lint:check": "eslint --cache --ext .ts ./src ./__tests__",
"lint:fix": "eslint --cache --fix --ext .ts ./src ./__tests__",
"check": "yarn lint:check && yarn prettier:check",

@@ -96,3 +98,3 @@ "fix": "yarn lint:fix && yarn prettier:fix",

"depcruise": "depcruise -c .dependency-cruiser.js src",
"benchmark": "tsx src/benchmarks/index.ts",
"benchmark": "tsx benchmarks/index.ts",
"prepare": "husky install"

@@ -106,4 +108,3 @@ },

},
"types": "./index.d.ts",
"dependencies": {}
"types": "./index.d.ts"
}

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