bun-types 1.1.42-canary.20250102T140513 → 1.1.43-canary.20250103T140555

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.
package/bun.d.ts CHANGED
@@ -3749,9 +3749,24 @@ declare module "bun" {
3749
3749
  function nanoseconds(): number;
3750
3750
 
3751
3751
  /**
3752
- * Generate a heap snapshot for seeing where the heap is being used
3752
+ * Show precise statistics about memory usage of your application
3753
+ *
3754
+ * Generate a heap snapshot in JavaScriptCore's format that can be viewed with `bun --inspect` or Safari's Web Inspector
3755
+ */
3756
+ function generateHeapSnapshot(format?: "jsc"): HeapSnapshot;
3757
+
3758
+ /**
3759
+ * Show precise statistics about memory usage of your application
3760
+ *
3761
+ * Generate a V8 Heap Snapshot that can be used with Chrome DevTools & Visual Studio Code
3762
+ *
3763
+ * This is a JSON string that can be saved to a file.
3764
+ * ```ts
3765
+ * const snapshot = Bun.generateHeapSnapshot("v8");
3766
+ * await Bun.write("heap.heapsnapshot", snapshot);
3767
+ * ```
3753
3768
  */
3754
- function generateHeapSnapshot(): HeapSnapshot;
3769
+ function generateHeapSnapshot(format: "v8"): string;
3755
3770
 
3756
3771
  /**
3757
3772
  * The next time JavaScriptCore is idle, clear unused memory and attempt to reduce the heap size.
@@ -1,4 +1,4 @@
1
- All packages downloaded from the registry are stored in a global cache at `~/.bun/install/cache`. They are stored in subdirectories named like `${name}@${version}`, so multiple versions of a package can be cached.
1
+ All packages downloaded from the registry are stored in a global cache at `~/.bun/install/cache`, or the path defined by the environment variable `BUN_INSTALL_CACHE_DIR`. They are stored in subdirectories named like `${name}@${version}`, so multiple versions of a package can be cached.
2
2
 
3
3
  {% details summary="Configuring cache behavior (bunfig.toml)" %}
4
4
 
@@ -53,7 +53,7 @@ Some methods are not optimized yet.
53
53
 
54
54
  ### [`node:events`](https://nodejs.org/api/events.html)
55
55
 
56
- 🟡 `events.addAbortListener` & `events.getMaxListeners` do not support (web api) `EventTarget`
56
+ 🟢 Fully implemented. `EventEmitterAsyncResource` uses `AsyncResource` underneath.
57
57
 
58
58
  ### [`node:fs`](https://nodejs.org/api/fs.html)
59
59
 
@@ -157,11 +157,11 @@ Some methods are not optimized yet.
157
157
 
158
158
  ### [`node:v8`](https://nodejs.org/api/v8.html)
159
159
 
160
- 🔴 `serialize` and `deserialize` use JavaScriptCore's wire format instead of V8's. Otherwise, not implemented. For profiling, use [`bun:jsc`](https://bun.sh/docs/project/benchmarking#bunjsc) instead.
160
+ 🟡 `writeHeapSnapshot` and `getHeapSnapshot` are implemented. `serialize` and `deserialize` use JavaScriptCore's wire format instead of V8's. Other methods are not implemented. For profiling, use [`bun:jsc`](https://bun.sh/docs/project/benchmarking#bunjsc) instead.
161
161
 
162
162
  ### [`node:vm`](https://nodejs.org/api/vm.html)
163
163
 
164
- 🟡 Core functionality works, but experimental VM ES modules are not implemented, including `vm.Module`, `vm.SourceTextModule`, `vm.SyntheticModule`,`importModuleDynamically`, and `vm.measureMemory`. Options like `timeout`, `breakOnSigint`, `cachedData` are not implemented yet. There is a bug with `this` value for contextified options not having the correct prototype.
164
+ 🟡 Core functionality works, but experimental VM ES modules are not implemented, including `vm.Module`, `vm.SourceTextModule`, `vm.SyntheticModule`,`importModuleDynamically`, and `vm.measureMemory`. Options like `timeout`, `breakOnSigint`, `cachedData` are not implemented yet.
165
165
 
166
166
  ### [`node:wasi`](https://nodejs.org/api/wasi.html)
167
167
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.42-canary.20250102T140513",
2
+ "version": "1.1.43-canary.20250103T140555",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",