bun-types
Advanced tools
Comparing version
@@ -340,3 +340,3 @@ Bun implements the WHATWG `fetch` standard, with some extensions to meet the needs of server-side JavaScript. | ||
[fetch] > Connection: keep-alive | ||
[fetch] > User-Agent: Bun/1.2.4-canary.20250225T140609 | ||
[fetch] > User-Agent: Bun/bun-v1.2.4 | ||
[fetch] > Accept: */* | ||
@@ -343,0 +343,0 @@ [fetch] > Host: example.com |
@@ -113,3 +113,3 @@ Spawn child processes with `Bun.spawn` or `Bun.spawnSync`. | ||
const text = await new Response(proc.stdout).text(); | ||
console.log(text); // => "1.2.4-canary.20250225T140609" | ||
console.log(text); // => "bun-v1.2.4" | ||
``` | ||
@@ -116,0 +116,0 @@ |
@@ -78,10 +78,12 @@ Bun's bundler implements a `--compile` flag for generating a standalone binary from a TypeScript or JavaScript file. | ||
| --target | Operating System | Architecture | Modern | Baseline | | ||
| --------------------- | ---------------- | ------------ | ------ | -------- | | ||
| bun-linux-x64 | Linux | x64 | ✅ | ✅ | | ||
| bun-linux-arm64 | Linux | arm64 | ✅ | N/A | | ||
| bun-windows-x64 | Windows | x64 | ✅ | ✅ | | ||
| ~~bun-windows-arm64~~ | Windows | arm64 | ❌ | ❌ | | ||
| bun-darwin-x64 | macOS | x64 | ✅ | ✅ | | ||
| bun-darwin-arm64 | macOS | arm64 | ✅ | N/A | | ||
| --target | Operating System | Architecture | Modern | Baseline | Libc | | ||
| --------------------- | ---------------- | ------------ | ------ | -------- | ----- | | ||
| bun-linux-x64 | Linux | x64 | ✅ | ✅ | glibc | | ||
| bun-linux-arm64 | Linux | arm64 | ✅ | N/A | glibc | | ||
| bun-windows-x64 | Windows | x64 | ✅ | ✅ | - | | ||
| ~~bun-windows-arm64~~ | Windows | arm64 | ❌ | ❌ | - | | ||
| bun-darwin-x64 | macOS | x64 | ✅ | ✅ | - | | ||
| bun-darwin-arm64 | macOS | arm64 | ✅ | N/A | - | | ||
| bun-linux-x64-musl | Linux | x64 | ✅ | ✅ | musl | | ||
| bun-linux-arm64-musl | Linux | arm64 | ✅ | N/A | musl | | ||
@@ -298,2 +300,51 @@ On x64 platforms, Bun uses SIMD optimizations which require a modern CPU supporting AVX2 instructions. The `-baseline` build of Bun is for older CPUs that don't support these optimizations. Normally, when you install Bun we automatically detect which version to use but this can be harder to do when cross-compiling since you might not know the target CPU. You usually don't need to worry about it on Darwin x64, but it is relevant for Windows x64 and Linux x64. If you or your users see `"Illegal instruction"` errors, you might need to use the baseline version. | ||
## Code signing on macOS | ||
To codesign a standalone executable on macOS (which fixes Gatekeeper warnings), use the `codesign` command. | ||
```sh | ||
$ codesign --deep --force -vvvv --sign "XXXXXXXXXX" ./myapp | ||
``` | ||
We recommend including an `entitlements.plist` file with JIT permissions. | ||
```xml#entitlements.plist | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.disable-executable-page-protection</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
<key>com.apple.security.cs.disable-library-validation</key> | ||
<true/> | ||
</dict> | ||
</plist> | ||
``` | ||
To codesign with JIT support, pass the `--entitlements` flag to `codesign`. | ||
```sh | ||
$ codesign --deep --force -vvvv --sign "XXXXXXXXXX" --entitlements entitlements.plist ./myapp | ||
``` | ||
After codesigning, verify the executable: | ||
```sh | ||
$ codesign -vvv --verify ./myapp | ||
./myapp: valid on disk | ||
./myapp: satisfies its Designated Requirement | ||
``` | ||
{% callout %} | ||
Codesign support requires Bun v1.2.4 or newer. | ||
{% /callout %} | ||
## Unsupported CLI arguments | ||
@@ -300,0 +351,0 @@ |
@@ -15,5 +15,8 @@ The `bun pm` command group provides a set of utilities for working with Bun's package manager. | ||
- `--destination`: Specify the directory where the tarball will be saved. | ||
- `--filename`: Specify an exact file name for the tarball to be saved at. | ||
- `--ignore-scripts`: Skip running pre/postpack and prepare scripts. | ||
- `--gzip-level`: Set a custom compression level for gzip, ranging from 0 to 9 (default is 9). | ||
> Note `--filename` and `--destination` cannot be used at the same time | ||
## bin | ||
@@ -20,0 +23,0 @@ |
@@ -10,3 +10,3 @@ Use `bun publish` to publish a package to the npm registry. | ||
## Output | ||
bun publish v1.2.4-canary.20250225T140609 (ca7428e9) | ||
bun publish vbun-v1.2.4 (ca7428e9) | ||
@@ -13,0 +13,0 @@ packed 203B package.json |
@@ -12,3 +12,3 @@ --- | ||
◐ Installing dependencies... | ||
bun install v1.2.4-canary.20250225T140609 (16b4bf34) | ||
bun install vbun-v1.2.4 (16b4bf34) | ||
+ @nuxt/devtools@0.8.2 | ||
@@ -15,0 +15,0 @@ + nuxt@3.7.0 |
@@ -19,3 +19,3 @@ --- | ||
"peerDependencies": { | ||
+ "@types/bun": "^1.2.4-canary.20250225T140609" | ||
+ "@types/bun": "^bun-v1.2.4" | ||
} | ||
@@ -32,3 +32,3 @@ } | ||
"peerDependencies": { | ||
"@types/bun": "^1.2.4-canary.20250225T140609" | ||
"@types/bun": "^bun-v1.2.4" | ||
}, | ||
@@ -35,0 +35,0 @@ "peerDependenciesMeta": { |
@@ -100,3 +100,3 @@ --- | ||
# Update a dependency to a specific version | ||
$ bun update @types/bun@1.2.4-canary.20250225T140609 | ||
$ bun update @types/bun@bun-v1.2.4 | ||
@@ -103,0 +103,0 @@ # Update all dependencies to the latest versions |
@@ -24,3 +24,3 @@ --- | ||
$ bun test | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -51,3 +51,3 @@ test.test.js: | ||
$ bun test test3 | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -90,3 +90,3 @@ test3.test.js: | ||
$ bun test -t add | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -93,0 +93,0 @@ test.test.js: |
@@ -21,3 +21,3 @@ --- | ||
$ bun test test/snap | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -65,3 +65,3 @@ test/snap.test.ts: | ||
$ bun test | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -83,3 +83,3 @@ test/snap.test.ts: | ||
$ bun test --update-snapshots | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -86,0 +86,0 @@ test/snap.test.ts: |
@@ -32,3 +32,3 @@ --- | ||
$ bun test --update-snapshots | ||
bun test v1.2.4-canary.20250225T140609 (9c68abdb) | ||
bun test vbun-v1.2.4 (9c68abdb) | ||
@@ -35,0 +35,0 @@ test/snap.test.ts: |
@@ -8,3 +8,3 @@ --- | ||
```ts#index.ts | ||
Bun.version; // => "1.2.4-canary.20250225T140609" | ||
Bun.version; // => "bun-v1.2.4" | ||
``` | ||
@@ -11,0 +11,0 @@ |
@@ -17,3 +17,3 @@ Bun ships as a single executable with no dependencies that can be installed a few different ways. | ||
# to install a specific version | ||
$ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.4-canary.20250225T140609" | ||
$ curl -fsSL https://bun.sh/install | bash -s "bun-vbun-v1.2.4" | ||
``` | ||
@@ -193,6 +193,6 @@ | ||
To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.4-canary.20250225T140609`. | ||
To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-vbun-v1.2.4`. | ||
```sh | ||
$ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.4-canary.20250225T140609" | ||
$ curl -fsSL https://bun.sh/install | bash -s "bun-vbun-v1.2.4" | ||
``` | ||
@@ -206,3 +206,3 @@ | ||
# PowerShell: | ||
$ iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.4-canary.20250225T140609" | ||
$ iex "& {$(irm https://bun.sh/install.ps1)} -Version bun-v1.2.4" | ||
``` | ||
@@ -209,0 +209,0 @@ |
@@ -127,7 +127,7 @@ --- | ||
```sh | ||
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.4-canary.20250225T140609" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}" | ||
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/bun-v1.2.4" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}" | ||
[fetch] > HTTP/1.1 POST https://example.com/ | ||
[fetch] > content-type: application/json | ||
[fetch] > Connection: keep-alive | ||
[fetch] > User-Agent: Bun/1.2.4-canary.20250225T140609 | ||
[fetch] > User-Agent: Bun/bun-v1.2.4 | ||
[fetch] > Accept: */* | ||
@@ -174,3 +174,3 @@ [fetch] > Host: example.com | ||
[fetch] > Connection: keep-alive | ||
[fetch] > User-Agent: Bun/1.2.4-canary.20250225T140609 | ||
[fetch] > User-Agent: Bun/bun-v1.2.4 | ||
[fetch] > Accept: */* | ||
@@ -177,0 +177,0 @@ [fetch] > Host: example.com |
@@ -58,3 +58,3 @@ Bun's test runner plays well with existing component and DOM testing libraries, including React Testing Library and [`happy-dom`](https://github.com/capricorn86/happy-dom). | ||
$ bun test | ||
bun test v1.2.4-canary.20250225T140609 | ||
bun test vbun-v1.2.4 | ||
@@ -61,0 +61,0 @@ dom.test.ts: |
{ | ||
"version": "1.2.4-canary.20250225T140609", | ||
"version": "1.2.4", | ||
"name": "bun-types", | ||
@@ -4,0 +4,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1425674
0.24%299
0.34%14326
0.06%0
-100%