diff --git a/__tests__/get-inputs.test.ts b/__tests__/get-inputs.test.ts index cbe201ea..2dcc1570 100644 --- a/__tests__/get-inputs.test.ts +++ b/__tests__/get-inputs.test.ts @@ -5,7 +5,8 @@ import yaml from 'js-yaml'; beforeEach(() => { jest.resetModules(); - const doc = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const doc: any = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); Object.keys(doc.inputs).forEach(name => { const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`; process.env[envVar] = doc.inputs[name]['default']; @@ -13,7 +14,8 @@ beforeEach(() => { }); afterEach(() => { - const doc = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const doc: any = yaml.safeLoad(fs.readFileSync(__dirname + '/../action.yml', 'utf8')); Object.keys(doc.inputs).forEach(name => { const envVar = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`; delete process.env[envVar]; diff --git a/package-lock.json b/package-lock.json index f041b6d9..4ae47955 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1185,9 +1185,9 @@ } }, "@types/js-yaml": { - "version": "3.12.4", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.4.tgz", - "integrity": "sha512-fYMgzN+9e28R81weVN49inn/u798ruU91En1ZnGvSZzCRc5jXx9B2EDhlRaWmcO1RIxFHL8AajRXzxDuJu93+A==", + "version": "3.12.5", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-3.12.5.tgz", + "integrity": "sha512-JCcp6J0GV66Y4ZMDAQCXot4xprYB+Zfd3meK9+INSJeVZwJmHAW30BBEEkPzXswMXuiyReUGOP3GxrADc9wPww==", "dev": true }, "@types/json-schema": { diff --git a/package.json b/package.json index 8449c94e..a4343d2d 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/jest": "^26.0.13", - "@types/js-yaml": "^3.12.4", + "@types/js-yaml": "^3.12.5", "@types/mustache": "^4.0.1", "@types/node": "~12", "@typescript-eslint/eslint-plugin": "^4.0.0", diff --git a/src/main.ts b/src/main.ts index fe154d50..a2824d57 100644 --- a/src/main.ts +++ b/src/main.ts @@ -64,7 +64,8 @@ export async function run(): Promise { `); const configFilePath = inps.ConfigFilePath; - const config = yaml.safeLoad(fs.readFileSync(configFilePath, 'utf8')); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const config: any = yaml.safeLoad(fs.readFileSync(configFilePath, 'utf8')); if (core.isDebug()) { core.startGroup('Dump Config'); console.log(config);