In
|
export function parseJsonWithFallback( |
|
content: string, |
|
context: string, |
|
): JsonValue { |
|
let parsedJson: JsonValue; |
|
|
|
try { |
|
parsedJson = parseJsonc(content); |
|
} catch { |
|
// warn if json5 format used in json |
|
parsedJson = JSON5.parse(content); |
|
logger.warn( |
|
{ context }, |
|
'File contents are invalid JSONC but parse using JSON5. Support for this will be removed in a future release so please change to a support .json5 file name or ensure correct JSON syntax.', |
|
); |
|
} |
|
|
|
return parsedJson; |
|
} |
we currently provide this fallback, but want to remove it.
(Currently for v45, but likely in a future release)
In
renovate/lib/util/common.ts
Lines 124 to 142 in 5149393
(Currently for v45, but likely in a future release)