refactor: consolidate deepMerge and deepMergeDefaults (#433)#476
Merged
Conversation
Both functions now delegate to a shared mergeWith helper with an internal mode flag. Public signatures and behavior are unchanged; adds three edge-case tests (type mismatch, null target, missing nested object) to lock in semantics. closes #433 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Auto-merge is now allowed for PRs in this repo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
evantahler
added a commit
that referenced
this pull request
Apr 29, 2026
Resolve conflicts: - config.ts: take upstream's mergeWith consolidation (#476) but drop the `(target as any)[key]` cast it kept, finishing the work of #436 against the new structure. Tighten the helper to Record<string, unknown>. - webCompression.ts: re-add the @ts-ignore + comments on the new compressBody helper (#475) for downstream consumers compiling under `lib: ["DOM"]`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/keryx/util/config.tsby routing bothdeepMergeanddeepMergeDefaultsthrough a single internalmergeWithhelper with an\"overwrite\" | \"defaults\"mode flag — public signatures and behavior are unchanged, so no call sites needed updating.deepMergeDefaultsto lock in semantics that were not previously asserted: type mismatch (target object vs source scalar), nullish target value treated as set, and filling a missing nested object wholesale.keryxto 0.29.10.closes #433
Test plan
🤖 Generated with Claude Code