bun-types 1.2.0-canary.20250123T140603 → 1.2.0-canary.20250125T140514
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 +16 -7
- package/docs/api/fetch.md +1 -1
- package/docs/api/spawn.md +1 -1
- package/docs/cli/publish.md +1 -1
- package/docs/runtime/debugger.md +3 -3
- package/docs/test/dom.md +1 -1
- package/package.json +1 -1
package/bun.d.ts
CHANGED
|
@@ -3857,7 +3857,7 @@ declare module "bun" {
|
|
|
3857
3857
|
port?: string | number;
|
|
3858
3858
|
|
|
3859
3859
|
/**
|
|
3860
|
-
*
|
|
3860
|
+
* Whether the `SO_REUSEPORT` flag should be set.
|
|
3861
3861
|
*
|
|
3862
3862
|
* This allows multiple processes to bind to the same port, which is useful for load balancing.
|
|
3863
3863
|
*
|
|
@@ -3865,6 +3865,12 @@ declare module "bun" {
|
|
|
3865
3865
|
*/
|
|
3866
3866
|
reusePort?: boolean;
|
|
3867
3867
|
|
|
3868
|
+
/**
|
|
3869
|
+
* Whether the `IPV6_V6ONLY` flag should be set.
|
|
3870
|
+
* @default false
|
|
3871
|
+
*/
|
|
3872
|
+
ipv6Only?: boolean;
|
|
3873
|
+
|
|
3868
3874
|
/**
|
|
3869
3875
|
* What hostname should the server listen on?
|
|
3870
3876
|
*
|
|
@@ -7242,7 +7248,7 @@ declare module "bun" {
|
|
|
7242
7248
|
* Types for `bun.lock`
|
|
7243
7249
|
*/
|
|
7244
7250
|
type BunLockFile = {
|
|
7245
|
-
lockfileVersion: 0;
|
|
7251
|
+
lockfileVersion: 0 | 1;
|
|
7246
7252
|
workspaces: {
|
|
7247
7253
|
[workspace: string]: BunLockFileWorkspacePackage;
|
|
7248
7254
|
};
|
|
@@ -7254,10 +7260,11 @@ declare module "bun" {
|
|
|
7254
7260
|
* ```
|
|
7255
7261
|
* INFO = { prod/dev/optional/peer dependencies, os, cpu, libc (TODO), bin, binDir }
|
|
7256
7262
|
*
|
|
7263
|
+
* // first index is resolution for each type of package
|
|
7257
7264
|
* npm -> [ "name@version", registry (TODO: remove if default), INFO, integrity]
|
|
7258
7265
|
* symlink -> [ "name@link:path", INFO ]
|
|
7259
7266
|
* folder -> [ "name@file:path", INFO ]
|
|
7260
|
-
* workspace -> [ "name@workspace:path"
|
|
7267
|
+
* workspace -> [ "name@workspace:path" ] // workspace is only path
|
|
7261
7268
|
* tarball -> [ "name@tarball", INFO ]
|
|
7262
7269
|
* root -> [ "name@root:", { bin, binDir } ]
|
|
7263
7270
|
* git -> [ "name@git+repo", INFO, .bun-tag string (TODO: remove this) ]
|
|
@@ -7275,6 +7282,8 @@ declare module "bun" {
|
|
|
7275
7282
|
optionalDependencies?: Record<string, string>;
|
|
7276
7283
|
peerDependencies?: Record<string, string>;
|
|
7277
7284
|
optionalPeers?: string[];
|
|
7285
|
+
bin?: string | Record<string, string>;
|
|
7286
|
+
binDir?: string;
|
|
7278
7287
|
};
|
|
7279
7288
|
|
|
7280
7289
|
type BunLockFileWorkspacePackage = BunLockFileBasePackageInfo & {
|
|
@@ -7285,8 +7294,6 @@ declare module "bun" {
|
|
|
7285
7294
|
type BunLockFilePackageInfo = BunLockFileBasePackageInfo & {
|
|
7286
7295
|
os?: string | string[];
|
|
7287
7296
|
cpu?: string | string[];
|
|
7288
|
-
bin?: Record<string, string>;
|
|
7289
|
-
binDir?: string;
|
|
7290
7297
|
bundled?: true;
|
|
7291
7298
|
};
|
|
7292
7299
|
|
|
@@ -7299,10 +7306,12 @@ declare module "bun" {
|
|
|
7299
7306
|
info: BunLockFilePackageInfo,
|
|
7300
7307
|
integrity: string,
|
|
7301
7308
|
]
|
|
7302
|
-
/** symlink, folder, tarball
|
|
7309
|
+
/** symlink, folder, tarball */
|
|
7303
7310
|
| [pkg: string, info: BunLockFilePackageInfo]
|
|
7311
|
+
/** workspace */
|
|
7312
|
+
| [pkg: string]
|
|
7304
7313
|
/** git, github */
|
|
7305
7314
|
| [pkg: string, info: BunLockFilePackageInfo, bunTag: string]
|
|
7306
7315
|
/** root */
|
|
7307
|
-
| [pkg: string, info: Pick<
|
|
7316
|
+
| [pkg: string, info: Pick<BunLockFileBasePackageInfo, "bin" | "binDir">];
|
|
7308
7317
|
}
|
package/docs/api/fetch.md
CHANGED
|
@@ -195,7 +195,7 @@ This will print the request and response headers to your terminal:
|
|
|
195
195
|
```sh
|
|
196
196
|
[fetch] > HTTP/1.1 GET http://example.com/
|
|
197
197
|
[fetch] > Connection: keep-alive
|
|
198
|
-
[fetch] > User-Agent: Bun/1.2.0-canary.
|
|
198
|
+
[fetch] > User-Agent: Bun/1.2.0-canary.20250125T140514
|
|
199
199
|
[fetch] > Accept: */*
|
|
200
200
|
[fetch] > Host: example.com
|
|
201
201
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
package/docs/api/spawn.md
CHANGED
|
@@ -110,7 +110,7 @@ You can read results from the subprocess via the `stdout` and `stderr` propertie
|
|
|
110
110
|
```ts
|
|
111
111
|
const proc = Bun.spawn(["bun", "--version"]);
|
|
112
112
|
const text = await new Response(proc.stdout).text();
|
|
113
|
-
console.log(text); // => "1.2.0-canary.
|
|
113
|
+
console.log(text); // => "1.2.0-canary.20250125T140514"
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
Configure the output stream by passing one of the following values to `stdout/stderr`:
|
package/docs/cli/publish.md
CHANGED
package/docs/runtime/debugger.md
CHANGED
|
@@ -124,11 +124,11 @@ await fetch("https://example.com", {
|
|
|
124
124
|
This prints the `fetch` request as a single-line `curl` command to let you copy-paste into your terminal to replicate the request.
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
|
-
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.0-canary.
|
|
127
|
+
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.0-canary.20250125T140514" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}"
|
|
128
128
|
[fetch] > HTTP/1.1 POST https://example.com/
|
|
129
129
|
[fetch] > content-type: application/json
|
|
130
130
|
[fetch] > Connection: keep-alive
|
|
131
|
-
[fetch] > User-Agent: Bun/1.2.0-canary.
|
|
131
|
+
[fetch] > User-Agent: Bun/1.2.0-canary.20250125T140514
|
|
132
132
|
[fetch] > Accept: */*
|
|
133
133
|
[fetch] > Host: example.com
|
|
134
134
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
|
@@ -170,7 +170,7 @@ This prints the following to the console:
|
|
|
170
170
|
[fetch] > HTTP/1.1 POST https://example.com/
|
|
171
171
|
[fetch] > content-type: application/json
|
|
172
172
|
[fetch] > Connection: keep-alive
|
|
173
|
-
[fetch] > User-Agent: Bun/1.2.0-canary.
|
|
173
|
+
[fetch] > User-Agent: Bun/1.2.0-canary.20250125T140514
|
|
174
174
|
[fetch] > Accept: */*
|
|
175
175
|
[fetch] > Host: example.com
|
|
176
176
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
package/docs/test/dom.md
CHANGED
package/package.json
CHANGED