Jarred Sumner
490814aa35
Update serve.test.ts
2023-01-12 19:38:27 -08:00
Jarred Sumner
ffa8913e54
Update tcp-server.test.ts
2023-01-12 19:38:27 -08:00
Jarred Sumner
034dd3d03d
make the test more resilient
2023-01-12 16:06:28 -08:00
Jarred Sumner
0384d3c558
less flaky
2023-01-12 15:37:03 -08:00
Jarred Sumner
38f9bb96df
use .skip() for failing test
2023-01-12 13:20:10 -08:00
Jarred Sumner
35d0cf910d
Uncomment flaky test
2023-01-12 13:11:05 -08:00
Jarred Sumner
bbd4504954
Add a couple more tests for errors with Bun.file()
2023-01-12 13:11:05 -08:00
Jarred Sumner
90c395bdac
Update inspect.test.js
2023-01-12 13:11:05 -08:00
Ethan Burrell
76e6a178e3
fix(bun-test): test title in results ( #1753 )
...
* fix(bun-test): test title in results
* missed case
* clean up import
* respond to reviews
2023-01-12 12:49:36 -08:00
Jarred Sumner
bb5efb67ab
Update socket.test.ts
2023-01-12 12:08:11 -08:00
Jarred Sumner
edf9757650
Fixes #1772
2023-01-12 10:14:35 -08:00
Jarred Sumner
e65def0f82
Remove extra wrapper
2023-01-11 20:21:41 -08:00
Jarred SUmner
1c20e05d70
[Bun.serve] Introduce publishToSelf boolean on websocket: {} config object
2023-01-11 17:14:07 -08:00
Jarred Sumner
bcabf31121
Make Buffer mockable
2023-01-10 18:49:26 -08:00
Malcolm Still
f1e6ea2254
Implement Buffer swap16, swap32, swap64 ( #1659 )
...
* Implement Buffer swap16, swap32, swap64
* Initial incorporation of feedback
- Use constexpr
- Clean up the indexing
- Check for detached
- Use suggested text for exception text
2023-01-10 18:43:58 -08:00
Jarred Sumner
3517ce8e23
Add two tests for fs/promises
2023-01-10 17:16:16 -08:00
Jarred Sumner
0e7f69f179
Update child_process-node.test.js
2023-01-09 10:37:02 -08:00
Jarred Sumner
7a92bf87c8
Add very simple dns test
2023-01-09 10:12:46 -08:00
Jarred Sumner
2392e48e9d
Fixes https://github.com/oven-sh/bun/issues/1533
2023-01-09 03:41:03 -08:00
Jarred Sumner
3386afc0bc
Add test for Bun.listen throwing
2023-01-09 03:26:16 -08:00
Jarred Sumner
cb75b4799f
Add test for expect().toThrow
2023-01-09 00:22:54 -08:00
Jarred Sumner
83a5c9f3da
[internal] Fix checking for Error object
2023-01-08 07:37:51 -08:00
Derrick Farris
94409770de
feat(node:readline): add node:readline and node:readline/promises ( #1738 )
...
* feat(readline): WIP: add readline
* test(helpers): add deepStrictEqual helper
* feat(readline): add readline & readline/promises to loader
* fix(node:events): emit newListener on new listener added
* feat(readline): finish readline cb interface, add tests
* fix(stream): fix Transform.end()
* fix(node-test-helpers): correct throws behavior, improve how all asserts work
* feat(readline/promises): add readline/promises
* feat(assert): add assert.match
* test(readline): uncomment more tests
* fix(readline): MaxCeil -> MathCeil 🤦
* fix(readline): export promises from node:readline
* fix(readline): temp fix for circular dependency
* cleanup(readline): remove console.log
* fix(readline): change true -> 0 for CommonJS export
* perf(readline): micro-optimizations with some getters
* perf(readline): lazy load isWritable
* cleanup(readline): rename debug flag env var to BUN_JS_DEBUG
2023-01-08 01:49:49 -08:00
Jarred Sumner
9972e553a0
Update process.versions
2023-01-08 00:50:38 -08:00
Jarred Sumner
4eb3067ef5
Workaround macOS issue
2023-01-07 23:58:25 -08:00
Jarred Sumner
fadd1c0152
[Bun.connect] Fix bug where connect() Promise wouldn't reject on a connection error
2023-01-07 23:45:43 -08:00
Jarred Sumner
87983464d8
Implement DNS module ( #1691 )
...
* Boilerplate for DNS stuff
* Add c-ares
* lookup
* make
* Implement dns.lookup
* Create c-ares
* wip
* normalize
* repro
* Revert "repro"
This reverts commit 8b93e0c295b335b8882a9601da47720348549beb.
* Implement macOS `getaddrinfo_async_start`
* embiggen
* Update string_immutable.zig
* Update Makefile
* alright
* Update .gitignore
* Add types
* more ccache
* Update Dockerfile
* Update Dockerfile
* Update Dockerfile
* Update bun.d.ts
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-07 07:09:48 -08:00
alexlamsl
d5565ab2cd
test BufferList against surrogate pairs
2023-01-07 12:39:32 +02:00
Alex Lam S.L
e2ed31b7e7
lazily create buffer/string slices ( #1735 )
2023-01-05 19:43:33 -08:00
Jarred Sumner
a7d9f16107
Report unhandled promise rejection on exit and make exit code 1 instead of 0 ( #1734 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-05 16:23:45 -08:00
Alex Lam S.L
80736043d6
implement expect().toThrow() ( #1727 )
...
- fix bugs in `JSBufferList`
- add tests
2023-01-04 22:37:14 -08:00
Jarred Sumner
4a328609b9
10x faster new Buffer ( #1717 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-04 03:30:15 -08:00
Alex Lam S.L
237bcdf99f
[streams] speed up Readable in some cases ( #1708 )
...
If `encoding` is set, no `Buffer`s would be exposed thus `Uint8Array` can be used directly.
- fix data corruption in `BufferList.concat()`
- fix segfaults in `BufferList.join()`
2023-01-03 16:08:28 -08:00
Alex Lam S.L
7edaf736a2
[socket] handle connectError ( #1705 )
...
assorted clean-ups & fixes
2023-01-02 23:06:45 -08:00
Alex Lam S.L
18e143ae7b
fix double resolve() in test ( #1707 )
...
also clean up `reject()` values
2023-01-02 20:19:44 -08:00
Alex Lam S.L
983b747020
implement net.Socket ( #1701 )
...
- support TCP sockets for now, i.e. no IPC
- extra features like keep-alive, no-delay etc. are absent due to limitations of uSockets
- fix `jest` to treat `done(nullish)` as success
2023-01-02 14:55:01 -08:00
Alex Lam S.L
04b00229cf
fix lingering process by dead sockets ( #1700 )
...
`Bun.listen()` and `Bun.connect()` would create sockets that under certain conditions with calls to `.end()` or `.stop`, prevents the process from exiting gracefully.
2023-01-02 02:24:23 -08:00
Jarred Sumner
96438a4d58
test crypto.randomBytes returns a Buffer
2023-01-01 12:04:49 -08:00
Jarred Sumner
f651f74f9d
Add a test for empty chunks
2023-01-01 01:33:13 -08:00
Alex Lam S.L
9b3db96308
[jest] fix and improve hooks ( #1689 )
...
- wait for async hooks to complete before running tests
- add support for `done(err)` callbacks in hooks
fixes #1688
2022-12-31 03:14:23 -08:00
Jarred Sumner
fc6c4bbefb
Upgrade WebKit
2022-12-30 06:33:22 -08:00
Jarred Sumner
85eda20587
Introduce Bun.CryptoHasher
2022-12-29 06:05:43 -08:00
Jarred Sumner
940ecd05a8
[node] Implement process.uptime and process.umask
2022-12-29 06:05:43 -08:00
Jarred Sumner
0504bb8984
Expose the rest of RIPEMD160
2022-12-28 22:24:37 -08:00
Jarred Sumner
8e9af05d6a
[WebSocket] Allow http: and https: protocols
...
See https://github.com/whatwg/websockets/pull/37
2022-12-28 18:41:07 -08:00
Jarred Sumner
ba0b5baee4
[WebSocket] Implement headers support
...
Fixes https://github.com/oven-sh/bun/issues/1676
2022-12-28 18:39:19 -08:00
Jarred Sumner
3d60b870ee
Fix ReadableStream.pipeTo
2022-12-28 03:43:39 -08:00
Alex Lam S.L
092b86321c
log object string correctly ( #1674 )
...
use `Symbol.toStringTag` of the object or that of its `.prototype`
fixes #1584
2022-12-28 01:21:21 -08:00
Jarred Sumner
c0dd284136
Upgrade to latest Zig ( #1610 )
...
* @min and @max
* builtins and some trivial ones
* Most of them
* more
* more!
* More Progress
* wip
* Update tagged_pointer.zig
* Update http_client_async.zig
* Most of the iterable dir changes
* alright
* Remove usages of deprecated formatters
* 📷
* fmt
* Update shimmer.zig
* wip
* wip
* wip
* progress
* more
* Latest
* stuck on error
* latest
* workaround stage2
* wip
* Update string_immutable.zig
* wip
* Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings
* Fix build errors
* Fixup most of the test failures
* Fix `make headers`
* Fix "outside package path" error
* Fixup aligned alloc
* Add missing file
* linux
* More linux fixes
* use latest peechy
* Fix transpiler test failure
* Forgot about these
* Fixup test failure
* Update node-timers.test.ts
* [node:htt] Fix `undefined is not an object` error
Fixes https://github.com/oven-sh/bun/issues/1618
* Update http.exports.js
* Make this test less flaky
* fix hashes
* Fix hex formatting and zls issues
* Download zig version
* Update Dockerfile
* Update Dockerfile
* Update uws
* Update Dockerfile
* Set llvm version
* Update README.md
* Update uws
* Update Dockerfile
* Update io_linux.zig
* Update bun.zig
* Log output
* workaround strange @cInclude error
* Make ffi tests better
* Don't use cImport
* Update c.zig
* Update c-bindings.cpp
* call setOutputDir
* Update Dockerfile
* Use a longer name
* latest
* Update serve.test.ts
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Veikka Tuominen <git@vexu.eu >
2022-12-28 00:51:22 -08:00
Alex Lam S.L
f78f423d0b
emit 206 Partial Content only for partial response ( #1670 )
...
fixes #1668
2022-12-27 16:34:33 -08:00