Merge branch 'main' into new-lambda-hotdog-bus

This commit is contained in:
Okinea Dev 2025-07-11 08:31:26 +02:00 committed by GitHub
commit ef1386c94a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 435 additions and 130 deletions

View file

@ -17,16 +17,14 @@ jobs:
- name: 📥 Checkout
uses: actions/checkout@v4
- name: 🛠️ Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: 🛠️ Setup Bun
uses: ./
- name: 📦 Install Dependencies
run: npm install
run: bun install
- name: 🧹 Format
run: npm run format
run: bun run format
- name: 💾 Commit
uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef

View file

@ -54,10 +54,11 @@ jobs:
- latest
- canary
- "1.1.0"
- "1.x"
- "1"
- "> 1.0.0"
- "< 2"
# https://github.com/oven-sh/setup-bun/issues/37
# - "1.x"
# - "1"
# - "> 1.0.0"
# - "< 2"
# Disable <sha> support for now. This is because Github Artifacts
# expire after 90 days, and we don't have another source of truth yet.
# - "822a00c4d508b54f650933a73ca5f4a3af9a7983" # 1.0.0 commit
@ -89,21 +90,27 @@ jobs:
- windows-latest
file:
- name: package.json (bun@1.1.0)
- name: package.json (packageManager bun@1.1.0)
file: package.json
run: |
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > package.json
- name: /foo/package.json (bun@1.1.0)
file: /foo/package.json
- name: foo/package.json (packageManager bun@1.1.0)
file: foo/package.json
run: |
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > /foo/package.json
mkdir -p foo
echo "$(jq '. += {"packageManager": "bun@1.1.0"}' package.json)" > foo/package.json
- name: package.json (yarn@bun@1.1.0)
- name: package.json (packageManager yarn@bun@1.1.0)
file: package.json
run: |
echo "$(jq '. += {"packageManager": "yarn@bun@1.1.0"}' package.json)" > package.json
- name: package.json (engines bun@1.1.0)
file: package.json
run: |
echo "$(jq '.engines = {"bun": "1.1.0"}' package.json)" > package.json
- name: .tool-versions (bun 1.1.0)
file: .tool-versions
run: echo "bun 1.1.0" > .tool-versions

View file

@ -64,10 +64,6 @@ If you need to override the download URL, you can use the `bun-download-url` inp
bun-download-url: "https://github.com/oven-sh/bun/releases/latest/download/bun-linux-x64.zip"
```
### Node.js not needed
In most cases, you shouldn't need to use the [setup-node](https://github.com/actions/setup-node) GitHub Action.
## Inputs
| Name | Description | Default | Examples |

216
dist/cache-save/index.js generated vendored

File diff suppressed because one or more lines are too long

304
dist/setup/index.js generated vendored

File diff suppressed because one or more lines are too long

View file

@ -28,8 +28,10 @@ export function addExtension(path: string, ext: string): string {
}
const FILE_VERSION_READERS = {
"package.json": (content: string) =>
JSON.parse(content).packageManager?.split("bun@")?.[1],
"package.json": (content: string) => {
const pkg = JSON.parse(content);
return pkg.packageManager?.split("bun@")?.[1] ?? pkg.engines?.bun;
},
".tool-versions": (content: string) =>
content.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,
".bumrc": (content: string) => content, // https://github.com/owenizedd/bum