refactor(utils→import): move single-consumer date/html/level helpers, inline field into fonts

Finding 4 — consumer-count verification:
  @reactive-resume/utils/date  → 1 consumer (packages/import/src/json-resume.tsx)
  @reactive-resume/utils/html  → 1 consumer (packages/import/src/json-resume.tsx)
  @reactive-resume/utils/level → 1 consumer (packages/import/src/json-resume.tsx)
  @reactive-resume/utils/url   → 4 consumers (auth, api/ai, import, server) — SKIPPED, stays in utils
  @reactive-resume/utils/field → 1 consumer (packages/fonts/src/index.ts)

Move date/html/level source + test files into packages/import and update json-resume.tsx imports.
Inline the two-line unique() helper into fonts/src/index.ts and drop the ./field subpath.
Drop the three moved subpaths from packages/utils exports.

Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
Amruth Pillai
2026-07-04 20:55:22 +02:00
parent a5935dee0f
commit 493ef12a9a
10 changed files with 7 additions and 11 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
import type { Locale, Script } from "@reactive-resume/utils/locale";
import { unique } from "@reactive-resume/utils/field";
import { getLocaleScript, isCjkScript } from "@reactive-resume/utils/locale";
// ponytail: inlined from @reactive-resume/utils/field (sole consumer)
const unique = <T>(items: T[]): T[] => [...new Set(items)];
import webFontListJSON from "./webfontlist.json";
type FontCategory = "display" | "handwriting" | "monospace" | "serif" | "sans-serif";