New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bun-types

Package Overview
Dependencies
Maintainers
0
Versions
842
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bun-types - npm Package Compare versions

Comparing version

to
1.2.1-canary.20250126T140515

2

docs/api/fetch.md

@@ -198,3 +198,3 @@ Bun implements the WHATWG `fetch` standard, with some extensions to meet the needs of server-side JavaScript.

[fetch] > Connection: keep-alive
[fetch] > User-Agent: Bun/bun-v1.2.0
[fetch] > User-Agent: Bun/1.2.1-canary.20250126T140515
[fetch] > Accept: */*

@@ -201,0 +201,0 @@ [fetch] > Host: example.com

@@ -174,2 +174,4 @@ Production servers often read, upload, and write files to S3-compatible object storage services instead of the local filesystem. Historically, that means local filesystem APIs you use in development can't be used in production. When you use Bun, things are different.

The default behaviour is to generate a `GET` URL that expires in 24 hours. Bun attempts to infer the content type from the file extension. If inference is not possible, it will default to `application/octet-stream`.
```ts

@@ -179,5 +181,16 @@ import { s3 } from "bun";

// Generate a presigned URL that expires in 24 hours (default)
const url = s3.presign("my-file.txt", {
const download = s3.presign("my-file.txt"); // GET, text/plain, expires in 24 hours
const upload = s3.presign("my-file", {
expiresIn: 3600, // 1 hour
method: 'PUT',
type: 'application/json', // No extension for inferring, so we can specify the content type to be JSON
});
// You can call .presign() if on a file reference, but avoid doing so
// unless you already have a reference (to avoid memory usage).
const myFile = s3.file("my-file.txt");
const presignedFile = myFile.presign({
expiresIn: 3600, // 1 hour
});
```

@@ -184,0 +197,0 @@

@@ -113,3 +113,3 @@ Spawn child processes with `Bun.spawn` or `Bun.spawnSync`.

const text = await new Response(proc.stdout).text();
console.log(text); // => "bun-v1.2.0"
console.log(text); // => "1.2.1-canary.20250126T140515"
```

@@ -116,0 +116,0 @@

@@ -10,3 +10,3 @@ Use `bun publish` to publish a package to the npm registry.

## Output
bun publish vbun-v1.2.0 (ca7428e9)
bun publish v1.2.1-canary.20250126T140515 (ca7428e9)

@@ -13,0 +13,0 @@ packed 203B package.json

@@ -127,7 +127,7 @@ ---

```sh
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/bun-v1.2.0" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}"
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.1-canary.20250126T140515" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}"
[fetch] > HTTP/1.1 POST https://example.com/
[fetch] > content-type: application/json
[fetch] > Connection: keep-alive
[fetch] > User-Agent: Bun/bun-v1.2.0
[fetch] > User-Agent: Bun/1.2.1-canary.20250126T140515
[fetch] > Accept: */*

@@ -174,3 +174,3 @@ [fetch] > Host: example.com

[fetch] > Connection: keep-alive
[fetch] > User-Agent: Bun/bun-v1.2.0
[fetch] > User-Agent: Bun/1.2.1-canary.20250126T140515
[fetch] > Accept: */*

@@ -177,0 +177,0 @@ [fetch] > Host: example.com

@@ -58,3 +58,3 @@ Bun's test runner plays well with existing component and DOM testing libraries, including React Testing Library and [`happy-dom`](https://github.com/capricorn86/happy-dom).

$ bun test
bun test vbun-v1.2.0
bun test v1.2.1-canary.20250126T140515

@@ -61,0 +61,0 @@ dom.test.ts:

{
"version": "1.2.0",
"version": "1.2.1-canary.20250126T140515",
"name": "bun-types",

@@ -4,0 +4,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display