aboutsummaryrefslogtreecommitdiff
path: root/src/js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-22isBinary (#5944)Gravatar Dylan Conway 2-4/+6
2023-09-22fix(runtime): exclude unevaluated module in `require.cache` (#5903)Gravatar Ai Hoshino 2-3/+3
Close: #5898
2023-09-21Implement module.parent (#5889)bun-v1.0.3Gravatar dave caruso 8-6615/+6622
* Make module.parent work * yay * oops * yay
2023-09-21disable child_process execArgv + fix crash in cli parsing (#5843)Gravatar dave caruso 2-15/+15
* stuff * stuff --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-21fix: correctly pass the encrypted(bool) property on "Socket" for express.js ↵Gravatar Liz 5-3708/+3708
(#5878) * fix: correctly pass the encrypted property on "Socket" for express.js Express relies on this for setting the requests protocol. Since this is on a dummy object, a property is simply set with the actual value. Which seams okay as a workaround. * chore: add generated files * chore: add test * refactor: set property directly rather then through a getter
2023-09-21Regenerate builtinsGravatar Jarred Sumner 3-5009/+5009
2023-09-20fix(run): interpret extensionless files as typescript (#5711)Gravatar dave caruso 2-4/+4
* test * gadsgsagdsa * add better err msg * r * oops * ok
2023-09-20fix(ffi) fix size limit for dlopen (#5516)Gravatar Ciro Spaciari 5-5013/+5013
* fix size limit * 63 * throw error * ffi.test.js * add macos tests * oops
2023-09-20feat(node:dns): implement `dns.lookupService` (#5613)Gravatar Ai Hoshino 2-5/+12
* feat(node:dns): implement dns.lookupService Close: #4347 * fix flags * add `getSockaddr` * fix sockaddr size * flaky test
2023-09-19Fixes #3712 (#5730)Gravatar Jarred Sumner 2-5/+9
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-18fix(runtime/node): Allow `new Buffer.alloc()` + Upgrade WebKit (#5699)Gravatar dave caruso 5-12/+18
* make bufferconstructor a static hash table * chore: Upgrade WebKit to 4d995edbc44062b251be638818edcd88d7d14dd7 * make it constructable now * fix comment * yippee * update CI workflows
2023-09-18feat(runtime): Implement `console.Console` (#5448)Gravatar dave caruso 5-4/+783
* prototype * asdfg * It works! * okay its done now fr * self review * ok * fix * fix test --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-18Fix HTTP listen behavior being non-compliant with node (#5689)Gravatar dave caruso 2-4/+4
* Fix HTTP listen behavior being non-compliant with node * Add error code for address in use * use SystemError --------- Co-authored-by: SuperAuguste <19855629+SuperAuguste@users.noreply.github.com>
2023-09-16webkit upgrade (#5535)Gravatar Dylan Conway 2-27/+27
* update files * Update cold-jsc-start.cpp * bump webkit
2023-09-15Update InternalModuleRegistryConstants.hGravatar Dylan Conway 1-2/+2
2023-09-15feat(runtime): add `process.binding` `uv`/`natives`/`config` + make global ↵Gravatar dave caruso 5-73/+42
object properties lazy (#5355) * binding uv * we did that * some more bindings * fix doc * fix uv * yo * static hash table nonsense <3 * huge refactor to the global object i am not ready for merge conflicts * it works part 3 * lose --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-15Fixes #5465 (#5468)Gravatar Jarred Sumner 2-10/+8
* Fixes #5465 Fixes #5465 * Update tty.js * Update InternalModuleRegistryConstants.h --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-14fix http set cookie headers (#5428)Gravatar Dylan Conway 2-15/+9
* allow multiple set-cookie values * make it work for `getHeader` * move `getHeader` to cpp * remove set-cookie check * move `setHeader` to cpp --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-09-14async-ify all node:fs functions (#5360)Gravatar Jarred Sumner 3-107/+86
* async all node:fs functions * draw the rest of the owl * LLVM & Clang 16 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-14fix(runtime): emit `node:net` connect error event vs throw (#5336)Gravatar dave caruso 2-56/+70
* fix(runtime): emit `node:net` connect error event vs throw * oops * finally * ok * we are good
2023-09-13fix(runtime): make most globals configurable/deletable, allow resuming the ↵Gravatar dave caruso 11-880/+920
console iterator (#5216) * Fix #5177 * Fix #5175 * make most globals deletable/overridable * not done * cool * a * done * fix test * oops * yippee
2023-09-13feat(nodejs): implement `os.availableParallelism` (#5109)Gravatar WingLim 2-3/+6
* feat(nodejs): implement `os.availableParallelism` * chore: do not throw error as same as node * refactor: use `navigator.hardwareConcurrency`
2023-09-13fix(runtime): require cache should not include unevaluated ESM modules. (#5233)Gravatar dave caruso 2-7/+5
2023-09-12js/node/stream.js: call write() callback when encoding is not provided (#4841)Gravatar cfal 2-3/+7
* js/node/stream.js: call write() callback when encoding is not provided * js/out/InternalModuleRegistryConstants.h: update
2023-09-11Fix punctuation (#4870)Gravatar Matthew Yu 1-2/+2
2023-09-11Make detect-libc package match the upstream api (#4910)Gravatar fehnomenal 3-14/+14
2023-09-10Support named imports for json & toml files at runtime (#4783)Gravatar Jarred Sumner 5-3/+7
* Support named exports in json imports * Support named imports for `*.json` files * Remove stale comments * Don't export arrays as non-default * Add test for default exports * Don't break webpack --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-08Fix listen() using unix socket if argument is a valid port (#4620)Gravatar Ashcon Partovi 2-4/+4
* Fix listen() using unix socket if argument is a valid port Fixes #4582 * Add test
2023-09-07Bump version to Bun 1.0.0 (#4543)Gravatar dave caruso 4-359/+338
* hi * Update Version to 1.0.0 * 2 --------- Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2023-09-07revert (#4539)Gravatar dave caruso 5-405/+47
* Revert "remove native events from streams" This reverts commit e063a47a53744a2bf5b1c2dd433698c9e37b75d6. * finish revert * remove accidental submodule * dfghj
2023-09-07Progress for Next.js (#4468)Gravatar dave caruso 18-5147/+5590
* L * ipc * asdfghjkl * dfghjk * it works! * types * patches for next.js * sdfghj * wsdfgn,./ * this * yolo * okay loser * asdfghjk * add some more APIs * MESS * sdfghjkl * remove native events from streams * stuff * remove lazy(primordials) test * debugging * okay * less fake extensions object * fix `Buffer.toString()` args logic * fix deserialize * make tests work * add test for `Buffer.toString` args * Update server.zig * remove test * update test * Update spawn-streaming-stdin.test.ts * fix linux build * Update fs.test.ts * cli message improvements * dfshaj * Fix fs.watch bug maybe? * remove --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-09-06feat(fetch) rejectUnauthorized and checkServerIdentity (#4514)Gravatar Ciro Spaciari 6-5020/+5020
* enable root certs on fetch * rebase * fix lookup * some fixes and improvements * fmt * more fixes * more fixes * check detached onHandshake * fix promise case * fix cert non-Native * add fetch tls tests * more one test
2023-09-06fix(runtime): fix `events.once` not working (#4520)Gravatar dave caruso 2-5/+6
2023-09-05Align `process.nextTick` execution order with Node (#4409)Gravatar Jarred Sumner 3-0/+221
* Align `process.nextTick` execution order with Node * some tests * formatting * fixups * fix the test failures * simplify the logic here * push it up --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net>
2023-09-05feat(runtime): Implement `fs.watchFile` (#4467)Gravatar dave caruso 2-4/+92
* really lame prototype * uses threads but badly * it works i guess * unwatchFile but lame * it works * test * a * aomitcs * fix unwatching race condition * use hasPendingActivity and GC stuff better * test * revert this
2023-09-05fix(node:net): emit close event on connection error (#4336)Gravatar dave caruso 2-8/+6
* emit close event on connection error * re-review * add test
2023-09-05minor rebuild diffs (#4486)Gravatar Alex Lam S.L 4-4999/+4999
2023-09-04fix(HTMLRewriter) buffer response before transform (#4418)Gravatar Ciro Spaciari 4-4999/+4999
* html rewriter response buffering * pipe the data when marked as used * fix empty response * add some fetch tests * deinit parent stream * fix decompression * keep byte_reader alive * update builds * remove nonsense * was not nonsense after all * protect tmp ret value from GC, fix readable strong ref deinit/init * fmt * if we detach the stream we cannot update the fetch stream * detach checking source * more tests, progress with javascript and Direct sink * drop support for pure readable stream for now * more fixes --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-08-30feat(node:fs): add `cp`/`cpSync`/`promises.cp` + async `copyFile` (#4340)Gravatar dave caruso 15-280/+1106
* half working disaster code * this * async copyFile * . * its failing symlink tests * asdfg * asdf * hmm * okay i think ti works * small edits * fix test on linux * i hate atomics / atomics hate me back <3 * add a message in the builtins bundler that 0.8 is needed. it breaks on older versions lol. * fixed * rebase
2023-08-30minor rebuild diffs (#4416)Gravatar Alex Lam S.L 3-4994/+4994
2023-08-30fix(http/https) disable decompress on http/https client (#4399)Gravatar Ciro Spaciari 5-4997/+5000
* disable decompress on http/https module * make js again
2023-08-30reset signal handlers in Bun.spawn (#4405)Gravatar Jarred Sumner 2-6/+11
* see if this fixes it * We don't need this * Remove extra flag --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-29More support for DAP (#4380)Gravatar Ashcon Partovi 2-286/+300
* Fix reconnect with --watch * Support setVariable * Support setExpression * Support watch variables * Conditional and hit breakpoints * Support exceptionInfo * Support goto and gotoTargets * Support completions * Support both a URL and UNIX inspector at the same time * Fix url * WIP, add timeouts to figure out issue * Fix messages being dropped from debugger.ts * Progress * Fix breakpoints and ref-event-loop * More fixes * Fix exit * Make hovers better * Fix --hot
2023-08-29fix(node-fetch): use stream.Readable instead of web streams (#4394)Gravatar dave caruso 6-73/+106
* fix blobFrom * fix(node-fetch): use stream.Readable instead of web streams * uncomment * comment why
2023-08-29parse unix socket path param in `http.server` (#4390)Gravatar Ai Hoshino 2-3/+8
2023-08-29emit open and call close callback (#4384)Gravatar Dylan Conway 3-10/+29
2023-08-28feat(node:dns): implement `dns.reverse`. (#4332)Gravatar Ai Hoshino 2-6/+35
* feat(node:dns): implement `dns.reverse`. Close: #4299 * fix dns reverse for ipv6 --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-08-28use `options.fd` if provided for `fs.Read/WriteStream` (#4378)Gravatar Dylan Conway 3-40/+44
* use `options.fd` over path * tests * fix `@clack/prompts` * == null
2023-08-26More improvements to debugger support (#4345)Gravatar Ashcon Partovi 2-37/+79
* More fixes for dap * More changes * More changes 2 * More fixes * Fix debugger.ts * Bun Terminal
2023-08-24Fix(node:http): fix URL formatting when using a proxy. (#4297)Gravatar Ai Hoshino 2-17/+23
Close: #4295