Changelog
Release history for @gentleduck/registry-build. Newest releases at the top.
Unreleased
Merged, and out with the next release.
Patch Changes
- A build stops on two registry items of one name and says which two types share it. Both wrote the same JSON file and two index constants of one name, which Turbopack refuses, so the docs build failed further on.
1.0.2
Patch Changes
- 247da24: Registry builds copy CSS and JSON files unchanged. They were parsed as TSX to strip source variables, which dropped their leading comment.
1.0.1
Patch Changes
- bfa58d9: Fix the check that keeps output paths inside their base directory when the path runs through a symlink, as macOS's
/var->/private/vartemp directories do. The base was resolved through symlinks but the candidate path was not, so a path inside the base could be rejected as outside it. The candidate is now resolved the same way, through its nearest existing ancestor.
1.0.0
Major Changes
95638de: Audit-driven refactor across all 15 public packages. Closes type holes, hardens security boundaries, eliminates dead code, and dedups duplicated patterns.
Highlights
duck-docs— CompiledMdxBody branded type gatesnew Function(body); sanitizeSvg covers SMIL, unquoted javascript: URIs, nested script, CSS url(), bare iframe; code-preview tag + attr allowlistsduck-registry-build— safe-path containment at every fs sink; per-phase Zod cache schemas; JSON.stringify in generated TSX; cache manifest rejection on tamperduck-cli— install pipeline path containment unified across add/init/update; env-var allowlist contract reconciled with one-time warning; aliases.ui regex validationduck-primitives—observe-element-rectrAF loop guard (no leak when empty);compose-refuseCallback memo fix; popper forwardRef restored for R18 peer compatduck-hooks—useDebounceis now a real hook (stable identity, unmount cleanup);useStableIddelegates to React.useId (SSR-safe);scheduleTransitionTimeoutrename strips twouseHookAtTopLevellint suppressionsduck-lazy— spread order fix restores the lazy swap;next/imagemoved behind/lazy-image-nextsubpath so non-Next consumers don't pull the peerduck-vim— single document listener fans out to chord matcher + sequence manager; canonical modifier order;requireResetauto-clears for chord bindings; all three hook dep arrays correctedduck-variants—Props<T, D>makes defaulted variant keys optional and non-defaulted required; boundedpreludeCacheLRU; second-layerfilter2set eliminates last clone in hot pathduck-ttest—predictates/renamed topredicates/, twin dirs deleted, type-utility duplicates reconciled to canonical sources,IsVoidactually distinguishes void from undefined nowduck-calendar—./*wildcard export removed; falsy-zeroweekStartDay: 0(Sunday) bug fixed; Gregorian helpers extracted; HebrewaddMonthsuses Metonic cycleduck-libs—cnMemobounded LRU;filteredObjectrejects typo keys at compile time;parseDaterejects ambiguous one-token inputsduck-query— single AnyReq boundary cast replaces 14as any; param regex escape; throws on unresolved:tokensregisters— schema tightened (z.any()removed); ~1000 LoC of identical block-registry boilerplate replaced with buildersregistry-ui—_audio/_upload(~1.1K LoC) deleted;motion-shellHOC +withMotioncollapses simple motion clones;toDirection()narrower replaces 52as IDirection.Kindcasts; chartCSS_NAMED_COLORSfinite allowlistduck-motion— refcounted bodypointer-eventsownership; easing/blur/duration token dedup; half of public exports were unused and removed
Tests: 3133+ across the monorepo, all green. Type-checks clean across every project. No commits skipped hooks.
0.2.3
Patch Changes
- 95dbbce: Standardize README headers across all packages: centered logo, h1, tagline, nav links, and npm badges (matching the @duck-md template). Replace per-repo
*.gentleduck.orgsubdomain refs with path-basedgentleduck.org/duck-<name>URLs. No runtime code changes.
0.2.2
Patch Changes
- 7d6fb7b: Align tsconfig shared configs, fix TS strict mode errors (exactOptionalPropertyTypes, verbatimModuleSyntax), align package.json deps to catalog refs, apply biome lint fixes.
0.2.1
Patch Changes
- fd5e095: Fix tsdown config to use platform node, resolving node:* import warnings and producing correct .mjs output
0.2.0
Minor Changes
34f38e5: Refactor
@gentleduck/registry-buildinto a fully extension-driven build system.- All processing (index build, components, validation, colors/themes, component index, banners) is now performed by explicit extensions - the core runner has no built-in phases.
- Added
indexBuildExtension()andcomponentsExtension()as standalone extensions (also bundled byuiRegistryPreset()). - Moved monorepo-specific presets out of the package to consumer-local config files.
- Added generic
collectionsconfig surface for non-UI consumers. - Added incremental file-hash cache with write-skipping, stale file cleanup, and
--changed-onlymode. - Added config composition via
extends(path-aware) andmergeRegistryBuildConfigs(). - Consolidated over-split config files, removed dead code, added JSDoc to all public APIs.
- Added unit tests for config merge, defaults, change detection, and adapters.
Unreleased
Breaking Changes
- The core runner no longer has built-in index or components phases. All processing is now extension-driven. Consumers must explicitly register
indexBuildExtension()andcomponentsExtension()(or useuiRegistryPreset()) to get the same behavior. - Monorepo-specific presets (
createMonorepoSourcesPreset,monorepoRegistryPreset,MONOREPO_THEME_CSS_VAR_KEYS,MONOREPO_THEME_NAMES) have been removed from the package. Consumers should define these presets locally beside their config files.
Features
- Extension-driven architecture: The runner executes
beforeBuildandafterBuildextension stages only. All domain logic (index building, component generation, validation, colors/themes, component indexes, banners) lives in composable extensions. - Generic collections: New
collectionsconfig surface for non-UI consumers. Collections hold file-backed data, named source trees, and arbitrary metadata that extensions can read. - Config composition: File-based
extendswith path-aware resolution, plus code-drivenmergeRegistryBuildConfigs()for parameterized preset factories. - Incremental cache and partial rebuilds: File-hash caching under
<output.dir>/.registry-build/, write-skipping for unchanged outputs, stale file cleanup, and--changed-onlymode with explicit changed paths. uiRegistryPreset(): Bundles the standard UI extensions (bannerExtension,validateExtension,indexBuildExtension,componentsExtension,componentIndexExtension,colorsExtension) with configurable options.defineConfig(): Type-safe config wrapper that enforces theregistry:${string}namespace across sources, mappings, target paths, schema item types, and registry entries.- Zod schema validation: Config is validated against a Zod schema after defaults and resolution, catching shape errors before the build runs.
- Framework adapters: Built-in component-index adapters for
nextjs,vite, andcustomwith full custom generator support. - Bounded concurrency: CPU-aware parallelism cap for discovery and generation work, configurable via
performance.parallelism.
Refactoring
- Consolidated
types.config.ts+types.resolved.tsinto a singleconfig/types.tswith section comments. - Consolidated
defaults.constants.ts+defaults.apply.tsinto a singleconfig/defaults.ts. - Removed dead code: unused logger module, unexported internal helpers, duplicate type aliases.
- Removed duplicate
pathExistsfrom loader (now uses sharedlib/fs.ts). - Replaced duplicate
mergeColorData/mergeThemeDatawith genericmergeRecordOrString<T>(). - Simplified config resolution to trust
withRegistryBuildDefaultsguarantees. - Extracted
createOutputPaths()andcreatePathRegistry()intopipeline/context/context.paths.ts. - Extracted
processTheme()intopipeline/phases/colors/colors.lib.ts.
Documentation
- Added JSDoc to all exported functions across
lib/,pipeline/,extensions/, andconfig/. - Updated architecture docs to reflect extension-driven lifecycle (no built-in core phases).
- Updated extensions docs with
indexBuildExtension()andcomponentsExtension()in the built-in table. - Updated configuration, recipes, and getting-started docs with explicit extension registration examples.
- Updated README to remove stale monorepo preset imports and document consumer-local preset pattern.
Tests
- Added config merge tests covering extension concatenation, collection merging, source merging, themes dedup, and colors data override.
- Added config defaults tests covering source glob/ignore defaults, performance defaults, branding defaults, and user-value preservation.
- Added change detection tests covering deterministic cache keys, backslash normalization, and affected-path matching.
- Added adapter tests covering nextjs/vite/custom resolution and generated import patterns.
- Existing golden tests and runner integration tests continue to pass.
0.1.0 - 2026-03-10
Features
- Initial release as
@gentleduck/registry-build. - Config-driven CLI (
registry-build build) with--config,--cwd,--silent,--json,--verbose,--changed-only, and--changedflags. registry-build.config.tsdiscovery with upward search and multiple format support (.ts,.mts,.cts,.js,.mjs,.cjs,.json).- Full UI registry build pipeline: index materialization, component payload generation, component-index generation, colors/themes CSS and JSON emission.
- Extension API with
beforeBuildandafterBuildstages, artifact storage, and output registration. - Incremental file-hash cache with write-skipping and stale file cleanup.
- Path-aware config
extendswith deep merge semantics. - Framework-specific component-index adapters (Next.js, Vite, custom).
- Bounded concurrent file discovery and generation.
- Golden fixture test suite for output regression detection.
Commits
abbb7769feat(registry-build): ship config-driven registry builder20456291feat(registry-build): add incremental cache and partial rebuilds5d2ef490feat(registry-build): add generic collections foundation64d085e2test(registers,registry-build): add schema and logger tests5051d7f8build(deps): bump zod from 4.2.1 to 4.3.6917e714efeat(registry): migrate duckui registry packages and add internal registry support0c6d3a06fix(lint): resolve all 213 biome lint warnings across monorepo