bun-types 1.2.9-canary.20250401T140709 → 1.2.9-canary.20250403T140620
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/docs/api/fetch.md +1 -1
- package/docs/api/spawn.md +1 -1
- package/docs/cli/publish.md +1 -1
- package/docs/guides/ecosystem/nuxt.md +1 -1
- package/docs/guides/install/add-peer.md +2 -2
- package/docs/guides/install/from-npm-install-to-bun-install.md +1 -1
- package/docs/guides/test/run-tests.md +3 -3
- package/docs/guides/test/snapshot.md +3 -3
- package/docs/guides/test/update-snapshots.md +1 -1
- package/docs/guides/util/version.md +1 -1
- package/docs/installation.md +4 -4
- package/docs/runtime/debugger.md +3 -3
- package/docs/test/dom.md +1 -1
- package/package.json +1 -1
- package/s3.d.ts +114 -0
package/docs/api/fetch.md
CHANGED
|
@@ -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.9-canary.
|
|
340
|
+
[fetch] > User-Agent: Bun/1.2.9-canary.20250403T140620
|
|
341
341
|
[fetch] > Accept: */*
|
|
342
342
|
[fetch] > Host: example.com
|
|
343
343
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
package/docs/api/spawn.md
CHANGED
|
@@ -120,7 +120,7 @@ You can read results from the subprocess via the `stdout` and `stderr` propertie
|
|
|
120
120
|
```ts
|
|
121
121
|
const proc = Bun.spawn(["bun", "--version"]);
|
|
122
122
|
const text = await new Response(proc.stdout).text();
|
|
123
|
-
console.log(text); // => "1.2.9-canary.
|
|
123
|
+
console.log(text); // => "1.2.9-canary.20250403T140620"
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Configure the output stream by passing one of the following values to `stdout/stderr`:
|
package/docs/cli/publish.md
CHANGED
|
@@ -9,7 +9,7 @@ $ bunx nuxi init my-nuxt-app
|
|
|
9
9
|
✔ Which package manager would you like to use?
|
|
10
10
|
bun
|
|
11
11
|
◐ Installing dependencies...
|
|
12
|
-
bun install v1.2.9-canary.
|
|
12
|
+
bun install v1.2.9-canary.20250403T140620 (16b4bf34)
|
|
13
13
|
+ @nuxt/devtools@0.8.2
|
|
14
14
|
+ nuxt@3.7.0
|
|
15
15
|
785 packages installed [2.67s]
|
|
@@ -16,7 +16,7 @@ This will add the package to `peerDependencies` in `package.json`.
|
|
|
16
16
|
```json-diff
|
|
17
17
|
{
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
+ "@types/bun": "^1.2.9-canary.
|
|
19
|
+
+ "@types/bun": "^1.2.9-canary.20250403T140620"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
```
|
|
@@ -28,7 +28,7 @@ Running `bun install` will install peer dependencies by default, unless marked o
|
|
|
28
28
|
```json-diff
|
|
29
29
|
{
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@types/bun": "^1.2.9-canary.
|
|
31
|
+
"@types/bun": "^1.2.9-canary.20250403T140620"
|
|
32
32
|
},
|
|
33
33
|
"peerDependenciesMeta": {
|
|
34
34
|
+ "@types/bun": {
|
|
@@ -97,7 +97,7 @@ $ bun update
|
|
|
97
97
|
$ bun update @types/bun --latest
|
|
98
98
|
|
|
99
99
|
# Update a dependency to a specific version
|
|
100
|
-
$ bun update @types/bun@1.2.9-canary.
|
|
100
|
+
$ bun update @types/bun@1.2.9-canary.20250403T140620
|
|
101
101
|
|
|
102
102
|
# Update all dependencies to the latest versions
|
|
103
103
|
$ bun update --latest
|
|
@@ -21,7 +21,7 @@ Here's what the output of a typical test run looks like. In this case, there are
|
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
$ bun test
|
|
24
|
-
bun test v1.2.9-canary.
|
|
24
|
+
bun test v1.2.9-canary.20250403T140620 (9c68abdb)
|
|
25
25
|
|
|
26
26
|
test.test.js:
|
|
27
27
|
✓ add [0.87ms]
|
|
@@ -47,7 +47,7 @@ To only run certain test files, pass a positional argument to `bun test`. The ru
|
|
|
47
47
|
|
|
48
48
|
```sh
|
|
49
49
|
$ bun test test3
|
|
50
|
-
bun test v1.2.9-canary.
|
|
50
|
+
bun test v1.2.9-canary.20250403T140620 (9c68abdb)
|
|
51
51
|
|
|
52
52
|
test3.test.js:
|
|
53
53
|
✓ add [1.40ms]
|
|
@@ -85,7 +85,7 @@ Adding `-t add` will only run tests with "add" in the name. This works with test
|
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
87
|
$ bun test -t add
|
|
88
|
-
bun test v1.2.9-canary.
|
|
88
|
+
bun test v1.2.9-canary.20250403T140620 (9c68abdb)
|
|
89
89
|
|
|
90
90
|
test.test.js:
|
|
91
91
|
✓ add [1.79ms]
|
|
@@ -18,7 +18,7 @@ The first time this test is executed, Bun will evaluate the value passed into `e
|
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
20
|
$ bun test test/snap
|
|
21
|
-
bun test v1.2.9-canary.
|
|
21
|
+
bun test v1.2.9-canary.20250403T140620 (9c68abdb)
|
|
22
22
|
|
|
23
23
|
test/snap.test.ts:
|
|
24
24
|
✓ snapshot [1.48ms]
|
|
@@ -61,7 +61,7 @@ Later, when this test file is executed again, Bun will read the snapshot file an
|
|
|
61
61
|
|
|
62
62
|
```sh
|
|
63
63
|
$ bun test
|
|
64
|
-
bun test v1.2.9-canary.
|
|
64
|
+
bun test v1.2.9-canary.20250403T140620 (9c68abdb)
|
|
65
65
|
|
|
66
66
|
test/snap.test.ts:
|
|
67
67
|
✓ snapshot [1.05ms]
|
|
@@ -78,7 +78,7 @@ To update snapshots, use the `--update-snapshots` flag.
|
|
|
78
78
|
|
|
79
79
|
```sh
|
|
80
80
|
$ bun test --update-snapshots
|
|
81
|
-
bun test v1.2.9-canary.
|
|
81
|
+
bun test v1.2.9-canary.20250403T140620 (9c68abdb)
|
|
82
82
|
|
|
83
83
|
test/snap.test.ts:
|
|
84
84
|
✓ snapshot [0.86ms]
|
package/docs/installation.md
CHANGED
|
@@ -14,7 +14,7 @@ Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Us
|
|
|
14
14
|
```bash#macOS/Linux_(curl)
|
|
15
15
|
$ curl -fsSL https://bun.sh/install | bash # for macOS, Linux, and WSL
|
|
16
16
|
# to install a specific version
|
|
17
|
-
$ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.9-canary.
|
|
17
|
+
$ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.9-canary.20250403T140620"
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```bash#npm
|
|
@@ -189,10 +189,10 @@ Since Bun is a single binary, you can install older versions of Bun by re-runnin
|
|
|
189
189
|
|
|
190
190
|
### Installing a specific version of Bun on Linux/Mac
|
|
191
191
|
|
|
192
|
-
To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.9-canary.
|
|
192
|
+
To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.9-canary.20250403T140620`.
|
|
193
193
|
|
|
194
194
|
```sh
|
|
195
|
-
$ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.9-canary.
|
|
195
|
+
$ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.9-canary.20250403T140620"
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
### Installing a specific version of Bun on Windows
|
|
@@ -201,7 +201,7 @@ On Windows, you can install a specific version of Bun by passing the version num
|
|
|
201
201
|
|
|
202
202
|
```sh
|
|
203
203
|
# PowerShell:
|
|
204
|
-
$ iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.9-canary.
|
|
204
|
+
$ iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.9-canary.20250403T140620"
|
|
205
205
|
```
|
|
206
206
|
|
|
207
207
|
## Downloading Bun binaries directly
|
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.9-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.9-canary.20250403T140620" -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.9-canary.
|
|
131
|
+
[fetch] > User-Agent: Bun/1.2.9-canary.20250403T140620
|
|
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.9-canary.
|
|
173
|
+
[fetch] > User-Agent: Bun/1.2.9-canary.20250403T140620
|
|
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
package/s3.d.ts
CHANGED
|
@@ -617,6 +617,106 @@ declare module "bun" {
|
|
|
617
617
|
stat(): Promise<S3Stats>;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
+
interface S3ListObjectsOptions {
|
|
621
|
+
/** Limits the response to keys that begin with the specified prefix. */
|
|
622
|
+
prefix?: string;
|
|
623
|
+
/** ContinuationToken indicates to S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key. You can use this ContinuationToken for pagination of the list results. */
|
|
624
|
+
continuationToken?: string;
|
|
625
|
+
/** A delimiter is a character that you use to group keys. */
|
|
626
|
+
delimiter?: string;
|
|
627
|
+
/** Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. */
|
|
628
|
+
maxKeys?: number;
|
|
629
|
+
/** StartAfter is where you want S3 to start listing from. S3 starts listing after this specified key. StartAfter can be any key in the bucket. */
|
|
630
|
+
startAfter?: string;
|
|
631
|
+
/** Encoding type used by S3 to encode the object keys in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that S3 encode the keys in the response. */
|
|
632
|
+
encodingType?: "url";
|
|
633
|
+
/** If you want to return the owner field with each key in the result, then set the FetchOwner field to true. */
|
|
634
|
+
fetchOwner?: boolean;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
interface S3ListObjectsResponse {
|
|
638
|
+
/** All of the keys (up to 1,000) that share the same prefix are grouped together. When counting the total numbers of returns by this API operation, this group of keys is considered as one item.
|
|
639
|
+
*
|
|
640
|
+
* A response can contain CommonPrefixes only if you specify a delimiter.
|
|
641
|
+
*
|
|
642
|
+
* CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter.
|
|
643
|
+
*
|
|
644
|
+
* CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix.
|
|
645
|
+
*
|
|
646
|
+
* For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns. */
|
|
647
|
+
commonPrefixes?: { prefix: string }[];
|
|
648
|
+
/** Metadata about each object returned. */
|
|
649
|
+
contents?: {
|
|
650
|
+
/** The algorithm that was used to create a checksum of the object. */
|
|
651
|
+
checksumAlgorithm?: "CRC32" | "CRC32C" | "SHA1" | "SHA256" | "CRC64NVME";
|
|
652
|
+
/** The checksum type that is used to calculate the object’s checksum value. */
|
|
653
|
+
checksumType?: "COMPOSITE" | "FULL_OBJECT";
|
|
654
|
+
/**
|
|
655
|
+
* The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
|
|
656
|
+
*
|
|
657
|
+
* - Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
|
|
658
|
+
* - Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
|
|
659
|
+
* - If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
|
|
660
|
+
*
|
|
661
|
+
* MD5 is not supported by directory buckets.
|
|
662
|
+
*/
|
|
663
|
+
eTag?: string;
|
|
664
|
+
/** The name that you assign to an object. You use the object key to retrieve the object. */
|
|
665
|
+
key: string;
|
|
666
|
+
/** Creation date of the object. */
|
|
667
|
+
lastModified?: string;
|
|
668
|
+
/** The owner of the object */
|
|
669
|
+
owner?: {
|
|
670
|
+
/** The ID of the owner. */
|
|
671
|
+
id?: string;
|
|
672
|
+
/** The display name of the owner. */
|
|
673
|
+
displayName?: string;
|
|
674
|
+
};
|
|
675
|
+
/** Specifies the restoration status of an object. Objects in certain storage classes must be restored before they can be retrieved. */
|
|
676
|
+
restoreStatus?: {
|
|
677
|
+
/** Specifies whether the object is currently being restored. */
|
|
678
|
+
isRestoreInProgress?: boolean;
|
|
679
|
+
/** Indicates when the restored copy will expire. This value is populated only if the object has already been restored. */
|
|
680
|
+
restoreExpiryDate?: string;
|
|
681
|
+
};
|
|
682
|
+
/** Size in bytes of the object */
|
|
683
|
+
size?: number;
|
|
684
|
+
/** The class of storage used to store the object. */
|
|
685
|
+
storageClass?:
|
|
686
|
+
| "STANDARD"
|
|
687
|
+
| "REDUCED_REDUNDANCY"
|
|
688
|
+
| "GLACIER"
|
|
689
|
+
| "STANDARD_IA"
|
|
690
|
+
| "ONEZONE_IA"
|
|
691
|
+
| "INTELLIGENT_TIERING"
|
|
692
|
+
| "DEEP_ARCHIVE"
|
|
693
|
+
| "OUTPOSTS"
|
|
694
|
+
| "GLACIER_IR"
|
|
695
|
+
| "SNOW"
|
|
696
|
+
| "EXPRESS_ONEZONE";
|
|
697
|
+
}[];
|
|
698
|
+
/** If ContinuationToken was sent with the request, it is included in the response. You can use the returned ContinuationToken for pagination of the list response. */
|
|
699
|
+
continuationToken?: string;
|
|
700
|
+
/** Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value. */
|
|
701
|
+
delimiter?: string;
|
|
702
|
+
/** Encoding type used by S3 to encode object key names in the XML response. */
|
|
703
|
+
encodingType?: "url";
|
|
704
|
+
/** Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned. */
|
|
705
|
+
isTruncated?: boolean;
|
|
706
|
+
/** KeyCount is the number of keys returned with this request. KeyCount will always be less than or equal to the MaxKeys field. For example, if you ask for 50 keys, your result will include 50 keys or fewer. */
|
|
707
|
+
keyCount?: number;
|
|
708
|
+
/** Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. */
|
|
709
|
+
maxKeys?: number;
|
|
710
|
+
/** The bucket name. */
|
|
711
|
+
name?: string;
|
|
712
|
+
/** NextContinuationToken is sent when isTruncated is true, which means there are more keys in the bucket that can be listed. The next list requests to S3 can be continued with this NextContinuationToken. NextContinuationToken is obfuscated and is not a real key. */
|
|
713
|
+
nextContinuationToken?: string;
|
|
714
|
+
/** Keys that begin with the indicated prefix. */
|
|
715
|
+
prefix?: string;
|
|
716
|
+
/** If StartAfter was sent with the request, it is included in the response. */
|
|
717
|
+
startAfter?: string;
|
|
718
|
+
}
|
|
719
|
+
|
|
620
720
|
/**
|
|
621
721
|
* A configured S3 bucket instance for managing files.
|
|
622
722
|
* The instance is callable to create S3File instances and provides methods
|
|
@@ -818,6 +918,20 @@ declare module "bun" {
|
|
|
818
918
|
* @param options The options to use for the S3 client.
|
|
819
919
|
*/
|
|
820
920
|
stat(path: string, options?: S3Options): Promise<S3Stats>;
|
|
921
|
+
|
|
922
|
+
/** Returns some or all (up to 1,000) of the objects in a bucket with each request.
|
|
923
|
+
*
|
|
924
|
+
* You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
|
|
925
|
+
*/
|
|
926
|
+
list(
|
|
927
|
+
input?: S3ListObjectsOptions | null,
|
|
928
|
+
options?: Pick<S3Options, "accessKeyId" | "secretAccessKey" | "sessionToken" | "region" | "bucket" | "endpoint">,
|
|
929
|
+
): Promise<S3ListObjectsResponse>;
|
|
930
|
+
|
|
931
|
+
static list(
|
|
932
|
+
input?: S3ListObjectsOptions | null,
|
|
933
|
+
options?: Pick<S3Options, "accessKeyId" | "secretAccessKey" | "sessionToken" | "region" | "bucket" | "endpoint">,
|
|
934
|
+
): Promise<S3ListObjectsResponse>;
|
|
821
935
|
}
|
|
822
936
|
|
|
823
937
|
/**
|