Age | Commit message (Collapse) | Author | Files | Lines |
|
* move all exports.js into src/js
* finalize the sort of this
* and it works
* add test.ts to gitignore
* okay
* convert some to ts just to show
* finish up
* fixup makefile
* minify syntax in dev
* finish rebase
* dont minify all modules
* merge
* finish rebase merge
* flaky test that hangs
|
|
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
|
|
|
|
* fixes SNI on tls sockets and also servername
* π
* π
* add support for https and wss
* fix bun types
* support Bun.file on ca, key and cert
* π
* add setTimeout (makes fastify run)
* fix httpVersion
* fix WebSocketServer and add listen event
* fix ws exports and http listening
* fix default import
* bump uws
* add nodebuffer compatibility
* fix drain and allow more passing tests to run
* fix enqueud messages
* default to arraybuffer
* fix constructor binaryType
* fmt
* fixup
* skip some tests
* skip more
* skip fault tests
* reuse encoder instance
* fix handshake WS Client
* temporary revert handshake fix
* fix handshake
* disable all socket.io test temp
* fixup
* add back socket.io tests
* use node_fs to read cert, ca and key on server.zig
* throw the error returned by NodeFS
* π
|
|
|
|
(#2880)
* WebSocketServer wrapper + socket.io initial support
* fix up backpressure
* fix up backpressure
* fix http address
* add socket.io tests
* add closing tests
* add connection state recovery tests for socket.io
* add handshake test
* add middeware tests for socket.io
* added socket.io socket middleware tests
* add more socket.io test comment/skip hang tests
* add pending package for tests
* add server attachment servers for socket.io
* add utility-methods tests for socket.io
* rename
* rename
* add messaging-many socket.io tests
* add namespaces tests to socket.io
* skip some tests
* fmt
* add packages to general package.json
|
|
|
|
|
|
|
|
|
|
`closeAllConnections`
|
|
|
|
This reverts commit 8b6dd0c7e1c78a37da693dc216b18f32caa61927.
|
|
|
|
|
|
* Revive node:http tests
* Fix a couple bugs in node:http
* possibly breaking: use `"browser"` exports condition last
* Make URL validation error better
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
|
|
* fix https default port on http.request
* Update http.exports.js
|
|
|
|
* Document node:http
* Fix test
* Fix default
* Fix default
|
|
* fix: http url add search query
* fix: add tests
|
|
|
|
|
|
* fix(node:http/https): fix passing `URL` objs to `http.request`(#2253)
* fix(node:http): hoist debug env var
* fix(node:http): make body `undefined` when falsy
|
|
* use abort signal on http.ClientRequest
* fix edge case and add test
|
|
* add signal on http.Server.listen
* actual call close instead of just stopping the server
|
|
|
|
* fix(node-test-helpers): make sure to call done with any Errors thrown from wrapped fn
* feat(node:http): add http.request, patch some missing apis for IncomingRequest, etc.
* fix(node:http): FakeSocket -> Socket
* refactor(node:http): only save type from IncomingMessage.options for now
* fix(node:http): remove unnecessary check for UInt8Array
* perf(node:http): globalThis.fetch -> var fetch = Bun.fetch
* todo(node:http): add notes about handling abort/timeout w/ AbortSignal
* refactor(node:http): standardize on FakeSocket and this.#fakeSocket
* fix(node:http): fix headers getter
* fix(node:http): remove _headers
* perf(node:http): make http headers lazy
* fix(node:http): return bool from keepSocketAlive
|
|
|
|
|
|
|
|
|
|
* @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
* :camera:
* 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>
|
|
|
|
* Add bun-types to packages
* Improve typing
* Fix types in tests
* Fix dts tests
* Run formatter
* Fix all type errors
* Add strict mode, fix type errors
* Add ffi changes
* Move workflows to root
* Add workflows
* Remove labeler
* Add child_process types
* Fix synthetic defaults issue
* Remove docs
* Move scripts
* Run prettier
* Include examples in typechecking
* captureStackTrace types
* moved captureStackTrace types to globals
* Address reviews
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
|
|
|
|
|
|
|
|
Before:
```fish
β― oha http://localhost:3000 -z 2s -c 20
Summary:
Success rate: 1.0000
Total: 2.0006 secs
Slowest: 0.0095 secs
Fastest: 0.0000 secs
Average: 0.0003 secs
Requests/sec: 69521.0420
```
After:
```
β― oha http://localhost:3000 -z 2s -c 20
Summary:
Success rate: 1.0000
Total: 2.0005 secs
Slowest: 0.0063 secs
Fastest: 0.0000 secs
Average: 0.0002 secs
Requests/sec: 109119.8614
```
Code
```
const http = require("http");
const hostname = "127.0.0.1";
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader("Content-Type", "text/plain");
res.end("Hello World!");
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
```
|
|
|
|
* node:http polyfill
* remove @ts-ignore
* reuse emitter instance
* requested changes
* cleanup
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
|