aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-05-24[server.fetch] call when using Request object (#3051)Gravatar Ciro Spaciari 1-13/+9
* patch server.fetch * add tests and fix types
2023-05-24[bun:FileSystemRouter] add more validations on parameters (#3053)Gravatar Ciro Spaciari 1-2/+28
* add validations and allow relative path on dir * remove unneed things * add origin/dir validation tests * remove workaround * add back relative path resolution
2023-05-24Add commentGravatar Jarred Sumner 1-0/+4
2023-05-24Remove that fieldGravatar Jarred Sumner 1-1/+0
2023-05-24Fix string checkGravatar Jarred Sumner 1-1/+2
2023-05-24Implement `require.cache` (#3045)Gravatar Jarred Sumner 6-1/+148
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-23Implement `bun test --timeout` (#3040)Gravatar Ashcon Partovi 1-6/+3
You can change the default per-test timeout in `bun test`: > bun test --timeout 10 The default timeout is 5000.
2023-05-23[bun:test] Fix async/done-based test.todo (#3015)Gravatar Jarred Sumner 1-6/+27
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-23Support setting a timezone with `process.env.TZ` and `Bun.env.TZ` (#3018)Gravatar Jarred Sumner 5-0/+124
* Support setting a timezone via `process.env.TZ` * Implement `setTimeZone` in `bun:jsc` module * [breaking] `bun:test` now defaults to `Etc/UTC` timezone --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-22fix marking requestCert (#3012)Gravatar Ciro Spaciari 1-3/+12
2023-05-22[node:http] Fix return type for `getHeader()` (#3007)Gravatar Jarred Sumner 1-6/+11
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-22Write out builtins with TypeScript + Minify them (#2999)Gravatar dave caruso 120-24978/+16307
* start work drafting how builtins will work * work on ts builtin * builtins stuff so far * builtins * done for today * continue work * working on it * bindings so far * well, it builds. doesnt run * IT RUNS * still lots of ts errors but it is functional * sloppy mode
2023-05-22443 should default to https when no protocol is informed (#3008)Gravatar Ciro Spaciari 1-1/+10
2023-05-22[node:buffer] Add missing `inspect` functionbun-v0.6.3Gravatar Jarred Sumner 4-0/+30
cc @paperdave
2023-05-22[node:vm] Accept undefined in `createContext`Gravatar Jarred Sumner 1-0/+5
2023-05-22fixup (#3001)Gravatar Ciro Spaciari 1-8/+7
2023-05-22[breaking] ServerWebSocket.publish no longer publishes to self by defaultGravatar Jarred Sumner 1-1/+1
This changes `publishToSelf` to be `false` by default instead of `true`. This is a breaking change because it means that `ws.publish("foo", "bar")` will exclude `ws` from the list of websockets to broadcast. We are making this change because many people asked for this and were confused by the status quo - that `w.publish` publishes to self.
2023-05-22[ServerWebSocket] `binaryType` now defaults to `"nodebuffer"`Gravatar Jarred Sumner 1-5/+5
Previously, this defaulted to "uint8array", so this shouldn't be a breaking change unless you make use of `.slice()` in which case it will now be a reference to the same ArrayBuffer rather than a clone. The rationale for this change is most usages of Uint8Array on the server need a little more than just the bytes. Many npm packages expect Buffer rather than Uint8Array. Directly returning it for binary websocket messages is faster than creating another one.
2023-05-22Fix memory leak in `fetch(url)` (#2989)Gravatar Jarred Sumner 1-11/+21
* Fix memory leak in `fetch(url)` * Bump those numbers up --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-22Update WebKitGravatar Jarred Sumner 1-0/+0
2023-05-21[internal] Even more loggingGravatar Jarred Sumner 1-3/+5
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