Skip to content

Commit 61bc82c

Browse files
authored
refactor: remove star imports (#196)
1 parent e94b270 commit 61bc82c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/inputs/run-install.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getInput, error } from '@actions/core'
2-
import * as yaml from 'yaml'
2+
import { parse as parseYaml } from 'yaml'
33
import { z, ZodError } from 'zod'
44

55
const RunInstallSchema = z.object({
@@ -20,7 +20,7 @@ export type RunInstall = z.infer<typeof RunInstallSchema>
2020

2121
export 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)

src/install-pnpm/run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import path from 'path'
66
import { execPath } from 'process'
77
import util from 'util'
88
import { Inputs } from '../inputs'
9-
import YAML from 'yaml'
9+
import { parse as parseYaml } from 'yaml'
1010

1111
export 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) {

0 commit comments

Comments
 (0)