Fix opencode.json overwrite on install/convert#208
Closed
marcindyguda wants to merge 1 commit intoEveryInc:mainfrom
Closed
Fix opencode.json overwrite on install/convert#208marcindyguda wants to merge 1 commit intoEveryInc:mainfrom
marcindyguda wants to merge 1 commit intoEveryInc:mainfrom
Conversation
writeOpenCodeBundle() now merges into existing opencode.json instead of overwriting it, preserving user config (mcp servers, commands, permissions, tools). Extracted readJsonSafe() into shared utils so both sync and target paths reuse the same helper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5dc0a8f to
75c6ed1
Compare
Author
|
I can see it is already solved in #201 |
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
Fixes #125
After rebasing on main, the core merge logic for
writeOpenCodeBundle()was already implemented upstream (ADR-002). This PR contributes the remaining improvements:readJsonSafe()into sharedsrc/utils/files.tsso bothsync/opencode.tsandtargets/opencode.tscan reuse it (DRY)readJsonSafe()fromsrc/sync/opencode.tscommand: ["uvx", "plugin-srv"]arrays matching theOpenCodeMcpServertype (not separatecommand/argsfields)Test plan
opencode-writer.test.tstests passopencode.jsonwith custom keys, run install, verify custom keys are preserved🤖 Generated with Claude Code