Skip to content

Commit 43ece3c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into poc/windows-sigint-fixes
2 parents 559af09 + 2231500 commit 43ece3c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2005
-986
lines changed

docs/guides/ecosystem/pm2.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Alternatively, you can create a PM2 configuration file. Create a file named `pm2
3333

3434
```js pm2.config.js icon="file-code"
3535
module.exports = {
36-
title: "app", // Name of your application
36+
name: "app", // Name of your application
3737
script: "index.ts", // Entry point of your application
3838
interpreter: "bun", // Bun interpreter
3939
env: {

docs/pm/isolated-installs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Isolated installs are conceptually similar to pnpm, so migration should be strai
189189

190190
```bash terminal icon="terminal"
191191
# Remove pnpm files
192-
$ rm -rf node_modules pnpm-lock.yaml
192+
rm -rf node_modules pnpm-lock.yaml
193193

194194
# Install with Bun's isolated linker
195195
bun install --linker isolated

docs/project/building-windows.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ It is strongly recommended to use [PowerShell 7 (`pwsh.exe`)](https://learn.micr
1414
By default, running unverified scripts are blocked.
1515

1616
```ps1
17-
> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
17+
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
1818
```
1919

2020
### System Dependencies
2121

2222
Bun v1.1 or later. We use Bun to run it's own code generators.
2323

2424
```ps1
25-
> irm bun.sh/install.ps1 | iex
25+
irm bun.sh/install.ps1 | iex
2626
```
2727

2828
[Visual Studio](https://visualstudio.microsoft.com) with the "Desktop Development with C++" workload. While installing, make sure to install Git as well, if Git for Windows is not already installed.
2929

3030
Visual Studio can be installed graphically using the wizard or through WinGet:
3131

3232
```ps1
33-
> winget install "Visual Studio Community 2022" --override "--add Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.Git " -s msstore
33+
winget install "Visual Studio Community 2022" --override "--add Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.Git " -s msstore
3434
```
3535

3636
After Visual Studio, you need the following:
@@ -48,10 +48,10 @@ After Visual Studio, you need the following:
4848
[Scoop](https://scoop.sh) can be used to install these remaining tools easily.
4949

5050
```ps1 Scoop
51-
> irm https://get.scoop.sh | iex
52-
> scoop install nodejs-lts go rust nasm ruby perl ccache
51+
irm https://get.scoop.sh | iex
52+
scoop install nodejs-lts go rust nasm ruby perl ccache
5353
# scoop seems to be buggy if you install llvm and the rest at the same time
54-
> scoop install [email protected]
54+
scoop install [email protected]
5555
```
5656

5757
<Note>
@@ -63,19 +63,19 @@ After Visual Studio, you need the following:
6363
If you intend on building WebKit locally (optional), you should install these packages:
6464

6565
```ps1 Scoop
66-
> scoop install make cygwin python
66+
scoop install make cygwin python
6767
```
6868

6969
From here on out, it is **expected you use a PowerShell Terminal with `.\scripts\vs-shell.ps1` sourced**. This script is available in the Bun repository and can be loaded by executing it:
7070

7171
```ps1
72-
> .\scripts\vs-shell.ps1
72+
.\scripts\vs-shell.ps1
7373
```
7474

7575
To verify, you can check for an MSVC-only command line such as `mt.exe`
7676

7777
```ps1
78-
> Get-Command mt
78+
Get-Command mt
7979
```
8080

8181
<Note>
@@ -86,16 +86,16 @@ To verify, you can check for an MSVC-only command line such as `mt.exe`
8686
## Building
8787

8888
```ps1
89-
> bun run build
89+
bun run build
9090
9191
# after the initial `bun run build` you can use the following to build
92-
> ninja -Cbuild/debug
92+
ninja -Cbuild/debug
9393
```
9494

9595
If this was successful, you should have a `bun-debug.exe` in the `build/debug` folder.
9696

9797
```ps1
98-
> .\build\debug\bun-debug.exe --revision
98+
.\build\debug\bun-debug.exe --revision
9999
```
100100

101101
You should add this to `$Env:PATH`. The simplest way to do so is to open the start menu, type "Path", and then navigate the environment variables menu to add `C:\.....\bun\build\debug` to the user environment variable `PATH`. You should then restart your editor (if it does not update still, log out and log back in).
@@ -111,15 +111,15 @@ You can run the test suite either using `bun test <path>` or by using the wrappe
111111

112112
```ps1
113113
# Setup
114-
> bun i --cwd packages\bun-internal-test
114+
bun i --cwd packages\bun-internal-test
115115
116116
# Run the entire test suite with reporter
117117
# the package.json script "test" uses "build/debug/bun-debug.exe" by default
118-
> bun run test
118+
bun run test
119119
120120
# Run an individual test file:
121-
> bun-debug test node\fs
122-
> bun-debug test "C:\bun\test\js\bun\resolve\import-meta.test.js"
121+
bun-debug test node\fs
122+
bun-debug test "C:\bun\test\js\bun\resolve\import-meta.test.js"
123123
```
124124

125125
## Troubleshooting

docs/project/contributing.mdx

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ Using your system's package manager, install Bun's dependencies:
2828
<CodeGroup>
2929

3030
```bash macOS (Homebrew)
31-
$ brew install automake ccache cmake coreutils gnu-sed go icu4c libiconv libtool ninja pkg-config rust ruby
31+
brew install automake ccache cmake coreutils gnu-sed go icu4c libiconv libtool ninja pkg-config rust ruby
3232
```
3333

3434
```bash Ubuntu/Debian
35-
$ sudo apt install curl wget lsb-release software-properties-common cargo cmake git golang libtool ninja-build pkg-config rustc ruby-full xz-utils
35+
sudo apt install curl wget lsb-release software-properties-common cargo cmake git golang libtool ninja-build pkg-config rustc ruby-full xz-utils
3636
```
3737

3838
```bash Arch
39-
$ sudo pacman -S base-devel cmake git go libiconv libtool make ninja pkg-config python rust sed unzip ruby
39+
sudo pacman -S base-devel cmake git go libiconv libtool make ninja pkg-config python rust sed unzip ruby
4040
```
4141

4242
```bash Fedora
43-
$ sudo dnf install cargo clang19 llvm19 lld19 cmake git golang libtool ninja-build pkg-config rustc ruby libatomic-static libstdc++-static sed unzip which libicu-devel 'perl(Math::BigInt)'
43+
sudo dnf install cargo clang19 llvm19 lld19 cmake git golang libtool ninja-build pkg-config rustc ruby libatomic-static libstdc++-static sed unzip which libicu-devel 'perl(Math::BigInt)'
4444
```
4545

4646
```bash openSUSE Tumbleweed
47-
$ sudo zypper install go cmake ninja automake git icu rustup && rustup toolchain install stable
47+
sudo zypper install go cmake ninja automake git icu rustup && rustup toolchain install stable
4848
```
4949

5050
</CodeGroup>
@@ -56,16 +56,16 @@ Before starting, you will need to already have a release build of Bun installed,
5656
<CodeGroup>
5757

5858
```bash Native
59-
$ curl -fsSL https://bun.com/install | bash
59+
curl -fsSL https://bun.com/install | bash
6060
```
6161

6262
```bash npm
63-
$ npm install -g bun
63+
npm install -g bun
6464
```
6565

6666
```bash Homebrew
67-
$ brew tap oven-sh/bun
68-
$ brew install bun
67+
brew tap oven-sh/bun
68+
brew install bun
6969
```
7070

7171
</CodeGroup>
@@ -76,19 +76,19 @@ ccache is used to cache compilation artifacts, significantly speeding up builds:
7676

7777
```bash
7878
# For macOS
79-
$ brew install ccache
79+
brew install ccache
8080

8181
# For Ubuntu/Debian
82-
$ sudo apt install ccache
82+
sudo apt install ccache
8383

8484
# For Arch
85-
$ sudo pacman -S ccache
85+
sudo pacman -S ccache
8686

8787
# For Fedora
88-
$ sudo dnf install ccache
88+
sudo dnf install ccache
8989

9090
# For openSUSE
91-
$ sudo zypper install ccache
91+
sudo zypper install ccache
9292
```
9393

9494
Our build scripts will automatically detect and use `ccache` if available. You can check cache statistics with `ccache --show-stats`.
@@ -100,24 +100,24 @@ Bun requires LLVM 19 (`clang` is part of LLVM). This version requirement is to m
100100
<CodeGroup>
101101

102102
```bash macOS (Homebrew)
103-
$ brew install llvm@19
103+
brew install llvm@19
104104
```
105105

106106
```bash Ubuntu/Debian
107-
$ # LLVM has an automatic installation script that is compatible with all versions of Ubuntu
108-
$ wget https://apt.llvm.org/llvm.sh -O - | sudo bash -s -- 19 all
107+
# LLVM has an automatic installation script that is compatible with all versions of Ubuntu
108+
wget https://apt.llvm.org/llvm.sh -O - | sudo bash -s -- 19 all
109109
```
110110

111111
```bash Arch
112-
$ sudo pacman -S llvm clang lld
112+
sudo pacman -S llvm clang lld
113113
```
114114

115115
```bash Fedora
116-
$ sudo dnf install llvm clang lld-devel
116+
sudo dnf install llvm clang lld-devel
117117
```
118118

119119
```bash openSUSE Tumbleweed
120-
$ sudo zypper install clang19 lld19 llvm19
120+
sudo zypper install clang19 lld19 llvm19
121121
```
122122

123123
</CodeGroup>
@@ -127,7 +127,7 @@ If none of the above solutions apply, you will have to install it [manually](htt
127127
Make sure Clang/LLVM 19 is in your path:
128128

129129
```bash
130-
$ which clang-19
130+
which clang-19
131131
```
132132

133133
If not, run this to manually add it:
@@ -137,12 +137,12 @@ If not, run this to manually add it:
137137
```bash macOS (Homebrew)
138138
# use fish_add_path if you're using fish
139139
# use path+="$(brew --prefix llvm@19)/bin" if you are using zsh
140-
$ export PATH="$(brew --prefix llvm@19)/bin:$PATH"
140+
export PATH="$(brew --prefix llvm@19)/bin:$PATH"
141141
```
142142

143143
```bash Arch
144144
# use fish_add_path if you're using fish
145-
$ export PATH="$PATH:/usr/lib/llvm19/bin"
145+
export PATH="$PATH:/usr/lib/llvm19/bin"
146146
```
147147

148148
</CodeGroup>
@@ -162,7 +162,7 @@ bun run build
162162
The binary will be located at `./build/debug/bun-debug`. It is recommended to add this to your `$PATH`. To verify the build worked, let's print the version number on the development build of Bun.
163163

164164
```bash
165-
$ build/debug/bun-debug --version
165+
build/debug/bun-debug --version
166166
x.y.z_debug
167167
```
168168

@@ -261,17 +261,17 @@ WebKit is not cloned by default (to save time and disk space). To clone and buil
261261

262262
```bash
263263
# Clone WebKit into ./vendor/WebKit
264-
$ git clone https://github.com/oven-sh/WebKit vendor/WebKit
264+
git clone https://github.com/oven-sh/WebKit vendor/WebKit
265265

266266
# Check out the commit hash specified in `set(WEBKIT_VERSION <commit_hash>)` in cmake/tools/SetupWebKit.cmake
267-
$ git -C vendor/WebKit checkout <commit_hash>
267+
git -C vendor/WebKit checkout <commit_hash>
268268

269269
# Make a debug build of JSC. This will output build artifacts in ./vendor/WebKit/WebKitBuild/Debug
270270
# Optionally, you can use `bun run jsc:build` for a release build
271271
bun run jsc:build:debug && rm vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/DerivedSources/inspector/InspectorProtocolObjects.h
272272

273273
# After an initial run of `make jsc-debug`, you can rebuild JSC with:
274-
$ cmake --build vendor/WebKit/WebKitBuild/Debug --target jsc && rm vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/DerivedSources/inspector/InspectorProtocolObjects.h
274+
cmake --build vendor/WebKit/WebKitBuild/Debug --target jsc && rm vendor/WebKit/WebKitBuild/Debug/JavaScriptCore/DerivedSources/inspector/InspectorProtocolObjects.h
275275

276276
# Build bun with the local JSC build
277277
bun run build:local
@@ -322,36 +322,36 @@ is not able to compile a simple test program.
322322
To fix the error, we need to update the GCC version to 11. To do this, we'll need to check if the latest version is available in the distribution's official repositories or use a third-party repository that provides GCC 11 packages. Here are general steps:
323323

324324
```bash
325-
$ sudo apt update
326-
$ sudo apt install gcc-11 g++-11
325+
sudo apt update
326+
sudo apt install gcc-11 g++-11
327327
# If the above command fails with `Unable to locate package gcc-11` we need
328328
# to add the APT repository
329-
$ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
329+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
330330
# Now run `apt install` again
331-
$ sudo apt install gcc-11 g++-11
331+
sudo apt install gcc-11 g++-11
332332
```
333333

334334
Now, we need to set GCC 11 as the default compiler:
335335

336336
```bash
337-
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
338-
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
337+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
338+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
339339
```
340340

341341
### libarchive
342342

343343
If you see an error on macOS when compiling `libarchive`, run:
344344

345345
```bash
346-
$ brew install pkg-config
346+
brew install pkg-config
347347
```
348348

349349
### macOS `library not found for -lSystem`
350350

351351
If you see this error when compiling, run:
352352

353353
```bash
354-
$ xcode-select --install
354+
xcode-select --install
355355
```
356356

357357
### Cannot find `libatomic.a`

docs/runtime/templating/create.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you're looking to create a brand new empty project, use [`bun init`](/runtime
1919
`bun create ./MyComponent.tsx` turns an existing React component into a complete dev environment with hot reload and production builds in one command.
2020

2121
```bash
22-
$ bun create ./MyComponent.jsx # .tsx also supported
22+
bun create ./MyComponent.jsx # .tsx also supported
2323
```
2424

2525
<Frame>

docs/style.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,25 +149,25 @@ div.callout .code-block {
149149
margin-bottom: 0px;
150150
}
151151

152-
.code-block[language="shellscript"] code span.line:not(:empty):has(span)::before {
152+
[language="shellscript"] code span.line:not(:empty):has(span)::before {
153153
content: "$ ";
154154
color: #6272a4;
155155
user-select: none;
156156
}
157157

158-
.code-block[language="shellscript"] code span.line:has(> span:first-child[style*="color: rgb(98, 114, 164)"])::before,
159-
.code-block[language="shellscript"] code span.line:has(> span:first-child[style*="#6272A4"])::before {
158+
[language="shellscript"] code span.line:has(> span:first-child[style*="color: rgb(98, 114, 164)"])::before,
159+
[language="shellscript"] code span.line:has(> span:first-child[style*="#6272A4"])::before {
160160
content: "";
161161
}
162162

163-
.code-block[language="powershell"] code span.line:not(:empty):has(span)::before {
163+
[language="powershell"] code span.line:not(:empty):has(span)::before {
164164
content: "> ";
165165
color: #6272a4;
166166
user-select: none;
167167
}
168168

169-
.code-block[language="powershell"] code span.line:has(> span:first-child[style*="color: rgb(98, 114, 164)"])::before,
170-
.code-block[language="powershell"] code span.line:has(> span:first-child[style*="#6272A4"])::before {
169+
[language="powershell"] code span.line:has(> span:first-child[style*="color: rgb(98, 114, 164)"])::before,
170+
[language="powershell"] code span.line:has(> span:first-child[style*="#6272A4"])::before {
171171
content: "";
172172
}
173173

packages/bun-types/s3.d.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,30 @@ declare module "bun" {
321321
| "SNOW"
322322
| "STANDARD_IA";
323323

324+
/**
325+
* When set to `true`, confirms that the requester knows they will be charged
326+
* for the request and data transfer costs. Required for accessing objects
327+
* in Requester Pays buckets.
328+
*
329+
* @see https://docs.aws.amazon.com/AmazonS3/latest/userguide/RequesterPaysBuckets.html
330+
*
331+
* @example
332+
* // Accessing a file in a Requester Pays bucket
333+
* const file = s3.file("data.csv", {
334+
* bucket: "requester-pays-bucket",
335+
* requestPayer: true
336+
* });
337+
* const content = await file.text();
338+
*
339+
* @example
340+
* // Uploading to a Requester Pays bucket
341+
* await s3.write("output.json", data, {
342+
* bucket: "requester-pays-bucket",
343+
* requestPayer: true
344+
* });
345+
*/
346+
requestPayer?: boolean;
347+
324348
/**
325349
* @deprecated The size of the internal buffer in bytes. Defaults to 5 MiB. use `partSize` and `queueSize` instead.
326350
*/

0 commit comments

Comments
 (0)