Skip to content

feat: support text-based Bun bun.lock file #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ async function run(octokit, context, token) {

let yarnLock = await fileExists(path.resolve(cwd, 'yarn.lock'));
let pnpmLock = await fileExists(path.resolve(cwd, 'pnpm-lock.yaml'));
let bunLock = await fileExists(path.resolve(cwd, 'bun.lockb'));
let bunLockb = await fileExists(path.resolve(cwd, 'bun.lockb'));
let bunLock = await fileExists(path.resolve(cwd, 'bun.lock'));
let packageLock = await fileExists(path.resolve(cwd, 'package-lock.json'));

let packageManager = 'npm';
Expand All @@ -63,7 +64,7 @@ async function run(octokit, context, token) {
} else if (pnpmLock) {
installScript = 'pnpm install --frozen-lockfile';
packageManager = 'pnpm';
} else if (bunLock) {
} else if (bunLockb || bunLock) {
installScript = 'bun install --frozen-lockfile';
packageManager = 'bun';
} else if (packageLock) {
Expand Down Expand Up @@ -129,7 +130,8 @@ async function run(octokit, context, token) {

yarnLock = await fileExists(path.resolve(cwd, 'yarn.lock'));
pnpmLock = await fileExists(path.resolve(cwd, 'pnpm-lock.yaml'));
bunLock = await fileExists(path.resolve(cwd, 'bun.lockb'));
bunLockb = await fileExists(path.resolve(cwd, 'bun.lockb'));
bunLock = await fileExists(path.resolve(cwd, 'bun.lock'));
packageLock = await fileExists(path.resolve(cwd, 'package-lock.json'));

packageManager = 'npm';
Expand All @@ -140,7 +142,7 @@ async function run(octokit, context, token) {
} else if (pnpmLock) {
installScript = `pnpm install --frozen-lockfile`;
packageManager = `pnpm`;
} else if (bunLock) {
} else if (bunLockb || bunLock) {
installScript = `bun install --frozen-lockfile`;
packageManager = `bun`;
} else if (packageLock) {
Expand Down