mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-22 01:53:24 +01:00
Merge pull request #193 from cloudflare/cina/fix-packagemanager-default
Don't set `packageManager` default via action.yml
This commit is contained in:
commit
f40a9f5f82
5 changed files with 9 additions and 5 deletions
5
.changeset/dirty-poets-swim.md
Normal file
5
.changeset/dirty-poets-swim.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"wrangler-action": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixed the package manager not being inferred based on lockfile when the `packageManager` input isn't set.
|
|
@ -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."
|
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
|
required: false
|
||||||
packageManager:
|
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
|
required: false
|
||||||
default: npm
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ describe("getPackageManager", () => {
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
|
|
||||||
expect(getPackageManager('bun', { workingDirectory: "test/bun" }))
|
expect(getPackageManager("bun", { workingDirectory: "test/bun" }))
|
||||||
.toMatchInlineSnapshot(`
|
.toMatchInlineSnapshot(`
|
||||||
{
|
{
|
||||||
"exec": "bunx",
|
"exec": "bunx",
|
||||||
|
|
|
@ -21,7 +21,7 @@ const PACKAGE_MANAGERS = {
|
||||||
},
|
},
|
||||||
bun: {
|
bun: {
|
||||||
install: "bun i",
|
install: "bun i",
|
||||||
exec: "bunx"
|
exec: "bunx",
|
||||||
},
|
},
|
||||||
} as const satisfies Readonly<Record<string, PackageManager>>;
|
} as const satisfies Readonly<Record<string, PackageManager>>;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"name": "wrangler-action-bun-test",
|
"name": "wrangler-action-bun-test"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue