refactor(utils): replace MONTH_NAMES array, drop @uiw/color-convert, use z.enum for localeSchema

Finding 1: Replace hand-rolled MONTH_NAMES[12] array with Intl.DateTimeFormat("en-US", {month:"long"}).
Finding 2: Drop @uiw/color-convert fallback — parseColorString already rejects the same inputs, return "#000000" instead. Remove dep from utils and server package.json.
Finding 3: Replace 56 z.literal calls in z.union with z.enum([...]); identical parse behavior and inferred type.

Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
Amruth Pillai
2026-07-04 20:53:51 +02:00
parent 5226f04e86
commit a5935dee0f
7 changed files with 70 additions and 86 deletions
-6
View File
@@ -165,9 +165,6 @@ importers:
'@t3-oss/env-core':
specifier: ^0.13.11
version: 0.13.11(typescript@6.0.3)(zod@4.4.3)
'@uiw/color-convert':
specifier: ^2.10.3
version: 2.10.3(@babel/runtime@7.29.7)
ai:
specifier: ^7.0.15
version: 7.0.15(zod@4.4.3)
@@ -1092,9 +1089,6 @@ importers:
'@sindresorhus/slugify':
specifier: ^3.0.0
version: 3.0.0
'@uiw/color-convert':
specifier: ^2.10.3
version: 2.10.3(@babel/runtime@7.29.7)
clsx:
specifier: ^2.1.1
version: 2.1.1