Jarred Sumner
46e34a3fa9
Re-add missing global
2022-12-04 02:28:25 -08:00
Jarred Sumner
4281a68a2b
content-range is inclusive
2022-12-04 01:24:52 -08:00
Jarred Sumner
0617896d70
[Bun.serve] Implement Content-Range support with Bun.file()
2022-12-04 00:55:05 -08:00
Jarred Sumner
1c3cb22d1f
[may revert later] Coerce Infinity to max int 64, -Infinity & NaN to min int64
2022-12-04 00:53:52 -08:00
Jarred Sumner
de9a2b9fe5
[fetch] Fix bug where .arrayBuffer() on an empty Response body returned a Uint8Array instead of an ArrayBuffer
2022-12-03 23:56:40 -08:00
Jarred Sumner
201cbb20e4
Don't invalidate previous file descriptro to avoid tripping assertion
2022-12-03 08:26:53 -08:00
Jarred Sumner
bdc43c1696
process.stdout and process.stderr
2022-12-03 08:26:53 -08:00
Jarred Sumner
bc028168a8
simdutf ascii validation is about 20% faster on arm64 than our zig simd @Vector version
2022-12-03 08:26:53 -08:00
Dylan Conway
0a30bf0212
make sure to not use incomplete characters ( #1575 )
2022-12-03 02:59:17 -08:00
Jarred Sumner
1b7b37232e
Run promise before callback
2022-12-02 22:30:04 -08:00
Jarred Sumner
fe4f39fd17
Add AbortSignal.timeout
2022-12-02 20:48:57 -08:00
Dylan Conway
9cc03cd71a
matchers for less than and greater than ( #1573 )
...
* toBeGreaterThan with tests
* toBeGreaterThanOrEqual and tests
* toBeLessThan and toBeLessThanOrEqual with tests
* expect types
* switch expressions
2022-12-02 20:35:13 -08:00
Jarred Sumner
d9f9fc975b
Propagate reason in AbortSignal and reuse in ReadableStream.pipeTo
...
Similar to https://github.com/WebKit/WebKit/pull/7013
2022-12-02 20:15:50 -08:00
Jarred Sumner
bdbc0f23e7
Update TransformStream options getters to check for undefined
...
This is essentially copied from https://github.com/WebKit/WebKit/pull/7021
2022-12-02 20:00:27 -08:00
Jarred Sumner
43f2a8eb85
Add some code I forgot to commit
2022-12-02 19:35:11 -08:00
Jarred Sumner
c72629d88a
Make cloning headers object faster
2022-12-02 19:34:43 -08:00
Jarred Sumner
33cf491fea
Add a userland way to hide stack frames
2022-12-02 19:33:59 -08:00
Jarred Sumner
2f917f7030
Make constructing headers from an existing headears faster
2022-12-02 19:33:45 -08:00
Jarred Sumner
207282862e
Throw if passing a header not named "set-cookie" to getAll
2022-12-02 19:33:36 -08:00
Jarred Sumner
3c054253e1
Remove getSetCookie
2022-12-02 19:33:22 -08:00
Jarred Sumner
2c0fd28e72
[node:event] Add captureRejectionSymbol
2022-12-02 09:05:11 -08:00
Derrick Farris
b8586b33da
feat(process): add process.{stdin, stdout, stderr} support ( #1495 )
...
* fix(stream): get Duplex working
* feat(process): add stdin,stdout,stderr in a semi-broken state (pipes??)
* test(NodeTestHelpers): fix test names
* test(NodeTestHelpers): add test for createDoneDotAll done called w error
* test(NodeTestHelpers): remove stray console.log
* fix(stream): fix bug in Duplex, Readable
* test(process.stdio): rename test
* fix(process.stdio): change onData listener to onReadable
* refactor(streams): add file-wide debug fn, destructure opts
* fix(child_process): check isCallable on promise
* fix: get stdio streams mostly working (mostly)
* fix(child_process): wait until stream is drained before calling end?
* fix(child_process): change to result?.then
* debug(child_process,streams): add EE id tracking, add shim for stdio after handle is dead
* test(child_process): fix double pipe test, temp fix for ChildProcess.kill() return val
* fix(child_process): remove immediate emit of exit on kill
* debug(streams): add more debug log
* debug(streams): add more debug logs part 2
* feat(streams,fs): add NativeWritable, adapt fs.WriteStream and fs.ReadStream to native
2022-12-02 08:25:13 -08:00
Jarred Sumner
d84f79bcc1
[fetch] Implement Headers#getAll and Headers#getSetCookie()
...
This matches Deno's behavior (get() combines, iterator preserves the order, set and append combine), but implements both the Cloudflare Workers `getAll()` and the potential standard `getSetCookie` function. The rationale for choosing both is to better support libraries which check for `getAll` and also because `getSetCookie` seems a little confusing (names are hard)
This also makes `.toJSON` and JSON.stringify return an array for `Set-Cookie`
2022-12-02 07:42:44 -08:00
Jarred Sumner
8eddfc61a8
Add generic way to block on a promise
2022-12-02 01:56:12 -08:00
Jarred Sumner
e9eb88355b
Close stdin earlier
2022-12-02 00:25:30 -08:00
Jarred Sumner
851b8acb76
Fix incorrect panic in spawnSync
2022-12-02 00:05:33 -08:00
Jarred Sumner
7a158e68ae
Fix crash when macros return a Promise
2022-12-01 23:46:18 -08:00
Jarred Sumner
cb36b4d1ab
Fix double free in .json() and optimize UTF16 -> json slightly
2022-12-01 23:43:49 -08:00
Jarred Sumner
2621fbf206
Remove file blob caching
2022-12-01 23:42:57 -08:00
Jarred Sumner
f84f77d1ed
[streams] Handle empty state
2022-12-01 23:28:42 -08:00
Jarred Sumner
7b70ed52fa
[bun bun] Fix incorrect package.hash
2022-12-01 21:37:25 -08:00
Jarred Sumner
8cf1707cd3
[bun bun] Fix crash in canary
2022-12-01 21:37:09 -08:00
Jarred Sumner
9f4d7690ac
[fetch] Treat 302 like 303
2022-12-01 21:15:34 -08:00
Jarred Sumner
5854d39525
[fetch] Implement redirect: "manual"
2022-12-01 21:09:43 -08:00
Jarred Sumner
b4e6ca0462
ComptimeStringMap is faster than ExactSizeMatcher
2022-12-01 20:51:35 -08:00
Jarred Sumner
f408749182
Fix timers keeping process alive unnecessarily
2022-12-01 20:46:54 -08:00
Dylan Conway
92da72beb0
bun test toStrictEqual ( #1568 )
...
* toStrictEqual and bug fix in deepEqual
* rebase Remove some dead bindings code
* remove debugging test
* canGetIndexQuickly for array holes
* isStrict template
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-01 19:36:47 -08:00
Jarred Sumner
a896d6c46c
[bun:sqlite] ~15% perf improvement to all() and get()
2022-12-01 19:34:02 -08:00
Jarred Sumner
4eed310a45
3x faster TextEncoder.prototype.encodeInto
...
thanks to @Constellation for the tip
2022-12-01 18:51:16 -08:00
Jarred Sumner
03490afdb3
Fix crash in test runner with gc mode
2022-12-01 18:40:41 -08:00
Jarred Sumner
e1e5f8c43b
Include size of ArrayBuffer and others in GC timer scheduling
2022-12-01 02:36:51 -08:00
Jarred Sumner
e0503faec7
Increase sensitivity of GC timers
2022-12-01 02:36:18 -08:00
Jarred Sumner
bddf523ac9
Reduce memory usage in Bun.serve() by up to 3x ( #1569 )
...
* Update WebKit
* Use 5x less memory in Bun.serve()
* Update Dockerfile.devcontainer
* Update async-overhead.mjs
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-01 02:34:15 -08:00
Dylan Conway
1506a25198
formatting and remove comment
2022-11-30 16:40:54 -08:00
Jarred Sumner
3cb462a3e6
Fix console.log regression with emoji
2022-11-30 07:28:48 -08:00
Jarred Sumner
f8b87e3ee2
Redirect imports to "readable-stream" -> "node:stream"
2022-11-30 07:21:27 -08:00
Jarred Sumner
e6f055e9fb
Accidentally deleted prompt as a result of the process.env changes
2022-11-30 06:16:59 -08:00
Jarred Sumner
f999bdca26
✂️
2022-11-29 23:56:52 -08:00
Jarred Sumner
e75ce84c37
Remove some dead bindings code
2022-11-29 23:49:11 -08:00
Jarred Sumner
b631ea7d72
import everything from "bun" where possible
2022-11-29 02:42:56 -08:00