Skip to content

fix: repair CLI crashes, unify schema v2, add normalization pipeline and expanded tests (v1.1.0) - #1

Open
uthumany wants to merge 2 commits into
mainfrom
improve/fix-and-schema-unify
Open

fix: repair CLI crashes, unify schema v2, add normalization pipeline and expanded tests (v1.1.0)#1
uthumany wants to merge 2 commits into
mainfrom
improve/fix-and-schema-unify

Conversation

@uthumany

Copy link
Copy Markdown
Owner

Summary

Implements the prioritized fixes from the repository review:

Bug fixes

  • stats and export CLI commands no longer crash
  • getSvgPath() now resolves to verified bundled files (null for remote-only icons)
  • Search relevance capped at 100; negative counts rejected with exit code 1
  • --version/-v handled correctly; ANSI colors only on TTYs

Data quality

  • New idempotent normalization pipeline (npm run normalize): 874 duplicate SVGs removed, 284 name-file mismatches flagged, 12 wrong names self-corrected, 9,800+ tags generated
  • Unified schema v2 with license/quality fields; verified on every run

Testing & docs

  • 45 tests passing (was 14), 0 lint errors
  • README corrected to actual sources; uhuman→uthumany; THIRD_PARTY_NOTICES.md added

Local verification: npm test 45/45 pass, npm run lint 0 errors, pipeline run clean (9,810 icons).

… add normalization pipeline and 31 tests

- fix(stats): read breakdown.byType/bySource/topCategories shape the CLI expects
- fix(export): import correct exporter functions (toJson/toCsv/toMarkdown)
- fix(getSvgPath): use verified local_path from schema v2; null for remote icons
- fix(search): cap relevance at 100; add tag/offset filters
- fix(cli): reject negative counts, handle --version/-v boolean flags, TTY-gated ANSI
- fix(loader): load normalized schema-v2 database, add clearCache/getSvgDir
- fix(stats): unique ids, correct pack counting, sources field
- feat(normalize): 10-stage idempotent pipeline (scripts/normalize-data.js, docs/PIPELINE.md)
  * 874 duplicate SVGs removed (5237 -> 4363), 284 name mismatches flagged,
    12 names self-corrected, 4 correction collisions removed, 9800+ tags generated
- feat(api): filterByTag, listSources, input validation, Fisher-Yates shuffle
- test: expand suite 14 -> 45 (schema contracts, exporter, CLI subprocess)
- docs: fix README overclaims, uthuman -> uthumany, THIRD_PARTY_NOTICES.md,
  CHANGELOG v1.1.0; bump version to 1.1.0
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a78ad7e5-615d-4c18-8f5d-b38526748a50


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome! Thanks for opening your first pull request. We'll review it as soon as possible. Please ensure all CI checks pass and that your changes follow the project's code style.

Comment thread test/index.test.js
function cliSafe(...args) {
const { execSync: nodeExecSync } = require('node:child_process');
try {
const stdout = nodeExecSync(`${nodeBin} ${CLI} ${args.join(' ')}`, {
…ance

- Add 3-job pipeline: Security Gates (dependency review, npm audit
  --audit-level=high, dependency-tree lint), Build & Verify (lint,
  tests, rebuild normalized data, release-tag vs package.json version
  guard, tarball content inspection), Publish (npm publish --provenance)
- Pin all actions to full commit SHAs (checkout v4.4.0, setup-node
  v4.4.0, dependency-review-action v4.9.0)
- Add workflow_dispatch for manual retry; concurrency group per release
- Least-privilege permissions: contents read + id-token write only
- Add .github/dependabot.yml: weekly npm + github-actions updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants