aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bench/hot-module-reloading/css-stress-test/tsconfig.json2
-rw-r--r--docs/bundler/plugins.md7
-rw-r--r--docs/bundler/vs-esbuild.md2
-rw-r--r--docs/cli/run.md2
-rw-r--r--docs/guides/http/stream-file.md2
-rw-r--r--docs/runtime/autoimport.md2
-rw-r--r--docs/runtime/bun-apis.md2
-rw-r--r--docs/runtime/index.md2
-rw-r--r--packages/bun-types/tests/fs.test-d.ts2
9 files changed, 14 insertions, 9 deletions
diff --git a/bench/hot-module-reloading/css-stress-test/tsconfig.json b/bench/hot-module-reloading/css-stress-test/tsconfig.json
index 289c8f710..718c2366c 100644
--- a/bench/hot-module-reloading/css-stress-test/tsconfig.json
+++ b/bench/hot-module-reloading/css-stress-test/tsconfig.json
@@ -5,4 +5,4 @@
"jsx": "react-jsx",
"paths": {}
}
-} \ No newline at end of file
+}
diff --git a/docs/bundler/plugins.md b/docs/bundler/plugins.md
index 4e0fafee5..1cb22432b 100644
--- a/docs/bundler/plugins.md
+++ b/docs/bundler/plugins.md
@@ -276,7 +276,7 @@ import MySvelteComponent from "./component.svelte";
console.log(mySvelteComponent.render());
```
-## Reading `Bun.build`'s config
+## Reading the config
Plugins can read and write to the [build config](/docs/bundler#api) with `build.config`.
@@ -305,7 +305,10 @@ Bun.build({
```ts
namespace Bun {
- function plugin(plugin: { name: string; setup: (build: PluginBuilder) => void }): void;
+ function plugin(plugin: {
+ name: string;
+ setup: (build: PluginBuilder) => void;
+ }): void;
}
type PluginBuilder = {
diff --git a/docs/bundler/vs-esbuild.md b/docs/bundler/vs-esbuild.md
index 5ccde1a1f..463fcc13a 100644
--- a/docs/bundler/vs-esbuild.md
+++ b/docs/bundler/vs-esbuild.md
@@ -897,7 +897,7 @@ const myPlugin: BunPlugin = {
};
```
-The `builder` object provides some methods for hooking into parts of the bundling process. Bun implements `onResolve` and `onLoad`; it does not yet implement the esbuild hooks `onStart`, `onEnd`, and `onDispose`, and `resolve` utilities. `initialOptions` is partially implemented, being read-only and only having a subset of esbuild's options; use [`config`](/docs/bundler/plugins#reading-bunbuilds-config) (same thing but with Bun's `BuildConfig` format) instead.
+The `builder` object provides some methods for hooking into parts of the bundling process. Bun implements `onResolve` and `onLoad`; it does not yet implement the esbuild hooks `onStart`, `onEnd`, and `onDispose`, and `resolve` utilities. `initialOptions` is partially implemented, being read-only and only having a subset of esbuild's options; use [`config`](/docs/bundler/plugins#reading-the-config) (same thing but with Bun's `BuildConfig` format) instead.
```ts
import type { BunPlugin } from "bun";
diff --git a/docs/cli/run.md b/docs/cli/run.md
index 60061ee5c..3680573b0 100644
--- a/docs/cli/run.md
+++ b/docs/cli/run.md
@@ -126,4 +126,4 @@ Under the hood Bun uses the [JavaScriptCore engine](https://developer.apple.com/
{% image src="/images/bun-run-speed.jpeg" caption="Bun vs Node.js vs Deno running Hello World" /%}
-<!-- If no `node_modules` directory is found in the working directory or above, Bun will abandon Node.js-style module resolution in favor of the `Bun module resolution algorithm`. Under Bun-style module resolution, all packages are _auto-installed_ on the fly into a [global module cache](/docs/cli/install#global-cache). For full details on this algorithm, refer to [Runtime > Modules](/docs/runtime/modules). -->
+<!-- If no `node_modules` directory is found in the working directory or above, Bun will abandon Node.js-style module resolution in favor of the `Bun module resolution algorithm`. Under Bun-style module resolution, all packages are _auto-installed_ on the fly into a [global module cache](/docs/install/cache). For full details on this algorithm, refer to [Runtime > Modules](/docs/runtime/modules). -->
diff --git a/docs/guides/http/stream-file.md b/docs/guides/http/stream-file.md
index 66c8c247b..ab16acf42 100644
--- a/docs/guides/http/stream-file.md
+++ b/docs/guides/http/stream-file.md
@@ -30,7 +30,7 @@ new Response(Bun.file("./img.png")).headers.get("Content-Type");
---
-Putting it all together with [`Bun.serve()`](/docs/api/http#serving-files-bun-serve).
+Putting it all together with [`Bun.serve()`](/docs/api/http#bun-serve).
```ts
// static file server
diff --git a/docs/runtime/autoimport.md b/docs/runtime/autoimport.md
index 70af18e1f..d14723024 100644
--- a/docs/runtime/autoimport.md
+++ b/docs/runtime/autoimport.md
@@ -4,7 +4,7 @@
If no `node_modules` directory is found in the working directory or higher, Bun will abandon Node.js-style module resolution in favor of the **Bun module resolution algorithm**.
-Under Bun-style module resolution, all imported packages are auto-installed on the fly into a [global module cache](/docs/cli/install#global-cache) during execution (the same cache used by [`bun install`](/docs/cli/install)).
+Under Bun-style module resolution, all imported packages are auto-installed on the fly into a [global module cache](/docs/install/cache) during execution (the same cache used by [`bun install`](/docs/cli/install)).
```ts
import { foo } from "foo"; // install `latest` version
diff --git a/docs/runtime/bun-apis.md b/docs/runtime/bun-apis.md
index c4cd534e7..6907e802d 100644
--- a/docs/runtime/bun-apis.md
+++ b/docs/runtime/bun-apis.md
@@ -95,6 +95,6 @@ Click the link in the right column to jump to the associated documentation.
---
- Utilities
-- [`Bun.version`](/docs/api/utils#bun-version) [`Bun.revision`](/docs/api/utils#bun-revision) [`Bun.env`](/docs/api/utils#bun-env) [`Bun.main`](/docs/api/utils#bun-main) [`Bun.sleep()`](/docs/api/utils#bun-sleep) [`Bun.sleepSync()`](/docs/api/utils#bun-sleepsync) [`Bun.which()`](/docs/api/utils#bun-which) [`Bun.peek()`](/docs/api/utils#bun-peek) [`Bun.openInEditor()`](/docs/api/utils#bun-openineditor) [`Bun.deepEquals()`](/docs/api/utils#bun-deepequals) [`Bun.escapeHTML()`](/docs/api/utils#bun-escapehtlm) [`Bun.enableANSIColors()`](/docs/api/utils#bun-enableansicolors) [`Bun.fileURLToPath()`](/docs/api/utils#bun-fileurltopath) [`Bun.pathToFileURL()`](/docs/api/utils#bun-pathtofileurl) [`Bun.gzipSync()`](/docs/api/utils#bun-gzipsync) [`Bun.gunzipSync()`](/docs/api/utils#bun-gunzipsync) [`Bun.deflateSync()`](/docs/api/utils#bun-deflatesync) [`Bun.inflateSync()`](/docs/api/utils#bun-inflatesync) [`Bun.inspect()`](/docs/api/utils#bun-inspect) [`Bun.nanoseconds()`](/docs/api/utils#bun-nanoseconds) [`Bun.readableStreamTo*()`](/docs/api/utils#bun-readablestreamto) [`Bun.resolveSync()`](/docs/api/utils#bun-resolvesync)
+- [`Bun.version`](/docs/api/utils#bun-version) [`Bun.revision`](/docs/api/utils#bun-revision) [`Bun.env`](/docs/api/utils#bun-env) [`Bun.main`](/docs/api/utils#bun-main) [`Bun.sleep()`](/docs/api/utils#bun-sleep) [`Bun.sleepSync()`](/docs/api/utils#bun-sleepsync) [`Bun.which()`](/docs/api/utils#bun-which) [`Bun.peek()`](/docs/api/utils#bun-peek) [`Bun.openInEditor()`](/docs/api/utils#bun-openineditor) [`Bun.deepEquals()`](/docs/api/utils#bun-deepequals) [`Bun.escapeHTML()`](/docs/api/utils#bun-escapehtml) [`Bun.fileURLToPath()`](/docs/api/utils#bun-fileurltopath) [`Bun.pathToFileURL()`](/docs/api/utils#bun-pathtofileurl) [`Bun.gzipSync()`](/docs/api/utils#bun-gzipsync) [`Bun.gunzipSync()`](/docs/api/utils#bun-gunzipsync) [`Bun.deflateSync()`](/docs/api/utils#bun-deflatesync) [`Bun.inflateSync()`](/docs/api/utils#bun-inflatesync) [`Bun.inspect()`](/docs/api/utils#bun-inspect) [`Bun.nanoseconds()`](/docs/api/utils#bun-nanoseconds) [`Bun.readableStreamTo*()`](/docs/api/utils#bun-readablestreamto) [`Bun.resolveSync()`](/docs/api/utils#bun-resolvesync)
{% /table %}
diff --git a/docs/runtime/index.md b/docs/runtime/index.md
index 90d200006..a10ac0cff 100644
--- a/docs/runtime/index.md
+++ b/docs/runtime/index.md
@@ -6,7 +6,7 @@ Bun is designed to start fast and run fast. It's transpiler and runtime are writ
{% image src="/images/bun-run-speed.jpeg" caption="Bun vs Node.js vs Deno running Hello World" /%}
-<!-- If no `node_modules` directory is found in the working directory or above, Bun will abandon Node.js-style module resolution in favor of the `Bun module resolution algorithm`. Under Bun-style module resolution, all packages are _auto-installed_ on the fly into a [global module cache](/docs/cli/install#global-cache). For full details on this algorithm, refer to [Runtime > Modules](/docs/runtime/modules). -->
+<!-- If no `node_modules` directory is found in the working directory or above, Bun will abandon Node.js-style module resolution in favor of the `Bun module resolution algorithm`. Under Bun-style module resolution, all packages are _auto-installed_ on the fly into a [global module cache](/docs/install/cache). For full details on this algorithm, refer to [Runtime > Modules](/docs/runtime/modules). -->
Performance sensitive APIs like `Buffer`, `fetch`, and `Response` are heavily profiled and optimized. Under the hood Bun uses the [JavaScriptCore engine](https://developer.apple.com/documentation/javascriptcore), which is developed by Apple for Safari. It starts and runs faster than V8, the engine used by Node.js and Chromium-based browsers.
diff --git a/packages/bun-types/tests/fs.test-d.ts b/packages/bun-types/tests/fs.test-d.ts
index 3acfafa76..a752889df 100644
--- a/packages/bun-types/tests/fs.test-d.ts
+++ b/packages/bun-types/tests/fs.test-d.ts
@@ -13,3 +13,5 @@ watch(".", (eventType, filename) => {
console.log(`filename = ${filename}`);
}
});
+
+Bun.file("sdf").exists();