diff --git a/app/routes/$handle+/posts.$id.edit/route.tsx b/app/routes/$handle+/posts.$id.edit/route.tsx index 19658d8..a7683f9 100644 --- a/app/routes/$handle+/posts.$id.edit/route.tsx +++ b/app/routes/$handle+/posts.$id.edit/route.tsx @@ -4,7 +4,7 @@ import { getTextareaProps, useForm, } from '@conform-to/react' -import { parseWithZod } from '@conform-to/zod' +import { parseWithZod } from '@conform-to/zod/v4' import { ArrowLeftIcon } from 'lucide-react' import { data, Form, href, Link, redirect, useNavigation } from 'react-router' import { z } from 'zod' @@ -20,11 +20,9 @@ const schema = z.discriminatedUnion('intent', [ }), z.object({ intent: z.literal('update'), - title: z - .string({ required_error: '必須です' }) - .max(60, 'タイトルは60字までです。'), + title: z.string({ error: '必須です' }).max(60, 'タイトルは60字までです。'), content: z - .string({ required_error: '必須です' }) + .string({ error: '必須です' }) .max(14000, '最大文字数に達しました 14000 / 14000 字'), }), ]) diff --git a/app/routes/welcome+/create_account/route.tsx b/app/routes/welcome+/create_account/route.tsx index 7b4cde2..37dc90e 100644 --- a/app/routes/welcome+/create_account/route.tsx +++ b/app/routes/welcome+/create_account/route.tsx @@ -1,5 +1,5 @@ import { getFormProps, getInputProps, useForm } from '@conform-to/react' -import { parseWithZod } from '@conform-to/zod' +import { parseWithZod } from '@conform-to/zod/v4' import { FrownIcon } from 'lucide-react' import { Form, redirect } from 'react-router' import { z } from 'zod' @@ -12,7 +12,7 @@ import type { Route } from './+types/route' const schema = z.object({ handle: z - .string({ required_error: 'ハンドルネームは必須です' }) + .string({ error: 'ハンドルネームは必須です' }) .min(3, '最低3文字必要です') .max(20, '最大20文字までです') .regex( diff --git a/biome.json b/biome.json index 5051dc8..175d052 100644 --- a/biome.json +++ b/biome.json @@ -1,25 +1,24 @@ { - "$schema": "https://biomejs.dev/schemas/2.1.3/schema.json", - "assist": { "actions": { "source": { "organizeImports": "on" } } }, - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "correctness": { - "noUnusedVariables": { - "level": "warn", - "options": { - "ignoreRestSiblings": true - } - } - } - }, - "includes": ["**", "!**/build"] - - } + "$schema": "https://biomejs.dev/schemas/2.1.3/schema.json", + "assist": { "actions": { "source": { "organizeImports": "on" } } }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedVariables": { + "level": "warn", + "options": { + "ignoreRestSiblings": true + } + } + } + }, + "includes": ["**", "!**/build"] + } } diff --git a/package.json b/package.json index 11d13ac..2f47543 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ "start": "npx sirv-cli build/client/ --single" }, "dependencies": { - "@conform-to/react": "^1.8.2", - "@conform-to/zod": "^1.8.2", + "@conform-to/react": "^1.9.1", + "@conform-to/zod": "^1.9.1", "@react-router/node": "7.7.1", "@tailwindcss/vite": "^4.1.11", "class-variance-authority": "^0.7.1", @@ -39,8 +39,7 @@ "sonner": "^2.0.6", "tailwind-merge": "^3.3.1", "tailwindcss-animate": "^1.0.7", - "zod": "^3.25.64", - "zodix": "^0.4.4" + "zod": "^4.1.8" }, "devDependencies": { "@biomejs/biome": "^2.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe364c8..63e4289 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@conform-to/react': - specifier: ^1.8.2 - version: 1.8.2(react@19.1.1) + specifier: ^1.9.1 + version: 1.9.1(react@19.1.1) '@conform-to/zod': - specifier: ^1.8.2 - version: 1.8.2(zod@3.25.64) + specifier: ^1.9.1 + version: 1.9.1(zod@4.1.8) '@react-router/node': specifier: 7.7.1 version: 7.7.1(react-router@7.7.1(react-dom@19.1.1(react@19.1.1))(react@19.1.1))(typescript@5.8.3) @@ -81,11 +81,8 @@ importers: specifier: ^1.0.7 version: 1.0.7(tailwindcss@4.1.11) zod: - specifier: ^3.25.64 - version: 3.25.64 - zodix: - specifier: ^0.4.4 - version: 0.4.4(@remix-run/server-runtime@2.13.1(typescript@5.8.3))(zod@3.25.64) + specifier: ^4.1.8 + version: 4.1.8 devDependencies: '@biomejs/biome': specifier: ^2.1.3 @@ -344,16 +341,16 @@ packages: resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} - '@conform-to/dom@1.8.2': - resolution: {integrity: sha512-5eDqI9366+23Fl/E5zxebuy2FCebJKpSrdE/c6PZQ5Ul59BYQ17pBmkLkvxAKjPXW+Qq77BJyjGjuklwmqN08A==} + '@conform-to/dom@1.9.1': + resolution: {integrity: sha512-TSvGakMrNZ9pp9Lzt2MGsPtiU1oeGZG0rRW65Rej43w2zqeP2pNibXvLdTCd1BHUweTlPLDHSPP79KT02pFtUA==} - '@conform-to/react@1.8.2': - resolution: {integrity: sha512-AJuHH4YY64o+VP3qsXd7bqlqCJYefTcEVj6mOiQr/m9iQV785gPtGE31jdmipvQ3ZHQE0Lp4e4th7kN/xo46qg==} + '@conform-to/react@1.9.1': + resolution: {integrity: sha512-D51h80DhImr+7ReiU44+Ob3/njBu3iVlvIJNZHbTkuratLfpGdYzlXc53n0/Y/KDd5kL+GfqlGXmKaDDxBA33Q==} peerDependencies: react: '>=18' - '@conform-to/zod@1.8.2': - resolution: {integrity: sha512-uYipAoNByusRji7j84o40r9IvYmsV84utfCfvqr2b746/8JnBuoO6C90yltan5D9OVAJMIKejXW4T1XfOsaMWg==} + '@conform-to/zod@1.9.1': + resolution: {integrity: sha512-UHrylJlEMLwZFZ0fXl+5jeizkZDmW9YIVo7pXmRjERhgpVLb34wWaSUOBv2Q83nmgpWIMKCHIP3Bc79lIno77A==} peerDependencies: zod: ^3.21.0 || ^4.0.0 @@ -1766,19 +1763,6 @@ packages: typescript: optional: true - '@remix-run/router@1.20.0': - resolution: {integrity: sha512-mUnk8rPJBI9loFDZ+YzPGdeniYK+FTmRD1TMCz7ev2SNIozyKKpnGgsxO34u6Z4z/t0ITuu7voi/AshfsGsgFg==} - engines: {node: '>=14.0.0'} - - '@remix-run/server-runtime@2.13.1': - resolution: {integrity: sha512-2DfBPRcHKVzE4bCNsNkKB50BhCCKF73x+jiS836OyxSIAL+x0tguV2AEjmGXefEXc5AGGzoxkus0AUUEYa29Vg==} - engines: {node: '>=18.0.0'} - peerDependencies: - typescript: ^5.1.0 - peerDependenciesMeta: - typescript: - optional: true - '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -1997,9 +1981,6 @@ packages: '@types/caseless@0.12.5': resolution: {integrity: sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==} - '@types/cookie@0.6.0': - resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - '@types/debug@4.1.12': resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} @@ -2056,9 +2037,6 @@ packages: '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - '@web3-storage/multipart-parser@1.0.0': - resolution: {integrity: sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw==} - abbrev@3.0.1: resolution: {integrity: sha512-AO2ac6pjRB3SJmGJo+v5/aK6Omggp6fsLrs6wN9bd35ulu4cCwaAU9+7ZhXjeqHVkaHThLuzH0nZr0YpCDhygg==} engines: {node: ^18.17.0 || >=20.5.0} @@ -2524,10 +2502,6 @@ packages: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.6.0: - resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} - engines: {node: '>= 0.6'} - cookie@0.7.1: resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} @@ -4999,10 +4973,6 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} - source-map@0.7.6: - resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} - engines: {node: '>= 12'} - space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} @@ -5254,9 +5224,6 @@ packages: resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} engines: {node: '>=0.6.x'} - turbo-stream@2.4.0: - resolution: {integrity: sha512-FHncC10WpBd2eOmGwpmQsWLDoK4cqsA/UT/GqNoaKOQnT8uzhtCbg3EoUDMvqpOSAI0S26mr0rkjzbOO6S3v1g==} - type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -5660,14 +5627,11 @@ packages: peerDependencies: zod: ^3.24.1 - zod@3.25.64: - resolution: {integrity: sha512-hbP9FpSZf7pkS7hRVUrOjhwKJNyampPgtXKc3AN6DsWtoHsg2Sb4SQaS4Tcay380zSwd2VPo9G9180emBACp5g==} + zod@3.25.76: + resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} - zodix@0.4.4: - resolution: {integrity: sha512-msoW2RM8t0ktSKmQYT7/AjsGTqzWHeEwY+U/6w7Jzd29yoeh/QceseQG8PBb5lpY4KUUowMsYRWm926vGrwrdQ==} - peerDependencies: - '@remix-run/server-runtime': 1.x || 2.x - zod: 3.x + zod@4.1.8: + resolution: {integrity: sha512-5R1P+WwQqmmMIEACyzSvo4JXHY5WiAFHRMg+zBZKgKS+Q1viRa0C1hmUKtHltoIFKtIdki3pRxkmpP74jnNYHQ==} zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -5912,17 +5876,17 @@ snapshots: '@colors/colors@1.6.0': {} - '@conform-to/dom@1.8.2': {} + '@conform-to/dom@1.9.1': {} - '@conform-to/react@1.8.2(react@19.1.1)': + '@conform-to/react@1.9.1(react@19.1.1)': dependencies: - '@conform-to/dom': 1.8.2 + '@conform-to/dom': 1.9.1 react: 19.1.1 - '@conform-to/zod@1.8.2(zod@3.25.64)': + '@conform-to/zod@1.9.1(zod@4.1.8)': dependencies: - '@conform-to/dom': 1.8.2 - zod: 3.25.64 + '@conform-to/dom': 1.9.1 + zod: 4.1.8 '@dabh/diagnostics@2.0.3': dependencies: @@ -6622,8 +6586,8 @@ snapshots: express-rate-limit: 7.5.1(express@5.1.0) pkce-challenge: 5.0.0 raw-body: 3.0.0 - zod: 3.25.64 - zod-to-json-schema: 3.24.6(zod@3.25.64) + zod: 3.25.76 + zod-to-json-schema: 3.24.6(zod@3.25.76) transitivePeerDependencies: - supports-color @@ -7523,20 +7487,6 @@ snapshots: optionalDependencies: typescript: 5.8.3 - '@remix-run/router@1.20.0': {} - - '@remix-run/server-runtime@2.13.1(typescript@5.8.3)': - dependencies: - '@remix-run/router': 1.20.0 - '@types/cookie': 0.6.0 - '@web3-storage/multipart-parser': 1.0.0 - cookie: 0.6.0 - set-cookie-parser: 2.7.1 - source-map: 0.7.6 - turbo-stream: 2.4.0 - optionalDependencies: - typescript: 5.8.3 - '@rollup/pluginutils@5.1.4(rollup@4.46.2)': dependencies: '@types/estree': 1.0.8 @@ -7692,8 +7642,6 @@ snapshots: '@types/caseless@0.12.5': {} - '@types/cookie@0.6.0': {} - '@types/debug@4.1.12': dependencies: '@types/ms': 2.1.0 @@ -7749,8 +7697,6 @@ snapshots: '@ungap/structured-clone@1.3.0': {} - '@web3-storage/multipart-parser@1.0.0': {} - abbrev@3.0.1: optional: true @@ -8273,8 +8219,6 @@ snapshots: cookie-signature@1.2.2: {} - cookie@0.6.0: {} - cookie@0.7.1: {} cookie@0.7.2: {} @@ -8934,8 +8878,8 @@ snapshots: winston-transport: 4.9.0 ws: 7.5.10 yaml: 2.8.0 - zod: 3.25.64 - zod-to-json-schema: 3.24.6(zod@3.25.64) + zod: 3.25.76 + zod-to-json-schema: 3.24.6(zod@3.25.76) transitivePeerDependencies: - '@types/node' - bufferutil @@ -11389,8 +11333,6 @@ snapshots: source-map@0.7.4: {} - source-map@0.7.6: {} - space-separated-tokens@2.0.2: {} spdx-correct@3.2.0: @@ -11682,8 +11624,6 @@ snapshots: tsscmp@1.0.6: {} - turbo-stream@2.4.0: {} - type-fest@0.20.2: {} type-fest@0.21.3: {} @@ -12139,15 +12079,12 @@ snapshots: compress-commons: 6.0.2 readable-stream: 4.7.0 - zod-to-json-schema@3.24.6(zod@3.25.64): + zod-to-json-schema@3.24.6(zod@3.25.76): dependencies: - zod: 3.25.64 + zod: 3.25.76 - zod@3.25.64: {} + zod@3.25.76: {} - zodix@0.4.4(@remix-run/server-runtime@2.13.1(typescript@5.8.3))(zod@3.25.64): - dependencies: - '@remix-run/server-runtime': 2.13.1(typescript@5.8.3) - zod: 3.25.64 + zod@4.1.8: {} zwitch@2.0.4: {} diff --git a/react-router.config.ts b/react-router.config.ts index eab6570..949bf87 100644 --- a/react-router.config.ts +++ b/react-router.config.ts @@ -4,5 +4,6 @@ export default { ssr: false, future: { unstable_middleware: true, + unstable_optimizeDeps: true, }, } satisfies Config