Skip to content

Commit ee6b5f4

Browse files
committed
Add analytics. Add es locale.
1 parent 4c1bde2 commit ee6b5f4

6 files changed

Lines changed: 45 additions & 11 deletions

File tree

packages/core/src/errors.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,7 @@ export interface $ZodError<T = unknown> extends Error {
175175
name: string;
176176
}
177177
export class $ZodError<T = unknown> implements Error {
178-
/** @deprecated Virtual property, do not access. */
179-
180178
public issues: $ZodIssue[];
181-
182-
// stack?: string;
183-
184179
get message(): string {
185180
return JSON.stringify(this.issues, jsonStringifyReplacer, 2);
186181
}

packages/core/src/locales.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import en from "./locales/en.js";
2-
3-
export { en };
2+
import es from "./locales/es.js";
3+
export { en, es };

packages/docs/app/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { InkeepBubble } from "@/components/inkeep-bubble";
22
import InkeepSearchBox from "@/components/inkeep-search";
33

44
import "./global.css";
5+
import { Analytics } from "@vercel/analytics/react";
56
import { RootProvider } from "fumadocs-ui/provider";
67
import { Inter } from "next/font/google";
78
import type { ReactNode } from "react";
@@ -15,6 +16,7 @@ export default function Layout({ children }: { children: ReactNode }) {
1516
<html lang="en" className={inter.className} suppressHydrationWarning>
1617
<body className="flex flex-col min-h-screen">
1718
<InkeepBubble />
19+
<Analytics />
1820
<RootProvider
1921
search={{
2022
enabled: true,

packages/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dependencies": {
1212
"@inkeep/cxkit-react": "^0.5.52",
1313
"@radix-ui/react-accordion": "^1.2.4",
14+
"@vercel/analytics": "^1.5.0",
1415
"@vercel/og": "^0.6.8",
1516
"fumadocs-core": "15.1.0",
1617
"fumadocs-mdx": "11.5.6",

play.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import * as z from "zod";
22

3-
const Schema = z.object({
4-
limit: z.int().default(0),
5-
});
6-
type Schema = z.infer<typeof Schema>;
3+
z.config(z.locales.es());
4+
5+
const result = z.string().safeParse(123);
6+
7+
result.error!.issues[0].message;
8+
// => Entrada inválida: se esperaba string, recibido número

pnpm-lock.yaml

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)