Skip to content

fix: preserve comments in workspace.jsonc when updating config#9851

Merged
davidfirst merged 5 commits into
masterfrom
fix/workspace-jsonc-comment-preservation
Jul 23, 2025
Merged

fix: preserve comments in workspace.jsonc when updating config#9851
davidfirst merged 5 commits into
masterfrom
fix/workspace-jsonc-comment-preservation

Conversation

@davidfirst
Copy link
Copy Markdown
Member

@davidfirst davidfirst commented Jul 22, 2025

Fixes bug where comments in workspace.jsonc were lost when using bit commands such as bit scope set. The spread operator was destroying comment metadata from comment-json. Fixed by using assign() to preserve comments during property merging. Added e2e test to prevent regression.

davidfirst and others added 2 commits July 22, 2025 16:07
When using setExtension with mergeIntoExisting:true (e.g., via 'bit scope set'),
comments within aspect objects were being lost due to JavaScript spread operator
destroying comment-json metadata. Fixed by using assign() from comment-json
library to merge properties while preserving all comments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@davidfirst davidfirst merged commit f096d10 into master Jul 23, 2025
10 checks passed
@davidfirst davidfirst deleted the fix/workspace-jsonc-comment-preservation branch July 23, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants