aboutsummaryrefslogtreecommitdiff
path: root/src/js/node (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-30feat(node:fs): add `cp`/`cpSync`/`promises.cp` + async `copyFile` (#4340)Gravatar dave caruso 2-11/+82
* 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-30fix(http/https) disable decompress on http/https client (#4399)Gravatar Ciro Spaciari 1-0/+3
* disable decompress on http/https module * make js again
2023-08-30reset signal handlers in Bun.spawn (#4405)Gravatar Jarred Sumner 1-3/+8
* 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-29fix(node-fetch): use stream.Readable instead of web streams (#4394)Gravatar dave caruso 1-1/+1
* 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 1-0/+5
2023-08-29emit open and call close callback (#4384)Gravatar Dylan Conway 2-4/+23
2023-08-28feat(node:dns): implement `dns.reverse`. (#4332)Gravatar Ai Hoshino 1-3/+32
* 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 2-34/+38
* use `options.fd` over path * tests * fix `@clack/prompts` * == null
2023-08-24Fix(node:http): fix URL formatting when using a proxy. (#4297)Gravatar Ai Hoshino 1-14/+20
Close: #4295
2023-08-23Bunch of streams fixes (#4251)Gravatar Jarred Sumner 1-2/+5
* Update WebKit * Don't do async hooks things when async hooks are not enabled * Smarter scheduling of event loop tasks with the http server * less exciting approach * Bump WebKit * Another approach * Fix body-stream tests * Fixes #1886 * Fix UAF in fetch body streaming * Missing from commit * Fix leak * Fix the other leak * Fix test * Fix crash * missing duperef * Make this code clearer * Ignore empty chunks * Fixes #3969 * Delete flaky test * Update bun-linux-build.yml * Fix memory issue * fix result body, and .done status before the last callback, dont touch headers after sent once * refactor HTTPClientResult * less flasky corrupted test * oops * fix mutex invalid state * fix onProgressUpdate deinit/unlock * fix onProgressUpdate deinit/unlock * oops * remove verbose * fix posible null use * avoid http null * metadata can still be used onReject after toResponse * dont leak task.http * fix flask tests * less flask close tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: cirospaciari <ciro.spaciari@gmail.com>
2023-08-21fix fsevents and stub for qwikcity (#4247)Gravatar dave caruso 3-4/+7
* fix test * ok * cm * EE * remove the hack we didnt need
2023-08-21fix stdin stream unref and resuming (#4250)Gravatar Dylan Conway 1-3/+4
* fix stream unref and resuming stream * fix `child-process-stdio` test
2023-08-21Fix inquirer (#4245)Gravatar dave caruso 1-0/+3
2023-08-21Fix crypto.EC constructor (#4242)Gravatar dave caruso 1-0/+1
* Fix EC constructor * make js
2023-08-19tty `ReadStream`, `WriteStream`, and readline rawmode (#4179)Gravatar Dylan Conway 3-9/+298
* tty `WriteStream`, `ReadStream`, and rawmode * tests * refactor prototypes * fix failing test * fix test and library usage * more merge * fix child_process test * create pseudo terminal for tty tests * match node logic * handle invalid tty * close descriptors * move tests to another process * fix test again * fix test on linux
2023-08-17Add `util.inspect.custom` support to `util.inspect/Bun.inspect/console.log` ↵Gravatar dave caruso 1-18/+35
(#4194) * start work on util.inspect.custom * asdf * finish util inspect custom inspect * inspect * fix tests * revert * tidy * revert * oops * test * fix issues
2023-08-17Support Nitro (#4098)Gravatar dave caruso 2-0/+62
* Add formatWithOptions * tests and tweaks * adjust * changes * hi * add mark/measure stubs * stuff * allow unix absolute paths here * typo * rebase * fix stats
2023-08-17Allow IncomingRequest.req to be overwritten. (#4154)Gravatar dave caruso 1-5/+1
* Allow IncomingRequest.req to be overwritten. * add test * fix test * yoo
2023-08-17Fix(node:fs): add buffer parameter in fs.read callback. (#4191)Gravatar Ai Hoshino 1-2/+32
Close: #4178
2023-08-15res.thenGravatar Dylan Conway 1-1/+1
2023-08-12Fix worker event loop ref/unref + leak (#4114)Gravatar dave caruso 1-5/+8
* make more tests pass * worker changes * fix some bugs * remove this * progress * uh * okay * remove console log * a * comment assert for later * mergable state * remove test * remove test
2023-08-10async realpath (#4117)Gravatar Jarred Sumner 2-2/+8
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-10add util.formatWithOptions (#4090)Gravatar dave caruso 1-6/+17
* Add formatWithOptions * tests and tweaks * adjust --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-08-08worker tests (#4058)Gravatar dave caruso 1-8/+23
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-08-07Add `env` option for `node:worker_threads` (#4052)Gravatar dave caruso 1-25/+43
* almost works * env stuff * test fixes * wtfmove * ok * ok * ref by default * it now does the ref stuff by default * cool
2023-08-06feat: impl `dns.getServers` (#3982)Gravatar Ai Hoshino 1-0/+5
* feat: impl `dns.getServers` Close: #3981 * check return value of `ares_inet_ntop`
2023-08-03Minor optimization: Avoid extra copying when the chunk has only one element. ↵Gravatar Ai Hoshino 1-1/+1
(#3946) * Optimize the case where there is only one chunk. * add generated code
2023-08-02Fix http write (#3939)Gravatar dave caruso 1-10/+8
* Fix encoding problem when uploading a binary file. Close: #3116 * use BufferList * Finish rebase --------- Co-authored-by: Hanaasagi <ambiguous404@gmail.com>
2023-08-02Implement `node:worker_threads` (#3923)Gravatar Jarred Sumner 1-1/+296
* Start to implement `worker_threads` * more * more!! * more * Update bundle_v2.zig * delete outdated tests * `receiveMessageOnPort` * props test and export default * fix merge * not implemented tests * individual imports * `receiveMessageOnPort` tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-08-02Implement `node:diagnostics_channel` (#3934)Gravatar Ashcon Partovi 2-35/+416
* Add types for `node:async_hooks` * Implement \`node:diagnostics_channel\`
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 49-13418/+1508
* stfdsafsd sadffdsa stuff finish commonjs stuff asdf not done but work not done but work not done yet but this is how far i am remove files lol update built files uncomment everything in events lol export default stuff * afdsafsd * its not perfect but almost done * okay * cool * remove temp file * finish rebase * revert settings.json * a * ch-ch-ch-ch-changes * okay * remove this check in release for now * sxdcfghnjm, * lkjhgf * fmt * filename can be null * Update NodeModuleModule.h * weee * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-31Fixes #2935Gravatar Jarred Sumner 1-7/+85
2023-07-28add fork to child_process (#3851)Gravatar Vlad Sirenko 1-8/+108
* add fork to child_process * fix export * add test to child_process method `fork` * fmt fork * remove only from test
2023-07-28fix the chunk boundary (`node:stream:createReadStream`) (#3853)Gravatar Ai Hoshino 1-4/+4
* fix the slice boundary. Close: #3668 * Add more boundary test case. * fix end is 0.
2023-07-28fix(tls) exposes native canonicalizeIP and fix rootCertificates (#3866)Gravatar Ciro Spaciari 1-6/+4
* exposes native canonicalizeIP * remove unintended duplicate * add tests * add tests for debug builds * add rootCertificates test and fix len * just randomize test ids on prisma * remove work around and bump usockets with the actual fix * fix case * bump uws
2023-07-28Add todoGravatar Jarred Sumner 1-0/+6
cc @cirospaciari
2023-07-27Resolve watch directories outside main thread + async iterator and symlink ↵Gravatar Ciro Spaciari 1-16/+40
fixes (#3846) * linux working pending tests with FSEvents * add more tests, fix async iterator * remove unnecessary check * fix macos symlink on directories * remove indirection layer * todos * fixes and some permission test * fix opsie and make prisma test more reliable * rebase with main * add comptime check for macOS * oops * oops2 * fix symlinks cascade on FSEvents * use JSC.WorkPool * use withResolver, createFIFO and fix close event on async iterator * remove unused events --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-07-27Make readFile() async (#3850)Gravatar Jarred Sumner 2-2/+8
* less leaky * async readfile * Update types.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-27Make readdir() async, fix crash in large directory trees (#3838)Gravatar Jarred Sumner 2-31/+28
* Fix unsafe GC behavior on large arrays returned by fs * Fix crash in large arrays of strings * async readdir * Add tests for large number of files returned by readdir * Move this down * Fix encoding edgecase in path.join * Async stat & lstat * add test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-26Start time performance improvements to build tools (#3797)Gravatar Jarred Sumner 1-1/+63
* Make os.cpus() faster on Linux * Fix crash See https://github.com/ziglang/zig/issues/16540 * Handle watcher_count == 0 * Add assertion * Clean up lifetimes of fs watcher a little * :scissors: * Use `errdefer` * Make the error better * Make os.cpus() more lazy * Please don't translate-c on the entire C standard library * immediately closing works correctly is still bug * ops * fmt+fixeup * add back verbose * free instead of destroy * remove destroy option for watcher tasks * flush verbose and add debug log * fixup files * use log for debug --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: cirospaciari <ciro.spaciari@gmail.com>
2023-07-22fix path.format for `vite build` (#3734)Gravatar dave caruso 3-0/+0
* fix path.format for vite * Update path.test.js --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-19Implement `AsyncLocalStorage` (#3089)Gravatar dave caruso 3-214/+340
* work to get async local storage working. * a * a * everything but queueMicrotask * sdfghj * . * finish * tests * test * ok * done * im so stupid * Upgrade WebKit * refactor * refactor * changes requested * oops * cool * fix runInAsyncScope
2023-07-19update root certificates and add tls.rootCertificates (#3688)Gravatar Ciro Spaciari 1-1/+3
* implement tls.rootCertificates * add test * bump uws/usockets * bump uws + .len on certs
2023-07-19fix createDecipheriv (#3680)Gravatar Ciro Spaciari 1-8/+52
* fix createDecipheriv * fix createDecipheriv iv and password validations
2023-07-19fix #3681 (#3690)Gravatar dave caruso 1-12/+22
2023-07-19move constants module to cpp (#3683)Gravatar Ciro Spaciari 1-476/+0
2023-07-18feature(constants) add constants/node:constants module and tests(prisma) use ↵Gravatar Ciro Spaciari 1-0/+476
prima 5.0.0 + use same connection for postgres, add prisma mssql (disabled for now) (#3672) * use prima 5.0.0 + use same connection for postgres * change mongodb test URL * constants module + mssql prisma test (disabled)
2023-07-18patch checkServerIdentity (#3671)Gravatar Ciro Spaciari 1-1/+1
2023-07-17[tls] General compatibility improvements (#3596)Gravatar Ciro Spaciari 2-79/+142
* wip * subjectaltname * more progress * bindings * fmt * getCert/getPeerCertificate * fix checkServerIdentity * fix checkServerIdentity * add a lot of TLSSocket functions * getEphemeralKeyInfo fix and comment * add alternative for getEphemeralKeyInfo * add get session and set session * fix isSessionReused * get back the raw data for MSSQL * fixeup * fixup getSession + tests * fix doc + fmt * getFinished/getPeerFinished * codegen * fixup * revert webkit * more fixes * ssl helper + revert test oops * asserts
2023-07-16Implement Workers (#3645)Gravatar Jarred Sumner 1-4/+5
* copy files * format * options * Introduce `Worker`, `onmessage`, `onerror`, and `postMessage` globals * Stub `Worker.prototype.ref` & `Worker.prototype.unref` * Update web_worker.zig * Worker works * Add "mini" mode * add wakeup * Partially fix the keep-alive issue * clean up refer behavior * Implement `serialize` & `deserialize` in `bun:jsc` & add polyfill for `node:v8` * Types & docs * Update globals.d.ts * Add mutex * Fixes --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>