Skip to content

Remove deprecated JSON5 fallback when reading JSONC #46215

Description

@jamietanna

In

renovate/lib/util/common.ts

Lines 124 to 142 in 5149393

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBreaking change, requires major version bump

    Type

    Fields

    Priority

    None yet

    Datasource

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions