Amruth Pillai
|
afd734dd61
|
refactor(import): add v4section/v4url aliases, inline clamp wrappers, replace classes with fns
Finding 5: Introduce V4Url + V4Section<T> type aliases in reactive-resume-v4-json.tsx; collapse
310-line V4ResumeData type (13x 5-field section header, 11x {label,href}) into typed aliases.
Inferred shape is structurally identical.
Finding 6: Remove 9 single-caller clamp/pxToPt wrappers; replace compile-time constants
(rotation=0, sidebarWidth=35, shadowWidth=0, gapX=4, gapY=6) with literals; inline dynamic
calls (clamp(x, 32, 512) etc.) at the two body/heading typography call sites.
Finding 7: Convert three stateless single-method importer classes to plain functions.
Extract shared rethrowAsImportError() to error.ts, replacing triplicated ZodError catch blocks.
Update web import dialog + all in-package test files to use function API.
Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
|
2026-07-04 21:02:17 +02:00 |
|
Amruth Pillai
|
493ef12a9a
|
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
|
2026-07-04 20:55:22 +02:00 |
|