From 54883f49706692434506fbeea76caf33c7f16db2 Mon Sep 17 00:00:00 2001 From: Sebastian Korfmann Date: Sat, 4 Nov 2023 21:29:35 +0100 Subject: [PATCH] Use ni to support pnpm and yarn --- actions/deploy/src/main.ts | 7 ++++--- actions/pull-request-diff/src/main.ts | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/actions/deploy/src/main.ts b/actions/deploy/src/main.ts index ead13a8..65bf9cf 100644 --- a/actions/deploy/src/main.ts +++ b/actions/deploy/src/main.ts @@ -41,13 +41,14 @@ async function run(): Promise { await runCommand('npm', ['install', '-g', `winglang@${version}`]) core.info(`Installed winglang@${version}`) + await runCommand('npm', ['install', '-g', `@antfu/ni`]) // if package.json exists, install dependencies if (fs.existsSync(path.join(process.cwd(), 'package.json'))) { - await runCommand('npm', ['ci']) - core.info(`Installed NPM dependencies with npm ci`) + await runCommand('ni', ['--frozen']) + core.info(`Installed NPM dependencies with ni --frozen`) } else { - core.info(`No package.json found, skipping npm ci`) + core.info(`No package.json found, skipping ni --frozen`) } const tfEnv: Record = { diff --git a/actions/pull-request-diff/src/main.ts b/actions/pull-request-diff/src/main.ts index ed6b0e0..9a9242d 100644 --- a/actions/pull-request-diff/src/main.ts +++ b/actions/pull-request-diff/src/main.ts @@ -65,13 +65,14 @@ async function run(): Promise { await runCommand('npm', ['install', '-g', `winglang@${version}`]) core.info(`Installed winglang@${version}`) + await runCommand('npm', ['install', '-g', `@antfu/ni`]) // if package.json exists, install dependencies if (fs.existsSync(path.join(process.cwd(), 'package.json'))) { - await runCommand('npm', ['ci']) - core.info(`Installed NPM dependencies with npm ci`) + await runCommand('ni', ['--frozen']) + core.info(`Installed NPM dependencies with ni --frozen`) } else { - core.info(`No package.json found, skipping npm ci`) + core.info(`No package.json found, skipping ni --frozen`) } const tfEnv: Record = {