created implementation plan#9
Merged
Merged
Conversation
added 5 commits
April 30, 2026 13:24
Implements parsePatchFrontmatter and applyPatch in src/patch.ts with unit tests covering all merge rules (description override, prepend, append, body replace, combinations, empty patch pass-through).
Extends tsdown.config.ts with an onSuccess hook that reads patch files from src/command-patches/ and applies them to dist/commands/ after the copy step. Adds src/command-patches/spec.md as the canonical example using append-only patching.
…comments, extract patch function - Replace hand-rolled YAML serialization with yaml.stringify to correctly handle descriptions containing colons, quotes, and other special characters (was silently lossy before) - Add assertOptionalString guard in parsePatchFrontmatter so non-string patch fields throw a clear error instead of producing corrupt output at runtime - Align rule-number comments in applyPatch with the spec's 5-rule numbering (was mislabelled as Rules 2/3 instead of 3/4/5) - Extract onSuccess body into named applyCommandPatches() in tsdown.config.ts for readability - Add three regression tests: colon-in-description round-trip, non-string prepend throws, non-string description throws
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.
No description provided.