From 8bc5c5f05023d43922df3d0ffe5a5b064c6fa645 Mon Sep 17 00:00:00 2001 From: James Ross Date: Thu, 26 Sep 2024 01:02:47 +0100 Subject: [PATCH] chore: add support for new bun.lock --- .github/workflows/semgrep.yml | 4 ++-- README.md | 2 +- package-lock.json | 4 ++-- src/packageManagers.ts | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index b40314b..bb1d808 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -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: diff --git a/README.md b/README.md index 3ddfda2..c620136 100644 --- a/README.md +++ b/README.md @@ -289,7 +289,7 @@ https://.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. diff --git a/package-lock.json b/package-lock.json index 908cf86..ce685f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "wrangler-action", - "version": "3.6.1", + "version": "3.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "wrangler-action", - "version": "3.6.1", + "version": "3.7.0", "license": "MIT OR Apache-2.0", "dependencies": { "@actions/core": "^1.10.1", diff --git a/src/packageManagers.ts b/src/packageManagers.ts index 4f19bae..b91386b 100644 --- a/src/packageManagers.ts +++ b/src/packageManagers.ts @@ -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;