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

zod-form-data

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zod-form-data - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5-beta.0

.turbo/turbo-typecheck.log

16

browser/helpers.d.ts
import { z, ZodArray, ZodEffects, ZodNumber, ZodObject, ZodString, ZodTypeAny } from "zod";
declare type InputType<DefaultType extends ZodTypeAny> = {
(): ZodEffects<DefaultType>;
<ProvidedType extends ZodTypeAny>(schema: ProvidedType): ZodEffects<ProvidedType>;
type InputType<DefaultType extends ZodTypeAny> = {
(): ZodEffects<DefaultType, DefaultType["_output"], unknown>;
<ProvidedType extends ZodTypeAny>(schema: ProvidedType): ZodEffects<ProvidedType, ProvidedType["_output"], unknown>;
};

@@ -21,3 +21,3 @@ /**

export declare const numeric: InputType<ZodNumber>;
declare type CheckboxOpts = {
type CheckboxOpts = {
trueValue?: string;

@@ -55,6 +55,6 @@ };

*/
export declare const repeatableOfType: <T extends z.ZodTypeAny>(schema: T) => z.ZodEffects<z.ZodArray<T, "many">, T["_output"][], T["_input"][]>;
declare type FormDataType = {
<T extends z.ZodRawShape>(shape: T): ZodEffects<ZodObject<T>>;
<T extends z.ZodTypeAny>(schema: T): ZodEffects<T>;
export declare const repeatableOfType: <T extends z.ZodTypeAny>(schema: T) => z.ZodEffects<z.ZodArray<T, "many">, T["_output"], unknown>;
type FormDataType = {
<T extends z.ZodRawShape>(shape: T): ZodEffects<ZodObject<T>, ZodObject<T>["_output"], unknown>;
<T extends z.ZodTypeAny>(schema: T): ZodEffects<T, T["_output"], unknown>;
};

@@ -61,0 +61,0 @@ export declare const json: <T extends z.ZodTypeAny>(schema: T) => z.ZodEffects<T, T["_output"], T["_input"]>;

@@ -1,2 +0,2 @@

import { setPath } from "setGet";
import { setPath } from "set-get";
import { z, ZodType, } from "zod";

@@ -3,0 +3,0 @@ const stripEmpty = z.literal("").transform(() => undefined);

{
"name": "zod-form-data",
"version": "1.2.4",
"browser": "./dist/zod-form-data.cjs.js",
"main": "./dist/zod-form-data.umd.js",
"module": "./dist/zod-form-data.es.js",
"types": "./dist/types/index.d.ts",
"version": "1.2.5-beta.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"types": "./dist/index.d.ts",
"license": "MIT",

@@ -14,5 +13,6 @@ "repository": {

"scripts": {
"dev": "tsc --module ESNext --outDir ./browser --watch",
"build": "vite build",
"prepublishOnly": "npm run build"
"dev": "tsup --watch",
"build": "tsup",
"prepublishOnly": "npm run build",
"typecheck": "tsc --noEmit"
},

@@ -25,2 +25,3 @@ "peerDependencies": {

"tsconfig": "*",
"tsup-config": "*",
"typescript": "^4.8.4",

@@ -27,0 +28,0 @@ "zod": "^3.11.6"

@@ -5,3 +5,3 @@ # zod-form-data

specifically for parsing `FormData` or `URLSearchParams`.
This is particularly useful when using [remix](https://github.com/remix-run/remix)
This is particularly useful when using [Remix](https://github.com/remix-run/remix)
and combos well with [remix-validated-form](https://github.com/airjp73/remix-validated-form).

@@ -24,3 +24,3 @@

// This example is using `remix`, but it will work
// This example is using Remix, but it will work
// with any `FormData` or `URLSearchParams` no matter where you get it from.

@@ -27,0 +27,0 @@ export const action = async ({ request }) => {

@@ -14,6 +14,8 @@ import { setPath } from "set-get";

type InputType<DefaultType extends ZodTypeAny> = {
(): ZodEffects<DefaultType>;
<ProvidedType extends ZodTypeAny>(
schema: ProvidedType
): ZodEffects<ProvidedType>;
(): ZodEffects<DefaultType, DefaultType["_output"], unknown>;
<ProvidedType extends ZodTypeAny>(schema: ProvidedType): ZodEffects<
ProvidedType,
ProvidedType["_output"],
unknown
>;
};

@@ -114,3 +116,4 @@

schema: T
): ZodEffects<ZodArray<T>> => repeatable(z.array(schema));
): ZodEffects<ZodArray<T>, T["_output"], unknown> =>
repeatable(z.array(schema));

@@ -120,4 +123,8 @@ const entries = z.array(z.tuple([z.string(), z.any()]));

type FormDataType = {
<T extends z.ZodRawShape>(shape: T): ZodEffects<ZodObject<T>>;
<T extends z.ZodTypeAny>(schema: T): ZodEffects<T>;
<T extends z.ZodRawShape>(shape: T): ZodEffects<
ZodObject<T>,
ZodObject<T>["_output"],
unknown
>;
<T extends z.ZodTypeAny>(schema: T): ZodEffects<T, T["_output"], unknown>;
};

@@ -124,0 +131,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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