Updated libs - Updated Zod v3 to v4.

This commit is contained in:
2025-06-10 21:06:54 +02:00
parent 0efe5bfa9e
commit 984c386588
5 changed files with 25 additions and 15 deletions
+18 -9
View File
@@ -8,7 +8,7 @@
"name": "somniarooms", "name": "somniarooms",
"version": "0.0.0", "version": "0.0.0",
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.10.0", "@hookform/resolvers": "^5.1.1",
"@radix-ui/react-checkbox": "^1.3.2", "@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dropdown-menu": "^2.1.15", "@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.7", "@radix-ui/react-label": "^2.1.7",
@@ -30,7 +30,7 @@
"react-router-dom": "^6.23.0", "react-router-dom": "^6.23.0",
"swr": "^2.2.5", "swr": "^2.2.5",
"tailwind-merge": "^3.3.0", "tailwind-merge": "^3.3.0",
"zod": "^3.25.56", "zod": "^3.25.57",
"zustand": "^4.5.2" "zustand": "^4.5.2"
}, },
"devDependencies": { "devDependencies": {
@@ -747,12 +747,15 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@hookform/resolvers": { "node_modules/@hookform/resolvers": {
"version": "3.10.0", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.10.0.tgz", "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-5.1.1.tgz",
"integrity": "sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag==", "integrity": "sha512-J/NVING3LMAEvexJkyTLjruSm7aOFx7QX21pzkiJfMoNG0wl5aFEjLTl7ay7IQb9EWY6AkrBy7tHL2Alijpdcg==",
"license": "MIT", "license": "MIT",
"dependencies": {
"@standard-schema/utils": "^0.3.0"
},
"peerDependencies": { "peerDependencies": {
"react-hook-form": "^7.0.0" "react-hook-form": "^7.55.0"
} }
}, },
"node_modules/@humanfs/core": { "node_modules/@humanfs/core": {
@@ -1968,6 +1971,12 @@
"win32" "win32"
] ]
}, },
"node_modules/@standard-schema/utils": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",
"integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",
"license": "MIT"
},
"node_modules/@swc/core": { "node_modules/@swc/core": {
"version": "1.11.31", "version": "1.11.31",
"resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.31.tgz", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.31.tgz",
@@ -5092,9 +5101,9 @@
} }
}, },
"node_modules/zod": { "node_modules/zod": {
"version": "3.25.56", "version": "3.25.57",
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.56.tgz", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.57.tgz",
"integrity": "sha512-rd6eEF3BTNvQnR2e2wwolfTmUTnp70aUTqr0oaGbHifzC3BKJsoV+Gat8vxUMR1hwOKBs6El+qWehrHbCpW6SQ==", "integrity": "sha512-6tgzLuwVST5oLUxXTmBqoinKMd3JeesgbgseXeFasKKj8Q1FCZrHnbqJOyiEvr4cVAlbug+CgIsmJ8cl/pU5FA==",
"license": "MIT", "license": "MIT",
"funding": { "funding": {
"url": "https://github.com/sponsors/colinhacks" "url": "https://github.com/sponsors/colinhacks"
+2 -2
View File
@@ -11,7 +11,7 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.10.0", "@hookform/resolvers": "^5.1.1",
"@radix-ui/react-checkbox": "^1.3.2", "@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dropdown-menu": "^2.1.15", "@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.7", "@radix-ui/react-label": "^2.1.7",
@@ -33,7 +33,7 @@
"react-router-dom": "^6.23.0", "react-router-dom": "^6.23.0",
"swr": "^2.2.5", "swr": "^2.2.5",
"tailwind-merge": "^3.3.0", "tailwind-merge": "^3.3.0",
"zod": "^3.25.56", "zod": "^3.25.57",
"zustand": "^4.5.2" "zustand": "^4.5.2"
}, },
"devDependencies": { "devDependencies": {
+2 -1
View File
@@ -61,10 +61,11 @@ function RoomBooking({
const totalSelected = () => { const totalSelected = () => {
let sum = 0; let sum = 0;
bookingRooms && if (bookingRooms) {
bookingRooms.rooms bookingRooms.rooms
.filter((v) => v.roomCategory == roomCategoryId) .filter((v) => v.roomCategory == roomCategoryId)
.forEach((v) => (sum += v.amount)); .forEach((v) => (sum += v.amount));
}
return sum; return sum;
}; };
const canAddMore: boolean = availableAmount > totalSelected(); const canAddMore: boolean = availableAmount > totalSelected();
+2 -2
View File
@@ -1,10 +1,10 @@
"use client"; "use client";
import { z } from "zod"; import { z } from "zod/v4";
export const BookingFormSchema = z.object({ export const BookingFormSchema = z.object({
name: z.string().min(2).max(50), name: z.string().min(2).max(50),
surname: z.string().min(2).max(50), surname: z.string().min(2).max(50),
email: z.string().email(), email: z.email(),
phone: z.string().min(8), phone: z.string().min(8),
}); });
+1 -1
View File
@@ -17,7 +17,7 @@ import { useAppStore } from "@/store";
import { useState } from "react"; import { useState } from "react";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { z } from "zod"; import { z } from "zod/v4";
import { zodResolver } from "@hookform/resolvers/zod"; import { zodResolver } from "@hookform/resolvers/zod";
enum PageState { enum PageState {