mirror of
https://github.com/pnpm/action-setup.git
synced 2024-11-10 09:39:11 +08:00
Fix js-yaml usage
This commit is contained in:
parent
2a105263a5
commit
3a2c7247e1
BIN
dist/index.js
vendored
BIN
dist/index.js
vendored
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
import process from 'process'
|
||||
import { safeLoad } from 'js-yaml'
|
||||
import { load } from 'js-yaml'
|
||||
import Ajv from 'ajv'
|
||||
import { getInput, error, InputOptions } from '@actions/core'
|
||||
import runInstallSchema from './run-install-input.schema.json'
|
||||
@ -21,10 +21,9 @@ const options: InputOptions = {
|
||||
}
|
||||
|
||||
export function parseRunInstall(name: string): RunInstall[] {
|
||||
const result: RunInstallInput = safeLoad(getInput(name, options)) as any
|
||||
const result: RunInstallInput = load(getInput(name, options)) as any
|
||||
const ajv = new Ajv({
|
||||
allErrors: true,
|
||||
async: false,
|
||||
})
|
||||
const validate = ajv.compile(runInstallSchema)
|
||||
if (!validate(result)) {
|
||||
|
Loading…
Reference in New Issue
Block a user