Skip to content

Commit

Permalink
fix(manager/devcontainer): allow trailing commans in jsonc files (#33913
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RahulGautamSingh authored Jan 29, 2025
1 parent 60f8d3e commit 8deab52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/modules/manager/devcontainer/extract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('modules/manager/devcontainer/extract', () => {
{
// hello
"features": {
"devcontainer.registry.renovate.com/test/features/first:1.2.3": {}
"devcontainer.registry.renovate.com/test/features/first:1.2.3": {},
}
}`);
const extractConfig = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/util/schema-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export const Json5 = z.string().transform((str, ctx): JsonValue => {

export const Jsonc = z.string().transform((str, ctx): JsonValue => {
const errors: JSONC.ParseError[] = [];
const value = JSONC.parse(str, errors);
const value = JSONC.parse(str, errors, { allowTrailingComma: true });
if (errors.length === 0) {
return value;
}
Expand Down

0 comments on commit 8deab52

Please # to comment.