aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-21[internal] Use `HiveArray` instead of bespoke memory allocator in Bun.serve()Gravatar Jarred Sumner 1-87/+12
No performance or memory usage change Just removing some duplicate code
2023-05-21oopsieGravatar Jarred Sumner 1-1/+1
2023-05-21WS send with callback (#2986)Gravatar Ciro Spaciari 1-40/+35
* WS send with callback * add opts.compress support * fmt * compress is the only option we care * add ws client options * only change ws client when using blob * fmt * fix errors * fixup * fixup * fmt
2023-05-21[Bun.serve] Support `"nodebuffer"` binaryType in `ServerWebSocket`Gravatar Jarred Sumner 2-30/+20
2023-05-21[WebSocket] Implement `"nodebuffer"` binaryTypeGravatar Jarred Sumner 2-1/+53
2023-05-21[internal] Make AbortSIgnal usage slightly saferGravatar Jarred Sumner 2-5/+10
2023-05-21Add extra flag just to be sureGravatar Jarred Sumner 1-1/+1
2023-05-21[internal] Fix potential missing callbacks in AbortSignalGravatar Jarred Sumner 1-0/+2
2023-05-21fix(tls.connect) fix SNI on tls sockets and also servername (mongodb) (#2934)Gravatar Ciro Spaciari 9-221/+676
* 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 * 💅
2023-05-21Upgrade WebKit (#2980)Gravatar Jarred Sumner 7-36/+35
* [internal] Show the file path to the calling function from JS * [internal] Make `JSC.NewFunction` more type safe * Upgrade WebKit * Finish --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-20Fixes #2976Gravatar Jarred Sumner 1-2/+2
2023-05-20[bun:test] `preload` now supports `beforeAll`, `beforeEach`, `afterAll`, ↵Gravatar Jarred Sumner 2-72/+186
`afterEach` hooks Towards #198
2023-05-20Fix missing argGravatar Jarred Sumner 1-0/+2
2023-05-20[bun:jsc] Rewrite `describe` -> `jscDescribe` to not confuse them in ↵Gravatar Jarred Sumner 1-2/+5
autocomplete
2023-05-20Bun.inspect gets a max depth of 32Gravatar Jarred Sumner 1-0/+1
2023-05-20[bun:test] Make forEachPropertyOrdered behave closer to forEachPropertyGravatar Jarred Sumner 1-4/+41
When diffing, we were missing some properties due to not calling getters and other types of properties This led to situations where Bun.deepEquals would report false and then display no difference This aligns the behavior closer to forEachProperty cc @dylan-conway please let me know if this is going to break anything
2023-05-20[console.log] Set depth limit to 8Gravatar Jarred Sumner 1-19/+65
Towards #198
2023-05-20[internal] Make `JSC.NewFunction` more type safeGravatar Jarred Sumner 3-8/+9
2023-05-20[internal] Show the file path to the calling function from JSGravatar Jarred Sumner 2-0/+2519
2023-05-20Implement `test.todo` (#2961)Gravatar Degreat 1-4/+69
* Implement `test.todo` * remove skip condition * Allow callbacks in .todo * Add descriptive comment * Log todos * Include tests in title * edit test.todo tests --------- Co-authored-by: dave caruso <me@paperdave.net>
2023-05-20[bun:test] Fix bug where indexed properties would print "undefined" in diffsGravatar Jarred Sumner 1-16/+24
2023-05-20Support test timeouts in `bun:test` (#2969)Gravatar Jarred Sumner 4-4/+83
* [bun:test] Support timeouts in `test` * make this test more resilient * :scissors: --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-19fix #2964 (#2965)Gravatar e3dio 1-0/+1
2023-05-19console.log changes (#2966)Gravatar Jarred Sumner 2-10/+10
* [breaking] Don't quote property names of identifiers in console.log * Make UTF-16 strings green * always quote for jest * update tests * Update this --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-19Fix failing node:vm testsGravatar Jarred Sumner 2-10/+22
2023-05-19[node:vm] Fix crash in syntax error in `runinThisContext`Gravatar Jarred Sumner 1-2/+2
2023-05-19[`node:vm`] Handle exceptions in `runInThisContext` and `runInContext`Gravatar Jarred Sumner 1-28/+47
2023-05-19[node:vm] Make `vm.runInThisContext` 10x fasterGravatar Jarred Sumner 5-83/+286
2023-05-18Make node:vm 12x fasterGravatar Jarred Sumner 3-10/+39
2023-05-18[node:vm] Propagate global properties defined on the new context objectGravatar Jarred Sumner 2-16/+26
2023-05-18clang-formatGravatar Jarred Sumner 1-14/+15
2023-05-18Implement `node:vm` (#2785)Gravatar Silver 7-46/+482
* feat: begin implementing node:vm Script object * refactor: clean up and address review comments * refactor: rename Script to VMModuleScript * fix: expose VMModuleScript.prototype also oops I forgot to commit the new files last time * feat(vm): Implement contexts and scripts * feat(vm): implement globalThis * feat(vm): expose node:vm module with global helper functions * refactor(vm): rename VMModuleScript to NodeVMScript * feat: implement script options * doc: add TODOs for runIn*Context options
2023-05-18Fixes #2924Gravatar Jarred Sumner 1-0/+8
2023-05-18Implement `expect().toBeCloseTo()` (#2870)Gravatar Degreat 1-1/+98
2023-05-18Fixes #2928 (#2939)Gravatar Jarred Sumner 1-1/+1
* Fixes #2928 * another case * Fix console.log with utf-16 string mismatched quotes * Fix issue with json * Even more cases --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-17Fixes https://github.com/oven-sh/bun/issues/2931Gravatar Jarred Sumner 1-1/+4
2023-05-17Support static string values in our class bindings generatorGravatar Jarred Sumner 2-2/+26
2023-05-17Make `BuildError` and `ResolveError` use C++ instead of JSC C APIGravatar Jarred Sumner 20-500/+2052
Fixes memory leak with private data never being cleared Fixes a case where a ResolveError could actually be a BuildError
2023-05-17Finish bumpingjarred/webkit-upgrade-may-17Gravatar Jarred Sumner 4-4/+34
2023-05-17Do the WebKit upgradeGravatar Jarred Sumner 14-26/+17
2023-05-16Fix segfault on passing undefined to bun.build (#2902)Gravatar dave caruso 1-0/+5
2023-05-16feat(WebSocketServer) WebSocketServer wrapper + socket.io initial support ↵Gravatar Ciro Spaciari 2-7/+862
(#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
2023-05-15More error message cleanupGravatar Jarred Sumner 1-1/+1
2023-05-15Make `bun build --compile` a little more resilient, output better errors, ↵Gravatar Jarred Sumner 2-0/+32
and clean up files
2023-05-15Fix bug with `req.url` set incorrectly (#2881)Gravatar Jarred Sumner 1-7/+7
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-14Fix `process.argv` with standaloneGravatar Jarred Sumner 1-7/+13
2023-05-14fix(spawn) add Uint8Array support for stdout (#2866)Gravatar Ciro Spaciari 1-50/+95
* add array_buffer support for stdout * fix comment * fix param name on baby_list * keep test names consistent * add more test cases
2023-05-14feat(Timer.refresh) add refresh support on Timer (#2874)Gravatar Ciro Spaciari 8-27/+272
* add refresh support on Timer * fix this return * add refresh setTimeout tests * fix tests and add setInterval test * use setCached for arguments and callback --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-05-14Single-file standalone Bun executables (#2879)Gravatar Jarred Sumner 2-0/+98
* Add LIEF * Compile LIEF * Implement support for embedding files on macOS * proof of concept * Add zstd * Implement runtime support * Move some code around * Update .gitmodules * Upgrade zig https://github.com/ziglang/zig/pull/15278 * leftover * leftover * delete dead code * Fix extname * Revert "Upgrade zig" This reverts commit dd968f30bffb6c06e34302645a3a4468c957fb4e. * Revert "leftover" This reverts commit 7664de7686276cfba431103847d35b9270433dee. * Revert "leftover" This reverts commit 498005be06a8a1747d48824310e5a020b1f90d97. * various fixes * it works! * leftover * Make `zig build` a little faster * give up on code signing support * Support Linux & macOS * Finish removing LIEF * few more * Add zstd to list of deps * make it pretty --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-12proper stub for sockets (#2868)Gravatar Ciro Spaciari 1-8/+80