Skip to content

Commit

Permalink
Merge pull request #294 from Cherry/chore/bun-lockfile-new
Browse files Browse the repository at this point in the history
chore: add support for new bun.lock
  • Loading branch information
Maximo-Guk authored Sep 26, 2024
2 parents c15498d + 8bc5c5f commit bcff538
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
on:
pull_request: {}
workflow_dispatch: {}
push:
push:
branches:
- main
- master
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
name: Semgrep config
jobs:
semgrep:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ https://<your_pages_site>.pages.dev

### Using a different package manager

By default, this action will detect which package manager to use, based on the presence of a `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, or `bun.lockb` file.
By default, this action will detect which package manager to use, based on the presence of a `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, or `bun.lockb`/`bun.lock` file.

If you need to use a specific package manager for your application, you can set the `packageManager` input to `npm`, `yarn`, `pnpm`, or `bun`. You don't need to set this option unless you want to override the default behavior.

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/packageManagers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ function detectPackageManager(
if (existsSync(path.join(workingDirectory, "pnpm-lock.yaml"))) {
return "pnpm";
}
if (existsSync(path.join(workingDirectory, "bun.lockb"))) {
if (
existsSync(path.join(workingDirectory, "bun.lockb")) ||
existsSync(path.join(workingDirectory, "bun.lock"))
) {
return "bun";
}
return null;
Expand Down

0 comments on commit bcff538

Please sign in to comment.