From 18146620a7e21de075cfde969c6b2d5d3e920b9d Mon Sep 17 00:00:00 2001 From: Cina Saffary Date: Tue, 10 Oct 2023 17:42:37 -0500 Subject: [PATCH] Don't set `packageManager` default via action.yml We need to distinguish between when the value is and isn't set in order to perform inference based on lockfile and only fallback to the default of npm if inference fails. --- .changeset/dirty-poets-swim.md | 5 +++++ action.yml | 3 +-- test/bun/package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/dirty-poets-swim.md diff --git a/.changeset/dirty-poets-swim.md b/.changeset/dirty-poets-swim.md new file mode 100644 index 00000000..38a42fe1 --- /dev/null +++ b/.changeset/dirty-poets-swim.md @@ -0,0 +1,5 @@ +--- +"wrangler-action": patch +--- + +Fixed the package manager not being inferred based on lockfile when the `packageManager` input isn't set. diff --git a/action.yml b/action.yml index 657d76a9..b5fda3ea 100644 --- a/action.yml +++ b/action.yml @@ -42,6 +42,5 @@ inputs: description: "A string of environment variable names, separated by newlines. These will be bound to your Worker using the values of matching environment variables declared in `env` of this workflow." required: false packageManager: - description: "The package manager you'd like to use to install and run wrangler. If not specified, a value will be inferred based on the presence of a lockfile. Valid values: [npm, pnpm, yarn, bun]" + description: "The package manager you'd like to use to install and run wrangler. If not specified, the preferred package manager will be inferred based on the presence of a lockfile or fallback to using npm if no lockfile is found. Valid values are `npm` | `pnpm` | `yarn` | `bun`." required: false - default: npm diff --git a/test/bun/package.json b/test/bun/package.json index 75d5eebd..e5fb3ef1 100644 --- a/test/bun/package.json +++ b/test/bun/package.json @@ -1,3 +1,3 @@ { - "name": "wrangler-action-bun-test", + "name": "wrangler-action-bun-test" }