Compare commits

..

1 Commits

Author SHA1 Message Date
t.behrendt 30070f7f9c refactor: to node action (#47)
CD / Release (push) Successful in 33s
Refactoring the action from a composite to Node action. This change improves security through pinning of packages as well as better test-ability and error handling.

Reviewed-on: #47
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2026-06-27 14:00:15 +02:00
5 changed files with 21751 additions and 27699 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Validate JSON
- name: Validate Renovate Config
uses: ./
with:
json-file: renovate.json
+4
View File
@@ -0,0 +1,4 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": ["dist/**", "node_modules/**", "coverage/**"]
}
+3537 -9491
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -58,10 +58,10 @@ describe("validateJson()", () => {
{
ok: true,
text: async () =>
JSON.stringify({
({
despiteThisBeingValidJson:
"toString() breaks it, making it invalid",
}),
}).toString(),
},
);
@@ -69,7 +69,7 @@ describe("validateJson()", () => {
$schema: "https://json-schema.org/draft-07/schema",
});
await expect(validateJson(jsonFile)).rejects.toThrow(
'strict mode: unknown keyword: "despiteThisBeingValidJson"',
'"[object Object]" is not valid JSON',
);
});
+3 -1
View File
@@ -14,7 +14,9 @@ export const validateJson = async (jsonFileContent: string): Promise<void> => {
const schemaText = await schemaContent.text();
const schemaObject = JSON.parse(schemaText);
const validator = new Ajv();
const validator = new Ajv({
strict: false,
});
const validate = validator.compile(schemaObject);
const isValid = validate(jsonObject);
if (!isValid) {