From 3c7d8ab4981ba530a851abe9163a5ff9c1229039 Mon Sep 17 00:00:00 2001 From: Daniel Kostro Date: Sat, 2 Dec 2023 14:34:56 +0100 Subject: [PATCH] feat: add treatWarningsAsErrors option --- action.yml | 5 +++++ index.mjs | 2 ++ node_modules/.package-lock.json | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d772eb85..8d214270 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,11 @@ inputs: description: 'Entry point of your API' required: true default: 'src/index.ts' + treatWarningsAsErrors: + description: 'Treat warnings as errors' + required: false + default: 'false' + name: description: 'Name of the package' runs: diff --git a/index.mjs b/index.mjs index 61b3ce1e..b17b2e69 100644 --- a/index.mjs +++ b/index.mjs @@ -8,6 +8,7 @@ import { exec } from '@actions/exec'; const entry = core.getInput('entry') || 'src/index.ts'; const name = core.getInput('name'); +const treatWarningsAsErrors = core.getInput('treatWarningsAsErrors'); const defaultTsconfig = `{ "compilerOptions": { @@ -58,6 +59,7 @@ async function writeTypedocJson(name, tsConfigPath) { hideGenerator: true, tsconfig: path.resolve(tsConfigPath), entryPoints: entry.split(/ +/).map((entry) => path.resolve(entry)), + treatWarningsAsErrors: treatWarningsAsErrors === 'true', plugin: ['typedoc-plugin-katex'], // typedoc-plugin-katex plugin options katex: { diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 65c7c428..588705d3 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { "name": "typedoc-action", - "version": "2.5.0", + "version": "2.6.0", "lockfileVersion": 3, "requires": true, "packages": {