Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jun 27, 2025

Summary

Fixes JSON backwards compatibility issue introduced in #5099.

Changes

  • Add JSON fallback to parseYamlSafely for reading old JSON .roomodes files
  • Remove defaultStringType: 'PLAIN' from all yaml.stringify calls to ensure JSON-compatible output

Testing

All existing tests pass (18/18).

Related Issues

Closes #5180
Closes #5139


Important

Adds JSON fallback for .roomodes files and ensures JSON-compatible YAML output by removing defaultStringType: 'PLAIN'.

  • Behavior:
    • Adds JSON fallback in parseYamlSafely() in CustomModesManager.ts for .roomodes files.
    • Removes defaultStringType: 'PLAIN' from yaml.stringify calls in CustomModesManager.ts, SimpleInstaller.ts, and migrateSettings.ts for JSON-compatible output.
  • Testing:
    • All existing tests pass (18/18).

This description was created by Ellipsis for ea6bc15. You can customize this summary. It will automatically update as commits are pushed.

- Add JSON fallback to parseYamlSafely for reading old JSON files
- Remove defaultStringType: 'PLAIN' from yaml.stringify to ensure JSON-compatible output
- Fixes issue introduced in #5099
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners June 27, 2025 18:41
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jun 27, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jun 27, 2025

No security or compliance issues detected. Reviewed everything up to ea6bc15.

Security Overview
  • 🔎 Scanned files: 3 changed file(s)
Detected Code Changes
Change Type Relevant files
Bug Fix ► CustomModesManager.ts
    Add JSON fallback for parsing old .roomodes files
    Remove defaultStringType: 'PLAIN' from yaml.stringify
► SimpleInstaller.ts
    Remove defaultStringType: 'PLAIN' from yaml.stringify
► migrateSettings.ts
    Remove defaultStringType: 'PLAIN' from yaml.stringify

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Jun 27, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 27, 2025
@mrubens mrubens merged commit d397d13 into main Jun 27, 2025
25 checks passed
@mrubens mrubens deleted the fix/json-backwards-compatibility branch June 27, 2025 19:04
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 27, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Mode selector is missing after 06/26/25 update. After updating to v3.22.0, the previous .roomodes report an invalid YAML format error.

4 participants