Files
zernonia 2ddedc02f3 fix(cli): generate icon map from base placeholders to prevent mapping drift (#1896)
* docs: design spec for generating the CLI icon map from IconPlaceholder source of truth

Ports the missing half of upstream's build-icons.ts so index.json is generated
from the reka base placeholders instead of hand-maintained, closing the #1893
drift class. Adds a coverage assertion for the raw-lucide new-york-v4 registry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: resolve icon-map spec decisions (radix legacy-only, regen __*__.ts, defer #1894)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: icon-map generation implementation plan + spec drift-semantics fix

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(scripts): icon-map pure helpers — phosphor derivation and record mapping

* feat(scripts): icon-map legacy merge (legacy values win, scan fills gaps)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(scripts): render __*__.ts icon re-export files (phosphor aliased)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(scripts): coverage check helper with suffix bridge

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(scripts): cover third suffix-bridge direction and dedup/sort in findUncovered

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(icons): seed legacy-mapping.json from current icon map

* feat(scripts): scan IconPlaceholder attributes from base SFCs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(scripts): validate generated icon names against installed packages

* feat(scripts): build-icons orchestrator, validation and coverage assertion

* fix(scripts): skip Vue dynamic icon bindings in placeholder scanner

* fix(registry): correct invalid icon names in base placeholders

* chore(icons): regenerate icon map and re-export files from bases

* fix(scripts): generate only the CLI icon map, leave __*__.ts to the showcase

* build(icons): generate the icon map as part of the registry build

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci(icons): gate on icon-map staleness and run icon unit tests

* docs: amend icon-map spec/plan (generator writes only index.json; vitest; integration fixes)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: remove planning docs from PR

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(icons): resolve CodeRabbit review — dedupe Search key, handle aliased imports

- Align blocks/vercel.vue placeholder to lucide="SearchIcon" (the outlier that
  produced both Search and SearchIcon canonical keys); regeneration now collapses
  them into one entry.
- Add findDuplicateCanonicals guard so the generator fails loud on any future
  X/XIcon key split from inconsistent base placeholders.
- parseLucideImports resolves `as` aliases and `type` modifiers so the coverage
  check reads the exported name, not the local alias (with regression tests).
- Add docstrings to the exported generator API.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 14:17:43 +08:00
..
2025-03-01 03:59:35 +08:00