bun-types 1.2.19-canary.20250709T140635 → 1.2.19-canary.20250711T140648

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +1 -1
  2. package/bun.d.ts +16 -10
  3. package/devserver.d.ts +3 -3
  4. package/docs/api/binary-data.md +1 -1
  5. package/docs/api/cc.md +1 -1
  6. package/docs/api/dns.md +3 -3
  7. package/docs/api/fetch.md +6 -6
  8. package/docs/api/file-io.md +3 -3
  9. package/docs/api/globals.md +4 -4
  10. package/docs/api/http.md +6 -6
  11. package/docs/api/s3.md +1 -1
  12. package/docs/api/spawn.md +1 -1
  13. package/docs/api/utils.md +3 -3
  14. package/docs/bundler/executables.md +36 -0
  15. package/docs/bundler/fullstack.md +2 -2
  16. package/docs/bundler/index.md +8 -8
  17. package/docs/bundler/loaders.md +5 -5
  18. package/docs/bundler/macros.md +1 -1
  19. package/docs/bundler/plugins.md +1 -1
  20. package/docs/bundler/vs-esbuild.md +5 -5
  21. package/docs/cli/bun-create.md +3 -3
  22. package/docs/cli/bun-install.md +1 -1
  23. package/docs/cli/bun-upgrade.md +1 -1
  24. package/docs/cli/filter.md +2 -2
  25. package/docs/cli/install.md +5 -5
  26. package/docs/cli/patch-commit.md +1 -1
  27. package/docs/cli/pm.md +1 -1
  28. package/docs/cli/publish.md +1 -1
  29. package/docs/cli/run.md +2 -2
  30. package/docs/cli/test.md +6 -6
  31. package/docs/ecosystem/express.md +3 -3
  32. package/docs/ecosystem/react.md +1 -1
  33. package/docs/guides/binary/arraybuffer-to-array.md +1 -1
  34. package/docs/guides/binary/arraybuffer-to-blob.md +1 -1
  35. package/docs/guides/binary/arraybuffer-to-buffer.md +1 -1
  36. package/docs/guides/binary/arraybuffer-to-string.md +1 -1
  37. package/docs/guides/binary/arraybuffer-to-typedarray.md +1 -1
  38. package/docs/guides/binary/blob-to-arraybuffer.md +1 -1
  39. package/docs/guides/binary/blob-to-dataview.md +1 -1
  40. package/docs/guides/binary/blob-to-stream.md +1 -1
  41. package/docs/guides/binary/blob-to-string.md +1 -1
  42. package/docs/guides/binary/blob-to-typedarray.md +1 -1
  43. package/docs/guides/binary/buffer-to-arraybuffer.md +1 -1
  44. package/docs/guides/binary/buffer-to-blob.md +1 -1
  45. package/docs/guides/binary/buffer-to-readablestream.md +1 -1
  46. package/docs/guides/binary/buffer-to-string.md +1 -1
  47. package/docs/guides/binary/buffer-to-typedarray.md +1 -1
  48. package/docs/guides/binary/dataview-to-string.md +1 -1
  49. package/docs/guides/binary/typedarray-to-arraybuffer.md +1 -1
  50. package/docs/guides/binary/typedarray-to-blob.md +1 -1
  51. package/docs/guides/binary/typedarray-to-buffer.md +1 -1
  52. package/docs/guides/binary/typedarray-to-dataview.md +1 -1
  53. package/docs/guides/binary/typedarray-to-readablestream.md +1 -1
  54. package/docs/guides/binary/typedarray-to-string.md +1 -1
  55. package/docs/guides/ecosystem/express.md +1 -1
  56. package/docs/guides/ecosystem/neon-drizzle.md +1 -1
  57. package/docs/guides/ecosystem/neon-serverless-postgres.md +1 -1
  58. package/docs/guides/ecosystem/nuxt.md +1 -1
  59. package/docs/guides/html-rewriter/extract-links.md +4 -4
  60. package/docs/guides/html-rewriter/extract-social-meta.md +3 -3
  61. package/docs/guides/http/fetch.md +2 -2
  62. package/docs/guides/http/file-uploads.md +1 -1
  63. package/docs/guides/http/hot.md +1 -1
  64. package/docs/guides/http/server.md +1 -1
  65. package/docs/guides/http/simple.md +1 -1
  66. package/docs/guides/http/stream-file.md +3 -3
  67. package/docs/guides/http/tls.md +1 -1
  68. package/docs/guides/install/add-dev.md +1 -1
  69. package/docs/guides/install/add-git.md +1 -1
  70. package/docs/guides/install/add-optional.md +1 -1
  71. package/docs/guides/install/add-peer.md +3 -3
  72. package/docs/guides/install/add-tarball.md +1 -1
  73. package/docs/guides/install/add.md +1 -1
  74. package/docs/guides/install/azure-artifacts.md +1 -1
  75. package/docs/guides/install/custom-registry.md +2 -2
  76. package/docs/guides/install/from-npm-install-to-bun-install.md +1 -1
  77. package/docs/guides/install/git-diff-bun-lockfile.md +1 -1
  78. package/docs/guides/install/npm-alias.md +1 -1
  79. package/docs/guides/install/registry-scope.md +3 -3
  80. package/docs/guides/install/trusted.md +1 -1
  81. package/docs/guides/install/workspaces.md +1 -1
  82. package/docs/guides/install/yarnlock.md +2 -2
  83. package/docs/guides/process/ctrl-c.md +1 -1
  84. package/docs/guides/process/ipc.md +2 -2
  85. package/docs/guides/process/nanoseconds.md +1 -1
  86. package/docs/guides/process/os-signals.md +1 -1
  87. package/docs/guides/process/spawn-stderr.md +2 -2
  88. package/docs/guides/process/spawn-stdout.md +2 -2
  89. package/docs/guides/process/spawn.md +2 -2
  90. package/docs/guides/process/stdin.md +1 -1
  91. package/docs/guides/read-file/arraybuffer.md +1 -1
  92. package/docs/guides/read-file/buffer.md +1 -1
  93. package/docs/guides/read-file/exists.md +1 -1
  94. package/docs/guides/read-file/mime.md +1 -1
  95. package/docs/guides/read-file/stream.md +1 -1
  96. package/docs/guides/read-file/uint8array.md +1 -1
  97. package/docs/guides/read-file/watch.md +1 -1
  98. package/docs/guides/runtime/delete-directory.md +1 -1
  99. package/docs/guides/runtime/delete-file.md +1 -1
  100. package/docs/guides/runtime/import-json.md +1 -1
  101. package/docs/guides/runtime/import-toml.md +1 -1
  102. package/docs/guides/runtime/read-env.md +1 -1
  103. package/docs/guides/runtime/set-env.md +1 -1
  104. package/docs/guides/runtime/shell.md +1 -1
  105. package/docs/guides/runtime/tsconfig-paths.md +1 -1
  106. package/docs/guides/runtime/typescript.md +1 -1
  107. package/docs/guides/runtime/vscode-debugger.md +1 -1
  108. package/docs/guides/streams/to-array.md +1 -1
  109. package/docs/guides/streams/to-arraybuffer.md +1 -1
  110. package/docs/guides/streams/to-blob.md +1 -1
  111. package/docs/guides/streams/to-buffer.md +1 -1
  112. package/docs/guides/streams/to-json.md +1 -1
  113. package/docs/guides/streams/to-string.md +1 -1
  114. package/docs/guides/streams/to-typedarray.md +1 -1
  115. package/docs/guides/test/run-tests.md +3 -3
  116. package/docs/guides/test/snapshot.md +3 -3
  117. package/docs/guides/test/update-snapshots.md +1 -1
  118. package/docs/guides/util/base64.md +1 -1
  119. package/docs/guides/util/deep-equals.md +3 -3
  120. package/docs/guides/util/deflate.md +1 -1
  121. package/docs/guides/util/entrypoint.md +2 -2
  122. package/docs/guides/util/escape-html.md +1 -1
  123. package/docs/guides/util/file-url-to-path.md +1 -1
  124. package/docs/guides/util/gzip.md +1 -1
  125. package/docs/guides/util/hash-a-password.md +1 -1
  126. package/docs/guides/util/import-meta-dir.md +2 -2
  127. package/docs/guides/util/import-meta-file.md +2 -2
  128. package/docs/guides/util/import-meta-path.md +2 -2
  129. package/docs/guides/util/javascript-uuid.md +1 -1
  130. package/docs/guides/util/main.md +1 -1
  131. package/docs/guides/util/path-to-file-url.md +1 -1
  132. package/docs/guides/util/sleep.md +1 -1
  133. package/docs/guides/util/version.md +2 -2
  134. package/docs/guides/util/which-path-to-executable-bin.md +1 -1
  135. package/docs/guides/websocket/context.md +1 -1
  136. package/docs/guides/websocket/simple.md +1 -1
  137. package/docs/guides/write-file/basic.md +2 -2
  138. package/docs/guides/write-file/blob.md +2 -2
  139. package/docs/guides/write-file/cat.md +2 -2
  140. package/docs/guides/write-file/file-cp.md +2 -2
  141. package/docs/guides/write-file/filesink.md +1 -1
  142. package/docs/guides/write-file/response.md +3 -3
  143. package/docs/guides/write-file/stdout.md +2 -2
  144. package/docs/guides/write-file/stream.md +2 -2
  145. package/docs/guides/write-file/unlink.md +1 -1
  146. package/docs/index.md +1 -1
  147. package/docs/install/lockfile.md +1 -1
  148. package/docs/install/npmrc.md +4 -4
  149. package/docs/install/patch.md +2 -2
  150. package/docs/install/registries.md +1 -1
  151. package/docs/install/workspaces.md +3 -3
  152. package/docs/installation.md +8 -8
  153. package/docs/project/benchmarking.md +1 -1
  154. package/docs/project/building-windows.md +2 -2
  155. package/docs/project/contributing.md +2 -2
  156. package/docs/quickstart.md +1 -1
  157. package/docs/runtime/autoimport.md +1 -1
  158. package/docs/runtime/bun-apis.md +36 -36
  159. package/docs/runtime/debugger.md +4 -4
  160. package/docs/runtime/env.md +1 -1
  161. package/docs/runtime/index.md +19 -19
  162. package/docs/runtime/jsx.md +1 -1
  163. package/docs/runtime/loaders.md +3 -3
  164. package/docs/runtime/nodejs-apis.md +4 -4
  165. package/docs/runtime/plugins.md +5 -5
  166. package/docs/runtime/typescript.md +1 -1
  167. package/docs/test/dom.md +1 -1
  168. package/globals.d.ts +48 -21
  169. package/package.json +2 -2
  170. package/shell.d.ts +2 -2
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # TypeScript types for Bun
2
2
 
