renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
16.49k stars 2.12k forks source link

Replace JSON config migration code with jsonc-parser #27972

Open rarkins opened 3 months ago

rarkins commented 3 months ago

Describe the proposed change(s).

Write a function to use jsonc-parser library to perform config migrations. We should use this for JSON configs initially, not JSON5. Later we can try JSONC migrations for .json5 files and then fall back to our old implementation if it fails to parse.

Important that we refactor our existing code (if necessary) so that same tests can be reused before/after the JSONC implementation to decrease chances of mistakes.

HonkingGoose commented 2 weeks ago

I think you meant for me to add these todos, so here's the list: 🙂

Docs: try content tabs with a single JSON tab first

Add/write JSON-to-YAML converter, insert YAML into content tab in docs