From 086248d904de11e17f919739f4f5906687f16fed Mon Sep 17 00:00:00 2001 From: melvinmcrn Date: Wed, 9 Oct 2024 21:05:10 +0700 Subject: [PATCH] add support for bun --- src/lib/npm-ci.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/npm-ci.js b/src/lib/npm-ci.js index 705eb34..daeaa61 100644 --- a/src/lib/npm-ci.js +++ b/src/lib/npm-ci.js @@ -30,6 +30,11 @@ async function npmCi({ cwd } = {}) { // pnpm is not installed on GitHub Actions by default installCommand = 'npx pnpm i --frozen-lockfile'; + } else if (fs.existsSync('bun.lockb')) { + log.info('Installing dependencies with bun'); + + // bun is not installed on GitHub Actions by default, expect user to use `oven-sh/setup-bun` + installCommand = 'bun i --frozen-lockfile'; } else { log.info('No lock file detected. Installing dependencies with npm'); installCommand = 'npm i';