3
3
  <p align="center">
4
- <a href="https://bun.sh"><img src="https://bun.sh/logo@2x.png" alt="Logo"></a>
4
+ <a href="https://bun.com"><img src="https://bun.com/logo@2x.png" alt="Logo"></a>
5
5
  </p>
6
6
 
7
7
  These are the type definitions for Bun's JavaScript runtime APIs.
package/bun.d.ts CHANGED
@@ -2334,7 +2334,7 @@ declare module "bun" {
2334
2334
  }
2335
2335
 
2336
2336
  /**
2337
- * @see [Bun.build API docs](https://bun.sh/docs/bundler#api)
2337
+ * @see [Bun.build API docs](https://bun.com/docs/bundler#api)
2338
2338
  */
2339
2339
  interface BuildConfig {
2340
2340
  entrypoints: string[]; // list of file path
@@ -2519,7 +2519,7 @@ declare module "bun" {
2519
2519
  *
2520
2520
  * These are fast APIs that can run in a worker thread if used asynchronously.
2521
2521
  *
2522
- * @see [Bun.password API docs](https://bun.sh/guides/util/hash-a-password)
2522
+ * @see [Bun.password API docs](https://bun.com/guides/util/hash-a-password)
2523
2523
  *
2524
2524
  * @category Security
2525
2525
  */
@@ -2555,7 +2555,7 @@ declare module "bun" {
2555
2555
  * Password hashing functions are necessarily slow, and this object will
2556
2556
  * automatically run in a worker thread.
2557
2557
  *
2558
- * @see [Bun.password API docs](https://bun.sh/guides/util/hash-a-password)
2558
+ * @see [Bun.password API docs](https://bun.com/guides/util/hash-a-password)
2559
2559
  *
2560
2560
  * The underlying implementation of these functions are provided by the Zig
2561
2561
  * Standard Library. Thanks to \@jedisct1 and other Zig contributors for their
@@ -3510,7 +3510,13 @@ declare module "bun" {
3510
3510
  [K in HTTPMethod]?: RouteHandlerWithWebSocketUpgrade<T>;
3511
3511
  };
3512
3512
 
3513
- type RouteValue<T extends string> = Response | false | RouteHandler<T> | RouteHandlerObject<T> | HTMLBundle;
3513
+ type RouteValue<T extends string> =
3514
+ | Response
3515
+ | false
3516
+ | RouteHandler<T>
3517
+ | RouteHandlerObject<T>
3518
+ | HTMLBundle
3519
+ | BunFile;
3514
3520
  type RouteValueWithWebSocketUpgrade<T extends string> =
3515
3521
  | RouteValue<T>
3516
3522
  | RouteHandlerWithWebSocketUpgrade<T>
@@ -5713,7 +5719,7 @@ declare module "bun" {
5713
5719
  */
5714
5720
  | "browser";
5715
5721
 
5716
- /** https://bun.sh/docs/bundler/loaders */
5722
+ /** https://bun.com/docs/bundler/loaders */
5717
5723
  type Loader = "js" | "jsx" | "ts" | "tsx" | "json" | "toml" | "file" | "napi" | "wasm" | "text" | "css" | "html";
5718
5724
 
5719
5725
  interface PluginConstraints {
@@ -7975,15 +7981,15 @@ declare module "bun" {
7975
7981
  workspaces: {
7976
7982
  [workspace: string]: BunLockFileWorkspacePackage;
7977
7983
  };
7978
- /** @see https://bun.sh/docs/install/overrides */
7984
+ /** @see https://bun.com/docs/install/overrides */
7979
7985
  overrides?: Record<string, string>;
7980
- /** @see https://bun.sh/docs/install/patch */
7986
+ /** @see https://bun.com/docs/install/patch */
7981
7987
  patchedDependencies?: Record<string, string>;
7982
- /** @see https://bun.sh/docs/install/lifecycle#trusteddependencies */
7988
+ /** @see https://bun.com/docs/install/lifecycle#trusteddependencies */
7983
7989
  trustedDependencies?: string[];
7984
- /** @see https://bun.sh/docs/install/catalogs */
7990
+ /** @see https://bun.com/docs/install/catalogs */
7985
7991
  catalog?: Record<string, string>;
7986
- /** @see https://bun.sh/docs/install/catalogs */
7992
+ /** @see https://bun.com/docs/install/catalogs */
7987
7993
  catalogs?: Record<string, Record<string, string>>;
7988
7994
 
7989
7995
  /**
package/devserver.d.ts CHANGED
@@ -29,7 +29,7 @@ interface ImportMeta {
29
29
  * However, this check is usually not needed as Bun will dead-code-eliminate
30
30
  * calls to all of the HMR APIs in production builds.
31
31
  *
32
- * https://bun.sh/docs/bundler/hmr
32
+ * https://bun.com/docs/bundler/hmr
33
33
  */
34
34
  hot: {
35
35
  /**
@@ -167,7 +167,7 @@ interface ImportMeta {
167
167
  *
168
168
  * For compatibility with Vite, event names are also available via vite:* prefix instead of bun:*.
169
169
  *
170
- * https://bun.sh/docs/bundler/hmr#import-meta-hot-on-and-off
170
+ * https://bun.com/docs/bundler/hmr#import-meta-hot-on-and-off
171
171
  * @param event The event to listen to
172
172
  * @param callback The callback to call when the event is emitted
173
173
  */
@@ -178,7 +178,7 @@ interface ImportMeta {
178
178
  *
179
179
  * For compatibility with Vite, event names are also available via vite:* prefix instead of bun:*.
180
180
  *
181
- * https://bun.sh/docs/bundler/hmr#import-meta-hot-on-and-off
181
+ * https://bun.com/docs/bundler/hmr#import-meta-hot-on-and-off
182
182
  * @param event The event to stop listening to
183
183
  * @param callback The callback to stop listening to
184
184
  */
@@ -522,7 +522,7 @@ for await (const chunk of stream) {
522
522
  }
523
523
  ```
524
524
 
525
- For a more complete discussion of streams in Bun, see [API > Streams](https://bun.sh/docs/api/streams).
525
+ For a more complete discussion of streams in Bun, see [API > Streams](https://bun.com/docs/api/streams).
526
526
 
527
527
  ## Conversion
528
528
 
package/docs/api/cc.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Usage (cc in `bun:ffi`)
4
4
 
5
- See the [introduction blog post](https://bun.sh/blog/compile-and-run-c-in-js) for more information.
5
+ See the [introduction blog post](https://bun.com/blog/compile-and-run-c-in-js) for more information.
6
6
 
7
7
  JavaScript:
8
8
 
package/docs/api/dns.md CHANGED
@@ -3,7 +3,7 @@ Bun implements the `node:dns` module.
3
3
  ```ts
4
4
  import * as dns from "node:dns";
5
5
 
6
- const addrs = await dns.promises.resolve4("bun.sh", { ttl: true });
6
+ const addrs = await dns.promises.resolve4("bun.com", { ttl: true });
7
7
  console.log(addrs);
8
8
  // => [{ address: "172.67.161.226", family: 4, ttl: 0 }, ...]
9
9
  ```
@@ -54,10 +54,10 @@ Here's an example:
54
54
  ```ts
55
55
  import { dns } from "bun";
56
56
 
57
- dns.prefetch("bun.sh", 443);
57
+ dns.prefetch("bun.com", 443);
58
58
  //
59
59
  // ... sometime later ...
60
- await fetch("https://bun.sh");
60
+ await fetch("https://bun.com");
61
61
  ```
62
62
 
63
63
  ### `dns.getCacheStats()`
package/docs/api/fetch.md CHANGED
@@ -267,7 +267,7 @@ const response = await fetch("s3://my-bucket/path/to/object", {
267
267
 
268
268
  Note: Only PUT and POST methods support request bodies when using S3. For uploads, Bun automatically uses multipart upload for streaming bodies.
269
269
 
270
- You can read more about Bun's S3 support in the [S3](https://bun.sh/docs/api/s3) documentation.
270
+ You can read more about Bun's S3 support in the [S3](https://bun.com/docs/api/s3) documentation.
271
271
 
272
272
  #### File URLs - `file://`
273
273
 
@@ -337,7 +337,7 @@ This will print the request and response headers to your terminal:
337
337
  ```sh
338
338
  [fetch] > HTTP/1.1 GET http://example.com/
339
339
  [fetch] > Connection: keep-alive
340
- [fetch] > User-Agent: Bun/1.2.19-canary.20250709T140635
340
+ [fetch] > User-Agent: Bun/1.2.19-canary.20250711T140648
341
341
  [fetch] > Accept: */*
342
342
  [fetch] > Host: example.com
343
343
  [fetch] > Accept-Encoding: gzip, deflate, br
@@ -376,14 +376,14 @@ To prefetch a DNS entry, you can use the `dns.prefetch` API. This API is useful
376
376
  ```ts
377
377
  import { dns } from "bun";
378
378
 
379
- dns.prefetch("bun.sh");
379
+ dns.prefetch("bun.com");
380
380
  ```
381
381
 
382
382
  #### DNS caching
383
383
 
384
384
  By default, Bun caches and deduplicates DNS queries in-memory for up to 30 seconds. You can see the cache stats by calling `dns.getCacheStats()`:
385
385
 
386
- To learn more about DNS caching in Bun, see the [DNS caching](https://bun.sh/docs/api/dns) documentation.
386
+ To learn more about DNS caching in Bun, see the [DNS caching](https://bun.com/docs/api/dns) documentation.
387
387
 
388
388
  ### Preconnect to a host
389
389
 
@@ -392,7 +392,7 @@ To preconnect to a host, you can use the `fetch.preconnect` API. This API is use
392
392
  ```ts
393
393
  import { fetch } from "bun";
394
394
 
395
- fetch.preconnect("https://bun.sh");
395
+ fetch.preconnect("https://bun.com");
396
396
  ```
397
397
 
398
398
  Note: calling `fetch` immediately after `fetch.preconnect` will not make your request faster. Preconnecting only helps if you know you'll need to connect to a host soon, but you're not ready to make the request yet.
@@ -402,7 +402,7 @@ Note: calling `fetch` immediately after `fetch.preconnect` will not make your re
402
402
  To preconnect to a host at startup, you can pass `--fetch-preconnect`:
403
403
 
404
404
  ```sh
405
- $ bun --fetch-preconnect https://bun.sh ./my-script.ts
405
+ $ bun --fetch-preconnect https://bun.com ./my-script.ts
406
406
  ```
407
407
 
408
408
  This is sort of like `<link rel="preconnect">` in HTML.
@@ -1,8 +1,8 @@
1
1
  {% callout %}
2
2
 
3
- <!-- **Note** — The `Bun.file` and `Bun.write` APIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. Existing Node.js projects may use Bun's [nearly complete](https://bun.sh/docs/runtime/nodejs-apis#node-fs) implementation of the [`node:fs`](https://nodejs.org/api/fs.html) module. -->
3
+ <!-- **Note** — The `Bun.file` and `Bun.write` APIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. Existing Node.js projects may use Bun's [nearly complete](https://bun.com/docs/runtime/nodejs-apis#node-fs) implementation of the [`node:fs`](https://nodejs.org/api/fs.html) module. -->
4
4
 
5
- **Note** — The `Bun.file` and `Bun.write` APIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. For operations that are not yet available with `Bun.file`, such as `mkdir` or `readdir`, you can use Bun's [nearly complete](https://bun.sh/docs/runtime/nodejs-apis#node-fs) implementation of the [`node:fs`](https://nodejs.org/api/fs.html) module.
5
+ **Note** — The `Bun.file` and `Bun.write` APIs documented on this page are heavily optimized and represent the recommended way to perform file-system tasks using Bun. For operations that are not yet available with `Bun.file`, such as `mkdir` or `readdir`, you can use Bun's [nearly complete](https://bun.com/docs/runtime/nodejs-apis#node-fs) implementation of the [`node:fs`](https://nodejs.org/api/fs.html) module.
6
6
 
7
7
  {% /callout %}
8
8
 
@@ -208,7 +208,7 @@ await Bun.write(Bun.stdout, input);
208
208
  To write the body of an HTTP response to disk:
209
209
 
210
210
  ```ts
211
- const response = await fetch("https://bun.sh");
211
+ const response = await fetch("https://bun.com");
212
212
  await Bun.write("index.html", response);
213
213
  ```
214
214
 
@@ -34,7 +34,7 @@ Bun implements the following globals.
34
34
 
35
35
  - [`Buffer`](https://nodejs.org/api/buffer.html#class-buffer)
36
36
  - Node.js
37
- - See [Node.js > `Buffer`](https://bun.sh/docs/runtime/nodejs-apis#node-buffer)
37
+ - See [Node.js > `Buffer`](https://bun.com/docs/runtime/nodejs-apis#node-buffer)
38
38
 
39
39
  ---
40
40
 
@@ -172,7 +172,7 @@ Bun implements the following globals.
172
172
 
173
173
  - [`global`](https://nodejs.org/api/globals.html#global)
174
174
  - Node.js
175
- - See [Node.js > `global`](https://bun.sh/docs/runtime/nodejs-apis#global).
175
+ - See [Node.js > `global`](https://bun.com/docs/runtime/nodejs-apis#global).
176
176
 
177
177
  ---
178
178
 
@@ -188,7 +188,7 @@ Bun implements the following globals.
188
188
 
189
189
  ---
190
190
 
191
- - [`HTMLRewriter`](https://bun.sh/docs/api/html-rewriter)
191
+ - [`HTMLRewriter`](https://bun.com/docs/api/html-rewriter)
192
192
  - Cloudflare
193
193
  - &nbsp;
194
194
 
@@ -220,7 +220,7 @@ Bun implements the following globals.
220
220
 
221
221
  - [`process`](https://nodejs.org/api/process.html)
222
222
  - Node.js
223
- - See [Node.js > `process`](https://bun.sh/docs/runtime/nodejs-apis#node-process)
223
+ - See [Node.js > `process`](https://bun.com/docs/runtime/nodejs-apis#node-process)
224
224
 
225
225
  ---
226
226
 
package/docs/api/http.md CHANGED
@@ -1,7 +1,7 @@
1
1
  The page primarily documents the Bun-native `Bun.serve` API. Bun also implements [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) and the Node.js [`http`](https://nodejs.org/api/http.html) and [`https`](https://nodejs.org/api/https.html) modules.
2
2
 
3
3
  {% callout %}
4
- These modules have been re-implemented to use Bun's fast internal HTTP infrastructure. Feel free to use these modules directly; frameworks like [Express](https://expressjs.com/) that depend on these modules should work out of the box. For granular compatibility information, see [Runtime > Node.js APIs](https://bun.sh/docs/runtime/nodejs-apis).
4
+ These modules have been re-implemented to use Bun's fast internal HTTP infrastructure. Feel free to use these modules directly; frameworks like [Express](https://expressjs.com/) that depend on these modules should work out of the box. For granular compatibility information, see [Runtime > Node.js APIs](https://bun.com/docs/runtime/nodejs-apis).
5
5
  {% /callout %}
6
6
 
7
7
  To start a high-performance HTTP server with a clean API, the recommended approach is [`Bun.serve`](#start-a-server-bun-serve).
@@ -149,7 +149,7 @@ Bun.serve({
149
149
  }),
150
150
 
151
151
  // Redirects
152
- "/blog": Response.redirect("https://bun.sh/blog"),
152
+ "/blog": Response.redirect("https://bun.com/blog"),
153
153
 
154
154
  // API responses
155
155
  "/api/config": Response.json({
@@ -342,9 +342,9 @@ Bun.serve({
342
342
  });
343
343
  ```
344
344
 
345
- HTML imports don't just serve HTML — it's a full-featured frontend bundler, transpiler, and toolkit built using Bun's [bundler](https://bun.sh/docs/bundler), JavaScript transpiler and CSS parser. You can use this to build full-featured frontends with React, TypeScript, Tailwind CSS, and more.
345
+ HTML imports don't just serve HTML — it's a full-featured frontend bundler, transpiler, and toolkit built using Bun's [bundler](https://bun.com/docs/bundler), JavaScript transpiler and CSS parser. You can use this to build full-featured frontends with React, TypeScript, Tailwind CSS, and more.
346
346
 
347
- For a complete guide on building full-stack applications with HTML imports, including detailed examples and best practices, see [/docs/bundler/fullstack](https://bun.sh/docs/bundler/fullstack).
347
+ For a complete guide on building full-stack applications with HTML imports, including detailed examples and best practices, see [/docs/bundler/fullstack](https://bun.com/docs/bundler/fullstack).
348
348
 
349
349
  ### Practical example: REST API
350
350
 
@@ -605,7 +605,7 @@ Bun.serve({
605
605
  ```
606
606
 
607
607
  {% callout %}
608
- [Learn more about debugging in Bun](https://bun.sh/docs/runtime/debugger)
608
+ [Learn more about debugging in Bun](https://bun.com/docs/runtime/debugger)
609
609
  {% /callout %}
610
610
 
611
611
  The call to `Bun.serve` returns a `Server` object. To stop the server, call the `.stop()` method.
@@ -772,7 +772,7 @@ Instead of passing the server options into `Bun.serve`, `export default` it. Thi
772
772
  $ bun --hot server.ts
773
773
  ``` -->
774
774
 
775
- <!-- It's possible to configure hot reloading while using the explicit `Bun.serve` API; for details refer to [Runtime > Hot reloading](https://bun.sh/docs/runtime/hot). -->
775
+ <!-- It's possible to configure hot reloading while using the explicit `Bun.serve` API; for details refer to [Runtime > Hot reloading](https://bun.com/docs/runtime/hot). -->
776
776
 
777
777
  ## Streaming files
778
778
 
package/docs/api/s3.md CHANGED
@@ -4,7 +4,7 @@ Production servers often read, upload, and write files to S3-compatible object s
4
4
 
5
5
  ### Bun's S3 API is fast
6
6
 
7
- {% image src="https://bun.sh/bun-s3-node.gif" alt="Bun's S3 API is fast" caption="Left: Bun v1.1.44. Right: Node.js v23.6.0" /%}
7
+ {% image src="https://bun.com/bun-s3-node.gif" alt="Bun's S3 API is fast" caption="Left: Bun v1.1.44. Right: Node.js v23.6.0" /%}
8
8
 
9
9
  {% /callout %}
10
10
 
package/docs/api/spawn.md CHANGED
@@ -140,7 +140,7 @@ You can read results from the subprocess via the `stdout` and `stderr` propertie
140
140
  ```ts
141
141
  const proc = Bun.spawn(["bun", "--version"]);
142
142
  const text = await proc.stdout.text();
143
- console.log(text); // => "1.2.19-canary.20250709T140635\n"
143
+ console.log(text); // => "1.2.19-canary.20250711T140648\n"
144
144
  ```
145
145
 
146
146
  Configure the output stream by passing one of the following values to `stdout/stderr`:
package/docs/api/utils.md CHANGED
@@ -234,7 +234,7 @@ const currentFile = import.meta.url;
234
234
  Bun.openInEditor(currentFile);
235
235
  ```
236
236
 
237
- You can override this via the `debug.editor` setting in your [`bunfig.toml`](https://bun.sh/docs/runtime/bunfig).
237
+ You can override this via the `debug.editor` setting in your [`bunfig.toml`](https://bun.com/docs/runtime/bunfig).
238
238
 
239
239
  ```toml-diff#bunfig.toml
240
240
  + [debug]
@@ -704,7 +704,7 @@ Bun.nanoseconds();
704
704
  Bun implements a set of convenience functions for asynchronously consuming the body of a `ReadableStream` and converting it to various binary formats.
705
705
 
706
706
  ```ts
707
- const stream = (await fetch("https://bun.sh")).body;
707
+ const stream = (await fetch("https://bun.com")).body;
708
708
  stream; // => ReadableStream
709
709
 
710
710
  await Bun.readableStreamToArrayBuffer(stream);
@@ -787,7 +787,7 @@ const buffer = Buffer.alloc(1024 * 1024);
787
787
  estimateShallowMemoryUsageOf(buffer);
788
788
  // => 1048624
789
789
 
790
- const req = new Request("https://bun.sh");
790
+ const req = new Request("https://bun.com");
791
791
  estimateShallowMemoryUsageOf(req);
792
792
  // => 167
793
793
 
@@ -126,6 +126,42 @@ The `--sourcemap` argument embeds a sourcemap compressed with zstd, so that erro
126
126
 
127
127
  The `--bytecode` argument enables bytecode compilation. Every time you run JavaScript code in Bun, JavaScriptCore (the engine) will compile your source code into bytecode. We can move this parsing work from runtime to bundle time, saving you startup time.
128
128
 
129
+ ## Act as the Bun CLI
130
+
131
+ {% note %}
132
+
133
+ New in Bun v1.2.16
134
+
135
+ {% /note %}
136
+
137
+ You can run a standalone executable as if it were the `bun` CLI itself by setting the `BUN_BE_BUN=1` environment variable. When this variable is set, the executable will ignore its bundled entrypoint and instead expose all the features of Bun's CLI.
138
+
139
+ For example, consider an executable compiled from a simple script:
140
+
141
+ ```sh
142
+ $ cat such-bun.js
143
+ console.log("you shouldn't see this");
144
+
145
+ $ bun build --compile ./such-bun.js
146
+ [3ms] bundle 1 modules
147
+ [89ms] compile such-bun
148
+ ```
149
+
150
+ Normally, running `./such-bun` with arguments would execute the script. However, with the `BUN_BE_BUN=1` environment variable, it acts just like the `bun` binary:
151
+
152
+ ```sh
153
+ # Executable runs its own entrypoint by default
154
+ $ ./such-bun install
155
+ you shouldn't see this
156
+
157
+ # With the env var, the executable acts like the `bun` CLI
158
+ $ BUN_BE_BUN=1 ./such-bun install
159
+ bun install v1.2.16-canary.1 (1d1db811)
160
+ Checked 63 installs across 64 packages (no changes) [5.00ms]
161
+ ```
162
+
163
+ This is useful for building CLI tools on top of Bun that may need to install packages, bundle dependencies, run different or local files and more without needing to download a separate binary or install bun.
164
+
129
165
  ## Full-stack executables
130
166
 
131
167
  {% note %}
@@ -325,7 +325,7 @@ When adding a build step is too complicated, you can set `development: false` in
325
325
 
326
326
  ## Plugins
327
327
 
328
- Bun's [bundler plugins](https://bun.sh/docs/bundler/plugins) are also supported when bundling static routes.
328
+ Bun's [bundler plugins](https://bun.com/docs/bundler/plugins) are also supported when bundling static routes.
329
329
 
330
330
  To configure plugins for `Bun.serve`, add a `plugins` array in the `[serve.static]` section of your `bunfig.toml`.
331
331
 
@@ -365,7 +365,7 @@ Or in your CSS:
365
365
 
366
366
  ### Custom plugins
367
367
 
368
- Any JS file or module which exports a [valid bundler plugin object](https://bun.sh/docs/bundler/plugins#usage) (essentially an object with a `name` and `setup` field) can be placed inside the `plugins` array:
368
+ Any JS file or module which exports a [valid bundler plugin object](https://bun.com/docs/bundler/plugins#usage) (essentially an object with a `name` and `setup` field) can be placed inside the `plugins` array:
369
369
 
370
370
  ```toml#bunfig.toml
371
371
  [serve.static]
@@ -147,7 +147,7 @@ $ bun build ./index.tsx --outdir ./out --watch
147
147
 
148
148
  ## Content types
149
149
 
150
- Like the Bun runtime, the bundler supports an array of file types out of the box. The following table breaks down the bundler's set of standard "loaders". Refer to [Bundler > File types](https://bun.sh/docs/runtime/loaders) for full documentation.
150
+ Like the Bun runtime, the bundler supports an array of file types out of the box. The following table breaks down the bundler's set of standard "loaders". Refer to [Bundler > File types](https://bun.com/docs/runtime/loaders) for full documentation.
151
151
 
152
152
  {% table %}
153
153
 
@@ -220,11 +220,11 @@ console.log(logo);
220
220
  The exact behavior of the file loader is also impacted by [`naming`](#naming) and [`publicPath`](#publicpath).
221
221
  {% /callout %}
222
222
 
223
- Refer to the [Bundler > Loaders](https://bun.sh/docs/bundler/loaders#file) page for more complete documentation on the file loader.
223
+ Refer to the [Bundler > Loaders](https://bun.com/docs/bundler/loaders#file) page for more complete documentation on the file loader.
224
224
 
225
225
  ### Plugins
226
226
 
227
- The behavior described in this table can be overridden or extended with [plugins](https://bun.sh/docs/bundler/plugins). Refer to the [Bundler > Loaders](https://bun.sh/docs/bundler/plugins) page for complete documentation.
227
+ The behavior described in this table can be overridden or extended with [plugins](https://bun.com/docs/bundler/plugins). Refer to the [Bundler > Loaders](https://bun.com/docs/bundler/plugins) page for complete documentation.
228
228
 
229
229
  ## API
230
230
 
@@ -484,7 +484,7 @@ n/a
484
484
 
485
485
  {% /codetabs %}
486
486
 
487
- Bun implements a universal plugin system for both Bun's runtime and bundler. Refer to the [plugin documentation](https://bun.sh/docs/bundler/plugins) for complete documentation.
487
+ Bun implements a universal plugin system for both Bun's runtime and bundler. Refer to the [plugin documentation](https://bun.com/docs/bundler/plugins) for complete documentation.
488
488
 
489
489
  <!-- ### `manifest`
490
490
 
@@ -1102,7 +1102,7 @@ A prefix to be appended to any import paths in bundled code.
1102
1102
 
1103
1103
  In many cases, generated bundles will contain no `import` statements. After all, the goal of bundling is to combine all of the code into a single file. However there are a number of cases with the generated bundles will contain `import` statements.
1104
1104
 
1105
- - **Asset imports** — When importing an unrecognized file type like `*.svg`, the bundler defers to the [`file` loader](https://bun.sh/docs/bundler/loaders#file), which copies the file into `outdir` as is. The import is converted into a variable
1105
+ - **Asset imports** — When importing an unrecognized file type like `*.svg`, the bundler defers to the [`file` loader](https://bun.com/docs/bundler/loaders#file), which copies the file into `outdir` as is. The import is converted into a variable
1106
1106
  - **External modules** — Files and modules can be marked as [`external`](#external), in which case they will not be included in the bundle. Instead, the `import` statement will be left in the final bundle.
1107
1107
  - **Chunking**. When [`splitting`](#splitting) is enabled, the bundler may generate separate "chunk" files that represent code that is shared among multiple entrypoints.
1108
1108
 
@@ -1178,7 +1178,7 @@ $ bun build ./index.tsx --outdir ./out --define 'STRING="value"' --define "neste
1178
1178
 
1179
1179
  ### `loader`
1180
1180
 
1181
- A map of file extensions to [built-in loader names](https://bun.sh/docs/bundler/loaders#built-in-loaders). This can be used to quickly customize how certain files are loaded.
1181
+ A map of file extensions to [built-in loader names](https://bun.com/docs/bundler/loaders#built-in-loaders). This can be used to quickly customize how certain files are loaded.
1182
1182
 
1183
1183
  {% codetabs %}
1184
1184
 
@@ -1310,7 +1310,7 @@ Each artifact also contains the following properties:
1310
1310
  ---
1311
1311
 
1312
1312
  - `loader`
1313
- - The loader was used to interpret the file. See [Bundler > Loaders](https://bun.sh/docs/bundler/loaders) to see how Bun maps file extensions to the appropriate built-in loader.
1313
+ - The loader was used to interpret the file. See [Bundler > Loaders](https://bun.com/docs/bundler/loaders) to see how Bun maps file extensions to the appropriate built-in loader.
1314
1314
 
1315
1315
  ---
1316
1316
 
@@ -1394,7 +1394,7 @@ $ bun build ./cli.tsx --outfile mycli --compile
1394
1394
  $ ./mycli
1395
1395
  ```
1396
1396
 
1397
- Refer to [Bundler > Executables](https://bun.sh/docs/bundler/executables) for complete documentation.
1397
+ Refer to [Bundler > Executables](https://bun.com/docs/bundler/executables) for complete documentation.
1398
1398
 
1399
1399
  ## Logs and errors
1400
1400
 
@@ -2,7 +2,7 @@ The Bun bundler implements a set of default loaders out of the box. As a rule of
2
2
 
3
3
  `.js` `.cjs` `.mjs` `.mts` `.cts` `.ts` `.tsx` `.jsx` `.toml` `.json` `.txt` `.wasm` `.node` `.html`
4
4
 
5
- Bun uses the file extension to determine which built-in _loader_ should be used to parse the file. Every loader has a name, such as `js`, `tsx`, or `json`. These names are used when building [plugins](https://bun.sh/docs/bundler/plugins) that extend Bun with custom loaders.
5
+ Bun uses the file extension to determine which built-in _loader_ should be used to parse the file. Every loader has a name, such as `js`, `tsx`, or `json`. These names are used when building [plugins](https://bun.com/docs/bundler/plugins) that extend Bun with custom loaders.
6
6
 
7
7
  You can explicitly specify which loader to use using the 'loader' import attribute.
8
8
 
@@ -175,7 +175,7 @@ In the bundler, `.node` files are handled using the [`file`](#file) loader.
175
175
 
176
176
  **SQLite loader**. `with { "type": "sqlite" }` import attribute
177
177
 
178
- In the runtime and bundler, SQLite databases can be directly imported. This will load the database using [`bun:sqlite`](https://bun.sh/docs/api/sqlite).
178
+ In the runtime and bundler, SQLite databases can be directly imported. This will load the database using [`bun:sqlite`](https://bun.com/docs/api/sqlite).
179
179
 
180
180
  ```ts
181
181
  import db from "./my.db" with { type: "sqlite" };
@@ -192,7 +192,7 @@ You can change this behavior with the `"embed"` attribute:
192
192
  import db from "./my.db" with { type: "sqlite", embed: "true" };
193
193
  ```
194
194
 
195
- When using a [standalone executable](https://bun.sh/docs/bundler/executables), the database is embedded into the single-file executable.
195
+ When using a [standalone executable](https://bun.com/docs/bundler/executables), the database is embedded into the single-file executable.
196
196
 
197
197
  Otherwise, the database to embed is copied into the `outdir` with a hashed filename.
198
198
 
@@ -280,7 +280,7 @@ The `html` loader behaves differently depending on how it's used:
280
280
 
281
281
  **Bun Shell loader**. Default for `.sh` files
282
282
 
283
- This loader is used to parse [Bun Shell](https://bun.sh/docs/runtime/shell) scripts. It's only supported when starting Bun itself, so it's not available in the bundler or in the runtime.
283
+ This loader is used to parse [Bun Shell](https://bun.com/docs/runtime/shell) scripts. It's only supported when starting Bun itself, so it's not available in the bundler or in the runtime.
284
284
 
285
285
  ```sh
286
286
  $ bun run ./script.sh
@@ -336,7 +336,7 @@ If a value is specified for `publicPath`, the import will use value as a prefix
336
336
  {% /table %}
337
337
 
338
338
  {% callout %}
339
- The location and file name of the copied file is determined by the value of [`naming.asset`](https://bun.sh/docs/bundler#naming).
339
+ The location and file name of the copied file is determined by the value of [`naming.asset`](https://bun.com/docs/bundler#naming).
340
340
  {% /callout %}
341
341
  This loader is copied into the `outdir` as-is. The name of the copied file is determined using the value of `naming.asset`.
342
342
 
@@ -161,7 +161,7 @@ The result of `fetch` is `Promise<Response>`, so it can be directly returned.
161
161
 
162
162
  ```ts#macro.ts
163
163
  export function getObject() {
164
- return fetch("https://bun.sh")
164
+ return fetch("https://bun.com")
165
165
  }
166
166
  ```
167
167
 
@@ -291,7 +291,7 @@ One of the reasons why Bun's bundler is so fast is that it is written in native
291
291
 
292
292
  However, one limitation of plugins written in JavaScript is that JavaScript itself is single-threaded.
293
293
 
294
- Native plugins are written as [NAPI](https://bun.sh/docs/api/node-api) modules and can be run on multiple threads. This allows native plugins to run much faster than JavaScript plugins.
294
+ Native plugins are written as [NAPI](https://bun.com/docs/api/node-api) modules and can be run on multiple threads. This allows native plugins to run much faster than JavaScript plugins.
295
295
 
296
296
  In addition, native plugins can skip unnecessary work such as the UTF-8 -> UTF-16 conversion needed to pass strings to JavaScript.
297
297
 
@@ -2,7 +2,7 @@ Bun's bundler API is inspired heavily by [esbuild](https://esbuild.github.io/).
2
2
 
3
3
  There are a few behavioral differences to note.
4
4
 
5
- - **Bundling by default**. Unlike esbuild, Bun _always bundles by default_. This is why the `--bundle` flag isn't necessary in the Bun example. To transpile each file individually, use [`Bun.Transpiler`](https://bun.sh/docs/api/transpiler).
5
+ - **Bundling by default**. Unlike esbuild, Bun _always bundles by default_. This is why the `--bundle` flag isn't necessary in the Bun example. To transpile each file individually, use [`Bun.Transpiler`](https://bun.com/docs/api/transpiler).
6
6
  - **It's just a bundler**. Unlike esbuild, Bun's bundler does not include a built-in development server or file watcher. It's just a bundler. The bundler is intended for use in conjunction with `Bun.serve` and other runtime APIs to achieve the same effect. As such, all options relating to HTTP/file watching are not applicable.
7
7
 
8
8
  ## Performance
@@ -65,7 +65,7 @@ In Bun's CLI, simple boolean flags like `--minify` do not accept an argument. Ot
65
65
 
66
66
  - `--loader:.ext=loader`
67
67
  - `--loader .ext:loader`
68
- - Bun supports a different set of built-in loaders than esbuild; see [Bundler > Loaders](https://bun.sh/docs/bundler/loaders) for a complete reference. The esbuild loaders `dataurl`, `binary`, `base64`, `copy`, and `empty` are not yet implemented.
68
+ - Bun supports a different set of built-in loaders than esbuild; see [Bundler > Loaders](https://bun.com/docs/bundler/loaders) for a complete reference. The esbuild loaders `dataurl`, `binary`, `base64`, `copy`, and `empty` are not yet implemented.
69
69
 
70
70
  The syntax for `--loader` is slightly different.
71
71
 
@@ -474,7 +474,7 @@ In Bun's CLI, simple boolean flags like `--minify` do not accept an argument. Ot
474
474
 
475
475
  - `bundle`
476
476
  - n/a
477
- - Always `true`. Use [`Bun.Transpiler`](https://bun.sh/docs/api/transpiler) to transpile without bundling.
477
+ - Always `true`. Use [`Bun.Transpiler`](https://bun.com/docs/api/transpiler) to transpile without bundling.
478
478
 
479
479
  ---
480
480
 
@@ -635,7 +635,7 @@ In Bun's CLI, simple boolean flags like `--minify` do not accept an argument. Ot
635
635
 
636
636
  - `loader`
637
637
  - `loader`
638
- - Bun supports a different set of built-in loaders than esbuild; see [Bundler > Loaders](https://bun.sh/docs/bundler/loaders) for a complete reference. The esbuild loaders `dataurl`, `binary`, `base64`, `copy`, and `empty` are not yet implemented.
638
+ - Bun supports a different set of built-in loaders than esbuild; see [Bundler > Loaders](https://bun.com/docs/bundler/loaders) for a complete reference. The esbuild loaders `dataurl`, `binary`, `base64`, `copy`, and `empty` are not yet implemented.
639
639
 
640
640
  ---
641
641
 
@@ -891,7 +891,7 @@ const myPlugin: BunPlugin = {
891
891
  };
892
892
  ```
893
893
 
894
- 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`](https://bun.sh/docs/bundler/plugins) (same thing but with Bun's `BuildConfig` format) instead.
894
+ 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`](https://bun.com/docs/bundler/plugins) (same thing but with Bun's `BuildConfig` format) instead.
895
895
 
896
896
  ```ts
897
897
  import type { BunPlugin } from "bun";
@@ -4,7 +4,7 @@
4
4
 
5
5
  Template a new Bun project with `bun create`. This is a flexible command that can be used to create a new project from a React component, a `create-<template>` npm package, a GitHub repo, or a local template.
6
6
 
7
- If you're looking to create a brand new empty project, use [`bun init`](https://bun.sh/docs/cli/init).
7
+ If you're looking to create a brand new empty project, use [`bun init`](https://bun.com/docs/cli/init).
8
8
 
9
9
  ## From a React component
10
10
 
@@ -30,11 +30,11 @@ $ bun create ./MyComponent.jsx # .tsx also supported
30
30
 
31
31
  When you run `bun create <component>`, Bun:
32
32
 
33
- 1. Uses [Bun's JavaScript bundler](https://bun.sh/docs/bundler) to analyze your module graph.
33
+ 1. Uses [Bun's JavaScript bundler](https://bun.com/docs/bundler) to analyze your module graph.
34
34
  2. Collects all the dependencies needed to run the component.
35
35
  3. Scans the exports of the entry point for a React component.
36
36
  4. Generates a `package.json` file with the dependencies and scripts needed to run the component.
37
- 5. Installs any missing dependencies using [`bun install --only-missing`](https://bun.sh/docs/cli/install).
37
+ 5. Installs any missing dependencies using [`bun install --only-missing`](https://bun.com/docs/cli/install).
38
38
  6. Generates the following files:
39
39
  - `${component}.html`
40
40
  - `${component}.client.tsx` (entry point for the frontend)
@@ -184,7 +184,7 @@ Peer dependencies are handled similarly to yarn. `bun install` will automaticall
184
184
 
185
185
  ## Lockfile
186
186
 
187
- `bun.lock` is Bun’s lockfile format. See [our blogpost about the text lockfile](https://bun.sh/blog/bun-lock-text-lockfile).
187
+ `bun.lock` is Bun’s lockfile format. See [our blogpost about the text lockfile](https://bun.com/blog/bun-lock-text-lockfile).
188
188
 
189
189
  Prior to Bun 1.2, the lockfile was binary and called `bun.lockb`. Old lockfiles can be upgraded to the new format by running `bun install --save-text-lockfile --frozen-lockfile --lockfile-only`, and then deleting `bun.lockb`.
190
190