Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build-utils] Add zero config detection for bun package manager (#10486)
> [!IMPORTANT] > This PR will only support Bun as a package manager at build time. > Bun will **not** work at runtime with Serverless Functions or Edge Functions at this time. - Depends on vercel/api#21869 - Fixes https://github.com/orgs/vercel/discussions/2021 - Closes #10244 - Related nodejs/corepack#295 - Docs https://bun.sh/docs/install
- Loading branch information
Showing
9 changed files
with
106 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@vercel/build-utils": minor | ||
--- | ||
|
||
[build-utils] Add zero config detection for bun package manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.vercel | ||
public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { mkdir, rm, writeFile } from 'node:fs/promises' | ||
import { say } from 'cowsay' | ||
|
||
const text = say({ text: `bun version: ${process.versions.bun}` }) | ||
const content = say({ text }) | ||
await rm('./public', { recursive: true, force: true }) | ||
await mkdir('./public', { recursive: true }) | ||
await writeFile('./public/index.txt', content) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"build": "bun build.js" | ||
}, | ||
"dependencies": { | ||
"cowsay": "1.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"probes": [ | ||
{ | ||
"path": "/", | ||
"mustContain": "bun version: 1" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters