Skip to content

chore: boring-tech audit easy wins — drop dead dep, use builtin, dedupe - #791

Merged
admarble merged 2 commits into
mainfrom
chore/boring-tech-easy-wins
Jul 19, 2026
Merged

admarble merged 2 commits into
mainfrom
chore/boring-tech-easy-wins

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Three low-risk resourcefulness fixes from the build-vs-adopt ("boring technology") audit. Net -84 lines, no behavior change beyond a strictly-more-robust version comparator.

Changes

  • Drop the unused gradient-string dependency (0 import sites anywhere in src/bin/scripts/dashboard/hooks/dist) plus its orphaned @types/gradient-string. Removes tinygradient/tinycolor2 from the lockfile.
  • Use the AbortSignal.timeout() builtin in fetchLatestVersion instead of the manual AbortController + setTimeout + 2×clearTimeout dance (builtin is available on the >=22.12 engines floor).
  • Consolidate the duplicate compareVersions — manifest.ts now imports the more robust comparator from version-check.ts (strips a leading v, tolerates non-3-part versions) instead of its own hard-coded 3-part copy. manifest only ever compares plain X.Y.Z values, so the changed semantics are a pure improvement.

Verification

  • npm run build (tsc) — clean
  • npm run lint (eslint --max-warnings 0) — clean
  • npx vitest run version-check — 66/66 passed
  • npm install --package-lock-only — gradient-string fully gone from lock, 0 vulnerabilities

admarble added 2 commits July 18, 2026 21:23
Three low-risk resourcefulness fixes from the build-vs-adopt audit:

- Drop the unused `gradient-string` dependency (0 import sites) plus its
  orphaned `@types/gradient-string`; removes tinygradient/tinycolor2 from
  the lockfile.
- Replace the manual AbortController+setTimeout+clearTimeout timeout dance
  in fetchLatestVersion with the AbortSignal.timeout() builtin.
- Consolidate the duplicate compareVersions: manifest.ts now imports the
  more robust comparator (strips `v` prefix, tolerates non-3-part
  versions) from version-check.ts instead of its own hard-coded copy.

Build, lint, and version-check tests all pass.

Entire-Checkpoint: 7cd4043b9396
Per repo convention (per-PR changelog entries), record the dropped
gradient-string dep, the AbortSignal.timeout() swap, and the
compareVersions consolidation under [Unreleased] → Changed.

Entire-Checkpoint: 5f1698fbc6f5
@admarble
admarble merged commit 23dc6a6 into main Jul 19, 2026
5 checks passed
@admarble
admarble deleted the chore/boring-tech-easy-wins branch July 19, 2026 02:36
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.

1 participant