File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import { getInput , error } from '@actions/core'
2- import * as yaml from 'yaml'
2+ import { parse as parseYaml } from 'yaml'
33import { z , ZodError } from 'zod'
44
55const RunInstallSchema = z . object ( {
@@ -20,7 +20,7 @@ export type RunInstall = z.infer<typeof RunInstallSchema>
2020
2121export function parseRunInstall ( inputName : string ) : RunInstall [ ] {
2222 const input = getInput ( inputName , { required : true } )
23- const parsedInput : unknown = yaml . parse ( input )
23+ const parsedInput : unknown = parseYaml ( input )
2424
2525 try {
2626 const result : RunInstallInput = RunInstallInputSchema . parse ( parsedInput )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import path from 'path'
66import { execPath } from 'process'
77import util from 'util'
88import { Inputs } from '../inputs'
9- import YAML from 'yaml'
9+ import { parse as parseYaml } from 'yaml'
1010
1111export async function runSelfInstaller ( inputs : Inputs ) : Promise < number > {
1212 const { version, dest, packageJsonFile, standalone } = inputs
@@ -63,7 +63,7 @@ async function readTarget(opts: {
6363 try {
6464 const content = readFileSync ( path . join ( GITHUB_WORKSPACE , packageJsonFile ) , 'utf8' ) ;
6565 ( { packageManager } = packageJsonFile . endsWith ( ".yaml" )
66- ? YAML . parse ( content , { merge : true } )
66+ ? parseYaml ( content , { merge : true } )
6767 : JSON . parse ( content )
6868 )
6969 } catch ( error : unknown ) {
You can’t perform that action at this time.
0 commit comments