Vibe Coding Universal is a component library built for developer-facing tools: code editors syntax highlighters and comparison tables. The latest patch addresses a persistent annoyance—version labels in comparison tables were stuck on outdated values instead of reflecting the actual release. This fix replaces static strings with dynamic version detection ensuring every table header displays the correct label for v1.0.
The problem was subtle but damaging. Comparison tables often appear in migration guides or documentation to contrast features across versions. When the label itself is wrong—say showing "v0.9" instead of "v1.0"—the entire table loses trust. The root cause was a hardcoded mapping in the table header component that was never updated during the version bump.
The fix reads the current version directly from package.json and derives the old version from the changelog metadata. This means no manual overrides are needed—the component always uses the canonical version identifiers.
import { ComparisonTable } from 'vibe-coding-universal';
const features = [
{ feature: 'Dynamic version label', v0: false, v1: true },
{ feature: 'Auto-sized columns', v0: false, v1: true },
];
export default function VersionDiff() {
return <ComparisonTable data={features} />;
}
In this example the component automatically sets the column headings to "v0.9" and "v1.0" based on the package version and available history. No extra props are required. For existing users who passed explicit oldVersionLabel or newVersionLabel, those props are now overridden by the internal logic—a deprecation warning is emitted if they are still provided.
This change touches only the comparison table module but has ripple effects. Integration tests no longer need to stub version strings, and documentation snippets can rely on the component to self-identify. More importantly, it forces discipline around version tracking: the source of truth stays in package.json, eliminating a class of drift errors.
The implementation is deliberately minimal. A utility function extracts the current version from the bundled package.json at build time, and a second function queries the last stable release tag from the git history if available. Fallbacks are used in environments without git metadata, defaulting to a sensible range like "v0.9" for the old label.
For maintainers this fix aligns with the broader v1.0 release—including semantic versioning compliance and a streamlined build pipeline. Users upgrading from the previous release (0.9.x) should update their dependency to ^1.0.0 and verify that comparison tables render correctly. No other breaking changes are introduced.
The impact is straightforward: comparison tables now tell the truth. Experienced developers can treat them as reliable documentation without cross-checking against the package version. This is the kind of small, surgical fix that eliminates friction in everyday tooling.
Upgrade, drop the manual version props, and let the component handle the rest. Accurate labels in one less thing to debug.
Top comments (0)