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

zod-internationalization

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zod-internationalization - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

lib/helpers/parseUtil.d.ts

@@ -8,3 +8,3 @@ import type { IssueData, ZodErrorMap, ZodInternationalization, ZodIssue } from "../ZodError";

issueData: IssueData;
internationalizationOptions: ZodInternationalization;
internationalization: ZodInternationalization;
}) => ZodIssue;

@@ -11,0 +11,0 @@ export declare type ParseParams = {

@@ -11,3 +11,3 @@ "use strict";

const makeIssue = (params) => {
const { data, path, errorMaps, issueData, internationalizationOptions } = params;
const { data, path, errorMaps, issueData, internationalization } = params;
const fullPath = [...path, ...(issueData.path || [])];

@@ -18,2 +18,3 @@ const fullIssue = {

};
const internationalizationOptions = internationalization();
if (issueData.message !== undefined) {

@@ -66,3 +67,3 @@ let message = issueData.message;

].filter((x) => !!x),
internationalizationOptions: (0, i18n_1.getInternationalization)(),
internationalization: (0, i18n_1.getInternationalization)(),
});

@@ -69,0 +70,0 @@ ctx.common.issues.push(issue);

@@ -7,6 +7,6 @@ "use strict";

const external_1 = require("./external");
let internationalization = undefined;
let internationalization = () => undefined;
let internationalizationErrorMap = errors_1.defaultErrorMap;
function setInternationalization(options) {
internationalization = options;
internationalization = () => options;
internationalizationErrorMap = (0, exports.makeZodI18nMap)({

@@ -13,0 +13,0 @@ t: options.t,

@@ -165,3 +165,3 @@ import type { TypeOf, ZodType } from ".";

};
export declare type ZodInternationalization = ZodInternationalizationOptions | undefined;
export declare type ZodInternationalization = () => ZodInternationalizationOptions | undefined;
export declare type ZodInternationalizationOptions = {

@@ -168,0 +168,0 @@ overRideMessages: boolean;

{
"name": "zod-internationalization",
"version": "1.0.1",
"version": "1.0.2",
"author": "Colin McDonnell <colin@colinhacks.com>",

@@ -5,0 +5,0 @@ "repository": {

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

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