Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
khai96_
3e1d3719bd refactor: remove star imports
Some checks are pending
Test Action / Test with default inputs (push) Waiting to run
Test Action / Test with default inputs-1 (push) Waiting to run
Test Action / Test with default inputs-2 (push) Waiting to run
Test Action / Test with dest (push) Waiting to run
Test Action / Test with dest-1 (push) Waiting to run
Test Action / Test with dest-2 (push) Waiting to run
Test Action / Test with standalone (push) Waiting to run
Test Action / Test with standalone-1 (push) Waiting to run
Test Action / Test with standalone-2 (push) Waiting to run
Test Action / Test with standalone-3 (push) Waiting to run
Test Action / Test with standalone-4 (push) Waiting to run
Test Action / Test with standalone-5 (push) Waiting to run
Test Action / Test with run_install (array, macos-latest) (push) Waiting to run
Test Action / Test with run_install (empty object, macos-latest) (push) Waiting to run
Test Action / Test with run_install (global, macos-latest) (push) Waiting to run
Test Action / Test with run_install (null, macos-latest) (push) Waiting to run
Test Action / Test with run_install (recursive, macos-latest) (push) Waiting to run
Test Action / Test with run_install (array, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (global, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (null, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Waiting to run
Test Action / Test with run_install (array, windows-latest) (push) Waiting to run
Test Action / Test with run_install (empty object, windows-latest) (push) Waiting to run
Test Action / Test with run_install (global, windows-latest) (push) Waiting to run
Test Action / Test with run_install (null, windows-latest) (push) Waiting to run
Test Action / Test with run_install (recursive, windows-latest) (push) Waiting to run
2025-12-09 07:14:11 +07:00
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
import { getInput, error } from '@actions/core'
import * as yaml from 'yaml'
import { parse as parseYaml } from 'yaml'
import { z, ZodError } from 'zod'
const RunInstallSchema = z.object({
@ -20,7 +20,7 @@ export type RunInstall = z.infer<typeof RunInstallSchema>
export function parseRunInstall(inputName: string): RunInstall[] {
const input = getInput(inputName, { required: true })
const parsedInput: unknown = yaml.parse(input)
const parsedInput: unknown = parseYaml(input)
try {
const result: RunInstallInput = RunInstallInputSchema.parse(parsedInput)

View file

@ -6,7 +6,7 @@ import path from 'path'
import { execPath } from 'process'
import util from 'util'
import { Inputs } from '../inputs'
import YAML from 'yaml'
import { parse as parseYaml } from 'yaml'
export async function runSelfInstaller(inputs: Inputs): Promise<number> {
const { version, dest, packageJsonFile, standalone } = inputs
@ -63,7 +63,7 @@ async function readTarget(opts: {
try {
const content = readFileSync(path.join(GITHUB_WORKSPACE, packageJsonFile), 'utf8');
({ packageManager } = packageJsonFile.endsWith(".yaml")
? YAML.parse(content, { merge: true })
? parseYaml(content, { merge: true })
: JSON.parse(content)
)
} catch (error: unknown) {