Files
agentic-dev-template/docs/library-decisions/2026-05-14-clsx.md
Danijel Martinek bce9ded915 feat(core-ui): scaffold @repo/core-ui via generator
Runs pnpm turbo gen core-package ui to produce the package shell:
atomic-design components (Button, Input, Label, FormField), vitest
config excluding story files from coverage, and transpilePackages
wiring in web-next. Adds @vitest/coverage-v8 devDep and
label.stories.tsx to satisfy lint/coverage gates.

Also fixes scripts/library-decisions/check.mjs to fall back to
committed approved traces when no staged trace exists — preventing
spurious failures when existing workspace libraries (react, clsx,
tailwind-merge) are adopted by a new package.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 20:59:48 +00:00

1.5 KiB

package, version, tier, decision, date, deciders, adr, filter-results, verification-commands, accepted-cves
package version tier decision date deciders adr filter-results verification-commands accepted-cves
clsx ^2.1.1 core approved 2026-05-14
scaffolded
null
license types maintenance boundary-fit shadow-check eu-residency cve-scan named-consumer
MIT native active pass pass n/a clean pass
pnpm audit --audit-level=moderate
npm view clsx license

Filter: license

MIT — on the workspace allowlist.

Filter: types

Ships first-party TypeScript types in its distribution.

Filter: maintenance

Active. Maintained by Luke Edwards; stable, minimal API.

Filter: boundary-fit

Core UI package. clsx is a utility for constructing className strings; appropriate for core-ui. No boundary rule violation.

Filter: shadow-check

No competing className utility in the workspace. No shadow.

Filter: eu-residency

Pure compute; no network calls or vendor data transmission. n/a.

Filter: cve-scan

No advisories at adoption time.

Filter: named-consumer

core-ui uses clsx in the cn() utility (combined with tailwind-merge) for conditional class composition.

Prompt: replaces

Nothing — this is the initial UI scaffold.

Prompt: migration-cost-out

Mechanical: replace clsx() calls with template literals or equivalent. Minimal API surface.

Prompt: alternatives-considered

  1. classnames — the older predecessor; clsx is smaller and faster.
  2. Template literals — verbose; no conditional logic support. clsx is the de-facto standard lightweight className utility.