fix(config): share json compatibility parsing

This commit is contained in:
Vincent Koc
2026-03-20 10:17:53 -07:00
parent 4838e3934b
commit a39c440d39
3 changed files with 13 additions and 20 deletions

View File

@@ -0,0 +1,9 @@
import JSON5 from "json5";
export function parseJsonWithJson5Fallback(raw: string): unknown {
try {
return JSON.parse(raw);
} catch {
return JSON5.parse(raw);
}
}