aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/cli/bun-install.md2
-rw-r--r--docs/dev/css.md2
-rw-r--r--docs/guides/read-file/stream.md2
-rw-r--r--docs/installation.md3
-rw-r--r--docs/project/development.md10
-rw-r--r--docs/runtime/nodejs-apis.md38
6 files changed, 35 insertions, 22 deletions
diff --git a/docs/cli/bun-install.md b/docs/cli/bun-install.md
index 3efe2da7f..0cbc21e1d 100644
--- a/docs/cli/bun-install.md
+++ b/docs/cli/bun-install.md
@@ -21,7 +21,7 @@ Configuring with `bunfig.toml` is optional. Bun tries to be zero configuration i
# Scope name The value can be a URL string or an object
"@mybigcompany" = { token = "123456", url = "https://registry.mybigcompany.com" }
-# URL is optional and fallsback to the default registry
+# URL is optional and falls back to the default registry
# The "@" in the scope is optional
mybigcompany2 = { token = "123456" }
diff --git a/docs/dev/css.md b/docs/dev/css.md
index a74f5d1ea..53ebc6c06 100644
--- a/docs/dev/css.md
+++ b/docs/dev/css.md
@@ -49,7 +49,7 @@ This is useful for preventing flash of unstyled content.
## With `bun bun`
-Bun bundles `.css` files imported via `@import` into a single file. It doesn’t autoprefix or minify CSS today. Multiple `.css` files imported in one JavaScript file will _not_ be bundled into one file. You’ll have to import those from a `.css` file.
+Bun bundles `.css` files imported via `@import` into a single file. It doesn’t auto-prefix or minify CSS today. Multiple `.css` files imported in one JavaScript file will _not_ be bundled into one file. You’ll have to import those from a `.css` file.
This input:
diff --git a/docs/guides/read-file/stream.md b/docs/guides/read-file/stream.md
index ac4bd9e2f..bc54af2ce 100644
--- a/docs/guides/read-file/stream.md
+++ b/docs/guides/read-file/stream.md
@@ -8,7 +8,7 @@ The `Bun.file()` function accepts a path and returns a `BunFile` instance. The `
const path = "/path/to/package.json";
const file = Bun.file(path);
-const stream = await file.stream();
+const stream = file.stream();
```
---
diff --git a/docs/installation.md b/docs/installation.md
index 73d222eaf..2c3cc94c7 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -3,7 +3,8 @@ Bun ships as a single executable that can be installed a few different ways.
## macOS and Linux
{% callout %}
-**Linux users** — The `unzip` package is required to install Bun. Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.
+**Linux users** — The `unzip` package is required to install Bun. Use `sudo apt install unzip` to install `unzip` package.
+Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Use `uname -r` to check Kernel version.
{% /callout %}
{% codetabs %}
diff --git a/docs/project/development.md b/docs/project/development.md
index 6963df434..f2d359209 100644
--- a/docs/project/development.md
+++ b/docs/project/development.md
@@ -49,6 +49,12 @@ $ wget https://apt.llvm.org/llvm.sh -O - | sudo bash -s -- 16 all
$ sudo pacman -S llvm clang lld
```
+```bash#Fedora
+$ sudo dnf install 'dnf-command(copr)'
+$ sudo dnf copr enable -y @fedora-llvm-team/llvm-snapshots
+$ sudo dnf install llvm clang lld
+```
+
{% /codetabs %}
If none of the above solutions apply, you will have to install it [manually](https://github.com/llvm/llvm-project/releases/tag/llvmorg-16.0.6).
@@ -98,6 +104,10 @@ $ sudo apt install cargo ccache cmake git golang libtool ninja-build pkg-config
$ sudo pacman -S base-devel ccache cmake esbuild git go libiconv libtool make ninja pkg-config python rust sed unzip
```
+```bash#Fedora
+$ sudo dnf install cargo ccache cmake git golang libtool ninja-build pkg-config rustc golang-github-evanw-esbuild libatomic-static libstdc++-static sed unzip
+```
+
{% /codetabs %}
{% details summary="Ubuntu — Unable to locate package esbuild" %}
diff --git a/docs/runtime/nodejs-apis.md b/docs/runtime/nodejs-apis.md
index 5c6b858da..f128e0cd2 100644
--- a/docs/runtime/nodejs-apis.md
+++ b/docs/runtime/nodejs-apis.md
@@ -1,12 +1,12 @@
Bun aims for complete Node.js API compatibility. Most `npm` packages intended for `Node.js` environments will work with Bun out of the box; the best way to know for certain is to try it.
-This page is updated regularly to reflect compatibility status of the latest version of Bun. If you run into any bugs with a particular package, please [open an issue](https://bun.sh/issues). Opening issues for compatibility bugs helps us prioritize what to work on next.
+This page is updated regularly to reflect compatibility status of the latest version of Bun. The information below reflects Bun's compatibility with _Node.js v20_. If you run into any bugs with a particular package, please [open an issue](https://bun.sh/issues). Opening issues for compatibility bugs helps us prioritize what to work on next.
## Built-in modules
### [`node:assert`](https://nodejs.org/api/assert.html)
-🟢 Fully implemented.
+🟡 Missing `doesNotMatch`
### [`node:async_hooks`](https://nodejs.org/api/async_hooks.html)
@@ -18,7 +18,7 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:child_process`](https://nodejs.org/api/child_process.html)
-🟡 Missing `Stream` stdio, `proc.gid`, `proc.uid`. IPC has partial support and only current only works with other `bun` processes.
+🟡 Missing `Stream` stdio, `proc.gid` `proc.uid`. IPC has partial support and only current only works with other `bun` processes.
### [`node:cluster`](https://nodejs.org/api/cluster.html)
@@ -30,7 +30,9 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:crypto`](https://nodejs.org/api/crypto.html)
-🟡 Missing `crypto.Certificate` `crypto.ECDH` `crypto.KeyObject` `crypto.X509Certificate` `crypto.checkPrime{Sync}` `crypto.createPrivateKey` `crypto.createPublicKey` `crypto.createSecretKey` `crypto.diffieHellman` `crypto.generateKey{Sync}` `crypto.generateKeyPair{Sync}` `crypto.generatePrime{Sync}` `crypto.getCipherInfo` `crypto.{get|set}Fips` `crypto.hkdf` `crypto.hkdfSync` `crypto.secureHeapUsed` `crypto.setEngine` `crypto.sign` `crypto.verify`. Some methods are not optimized yet.
+🟡 Missing `Certificate` `ECDH` `KeyObject` `X509Certificate` `checkPrime` `checkPrimeSync` `createPrivateKey` `createPublicKey` `createSecretKey` `diffieHellman` `generateKey` `generateKeyPair` `generateKeyPairSync` `generateKeySync` `generatePrime` `generatePrimeSync` `getCipherInfo` `getFips` `hkdf` `hkdfSync` `secureHeapUsed` `setEngine` `setFips` `sign` `verify`
+
+Some methods are not optimized yet.
### [`node:dgram`](https://nodejs.org/api/dgram.html)
@@ -42,19 +44,19 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:dns`](https://nodejs.org/api/dns.html)
-🟢 Fully implemented.
+🟡 Missing `cancel` `setServers` `getDefaultResultOrder`
### [`node:domain`](https://nodejs.org/api/domain.html)
-🟢 Fully implemented.
+🟡 Missing `Domain` `active`
### [`node:events`](https://nodejs.org/api/events.html)
-🟡 Missing `require('node:events').on`.
+🟡 Missing `on` `addAbortListener` `getMaxListeners`
### [`node:fs`](https://nodejs.org/api/fs.html)
-🟡 Missing `fs.fdatasync{Sync}` `fs.opendir{Sync}`, `fs.statfs{Sync}`. `fs.promises.open` incorrectly returns a file descriptor instead of a `FileHandle`.
+🟡 Missing `Dir` `fdatasync` `fdatasyncSync` `openAsBlob` `opendir` `opendirSync` `statfs` `statfsSync`. `fs.promises.open` incorrectly returns a file descriptor instead of a `FileHandle`.
### [`node:http`](https://nodejs.org/api/http.html)
@@ -74,11 +76,11 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:module`](https://nodejs.org/api/module.html)
-🟢 Fully implemented.
+🟢 Missing `runMain` `syncBuiltinESMExports`, `Module#load()`. Attempts to override or patch the module cache will fail.
### [`node:net`](https://nodejs.org/api/net.html)
-🟡 Missing `net.{get|set}DefaultAutoSelectFamily` `net.SocketAddress` `net.BlockList` `net.Server.ref()` `net.Server.unref()` `net.Socket.ref()` `net.Socket.unref()`.
+🟡 Missing `BlockList` `SocketAddress` `Stream` `getDefaultAutoSelectFamily` `getDefaultAutoSelectFamilyAttemptTimeout` `setDefaultAutoSelectFamily` `setDefaultAutoSelectFamilyAttemptTimeout` `Server#ref()` `Server#unref()` `Socket#ref()` `Socket#unref()`.
### [`node:os`](https://nodejs.org/api/os.html)
@@ -90,7 +92,7 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:perf_hooks`](https://nodejs.org/api/perf_hooks.html)
-🟡 Only `perf_hooks.performance.now()` and `perf_hooks.performance.timeOrigin` are implemented. Recommended to use `performance` global instead of `perf_hooks.performance`.
+🟡 Only `perf_hooks.performance.now()` and `perf_hooks.performance.timeOrigin` are implemented. Missing `Performance` `PerformanceMark` `PerformanceMeasure` `PerformanceObserverEntryList` `PerformanceResourceTiming` `createHistogram` `monitorEventLoopDelay`. It's recommended to use `performance` global instead of `perf_hooks.performance`.
### [`node:process`](https://nodejs.org/api/process.html)
@@ -114,7 +116,7 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:stream`](https://nodejs.org/api/stream.html)
-🟢 Fully implemented.
+🟡 Missing `getDefaultHighWaterMark` `setDefaultHighWaterMark`
### [`node:string_decoder`](https://nodejs.org/api/string_decoder.html)
@@ -142,11 +144,11 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:url`](https://nodejs.org/api/url.html)
-🟡 Missing `url.domainTo{ASCII|Unicode}`. Recommended to use `URL` and `URLSearchParams` globals instead.
+🟡 Missing `domainToASCII` `domainToUnicode`. It's recommended to use `URL` and `URLSearchParams` globals instead.
### [`node:util`](https://nodejs.org/api/util.html)
-🟡 Missing `util.MIMEParams` `util.MIMEType` `util.getSystemErrorMap()` `util.getSystemErrorName()` `util.parseArgs()` `util.stripVTControlCharacters()` `util.transferableAbortController()` `util.transferableAbortSignal()`.
+🟡 Missing `MIMEParams` `MIMEType` `aborted` `debug` `getSystemErrorMap` `getSystemErrorName` `parseArgs` `transferableAbortController` `transferableAbortSignal` `stripVTControlCharacters`
### [`node:v8`](https://nodejs.org/api/v8.html)
@@ -154,7 +156,7 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:vm`](https://nodejs.org/api/vm.html)
-🟡 Core functionality works, but VM modules are not implemented. `ShadowRealm` can be used.
+🟡 Core functionality works, but VM modules are not implemented. Missing `createScript`. `ShadowRealm` can be used.
### [`node:wasi`](https://nodejs.org/api/wasi.html)
@@ -162,11 +164,11 @@ This page is updated regularly to reflect compatibility status of the latest ver
### [`node:worker_threads`](https://nodejs.org/api/worker_threads.html)
-🟡 `Worker` doesn't support the following options: `eval`, `argv`, `execArgv`, `stdin`, `stdout`, `stderr`, `trackedUnmanagedFds`, `resourceLimits`. Missing `markAsUntransferable`, `moveMessagePortToContext`, `getHeapSnapshot`.
+🟡 `Worker` doesn't support the following options: `eval` `argv` `execArgv` `stdin` `stdout` `stderr` `trackedUnmanagedFds` `resourceLimits`. Missing `markAsUntransferable` `moveMessagePortToContext` `getHeapSnapshot`.
### [`node:zlib`](https://nodejs.org/api/zlib.html)
-🟡 Missing `zlib.brotli*`. Has not been optimized.
+🟡 Missing `BrotliCompress` `BrotliDecompress` `brotliCompressSync` `brotliDecompress` `brotliDecompressSync` `createBrotliCompress` `createBrotliDecompress`. Unoptimized.
## Globals
@@ -334,7 +336,7 @@ The table below lists all globals implemented by Node.js and Bun's current compa
### [`process`](https://nodejs.org/api/process.html)
-🟡 Missing `process.allowedNodeEnvironmentFlags` `process.channel` `process.getActiveResourcesInfo/setActiveResourcesInfo()` `process.setuid/setgid/setegid/seteuid/setgroups()` `process.hasUncaughtExceptionCaptureCallback` `process.initGroups()` `process.report` `process.resourceUsage()`. `process.binding` is partially implemented.
+🟡 Missing `domain` `hasUncaughtExceptionCaptureCallback` `initgroups` `report` `resourceUsage` `setUncaughtExceptionCaptureCallback` `setegid` `seteuid` `setgid` `setgroups` `setuid` `allowedNodeEnvironmentFlags` `getActiveResourcesInfo` `setActiveResourcesInfo` `moduleLoadList` `setSourceMapsEnabled` `channel`. `process.binding` is partially implemented.
### [`queueMicrotask()`](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask)