npm / cn
cn
What changed in cn 0.2 to 0.5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
2 breaking3 new APIs and options7 performance4 behavior and defaults16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcn 0.54 changes
Breaking changes 2
The build command drops names declared before a --*: initial reset.
Node 20 is no longer supported; Node 22 or later is required.
Behavior and default changes 1
The build command now follows package @imports.
Fixes and other changes 1
The build command reads @theme declarations that appear after nested blocks such as @keyframes.
cn 0.41 changes
Behavior and default changes 1
cn build and the plugins now register theme scales declared in Tailwind CSS.
cn 0.37 changes
New APIs and options 3
Adds a library entry point with build(options), letting build scripts and bundler plugins run scanning, subsetting, compiling, and writing directly.
Adds the cn/next entry point.
Adds the cn/vite entry point.
Performance 1
Calls with an interpolated argument no longer thrash the argument cache, improving performance for that call shape; stable arguments are unchanged.
Behavior and default changes 1
Axis utilities now override the logical sides they cover, matching tailwind-merge 3.7.0. For example, px-2 replaces ps-* and pe-*.
Fixes and other changes 2
The generated .ts output typechecks with noUncheckedIndexedAccess and the rest of the @tsconfig/strictest flags; the .mjs output is unchanged.
Custom animate-* classes are no longer merged, matching tailwind-merge; plugin classes such as animate-in, animate-once, and animate-duration-500 are never dropped.
cn 0.220 changes
Performance 6
Object and array arguments resolve in place and use the argument-identity cache, avoiding a full clsx join on every call.
A single array argument uses the argument path, allowing stable element identities to hit the cache.
The argument-cache bucket now holds 256 tuples instead of 8, reducing evictions when many usage sites share a base string.
Freshly joined strings pass through a doorkeeper before the whole-string cache, preventing arbitrary dynamic values from churning both caches.
On JavaScriptCore, the whole-string cache uses a Map and an inlinable hit path, improving cache hits and recurring single-string calls on bun.
Warm calls with four or more arguments now probe predictions in place and allocate nothing, reducing call time from about 44ns to 32ns.
Behavior and default changes 1
Config extensions accept readonly arrays, allowing token tuples declared with as const to work without a defensive copy.
Fixes and other changes 13
Fixes merging for containment.
Fixes merging for custom animations.
Fixes merging for legacy gradients.
Fixes missing Tailwind v4 utilities in merging.
The generated output file is excluded from content scans when its path matches a content glob.
Extensions accept a single class or theme definition instead of throwing.
Fixes brace globs, dot-directory and symlink scanning, and CLI error reporting for content builds.
Fixes a hang and dropped classes when tracking conflicts with large custom configs and merges.
Matches tailwind-merge on array-like values passed to twJoin.
Matches tailwind-merge on Unicode whitespace.
Fix the published types for cn/config, which pointed at an internal chunk with mangled export names and omitted defaultConfig and mergeConfigs.
Fix the published type for clsx in cn/lite, which incorrectly accepted zero parameters.
Fix conflict detection silently failing after 2^31 cache-missing merges in one process.