aboutsummaryrefslogtreecommitdiff
path: root/src/js/node (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2023-07-12Improve our internal typedefs (#3608)Gravatar dave caruso 13-28/+16
* types * some more * yeah * i think that fixes it * oop
2023-07-11fix #3597 (#3609)Gravatar Dylan Conway 1-0/+19
* fix #3597 * Update http.ts * initialize to true
2023-07-11Avoid Object.getPrototypeOfjarred/fix-http-compressionGravatar Jarred Sumner 1-3/+13
2023-07-11use `Object.getPrototypeOf`Gravatar Hanaasagi 1-3/+1
2023-07-11Merge branch 'main' into fix-httpGravatar Ai Hoshino 2-6/+42
2023-07-11small fix, check if the method has been reassigned.Gravatar Hanaasagi 1-2/+5
2023-07-10fix "readable" event being emitted incorrectly (#3475)Gravatar dave caruso 1-5/+7
* fix "readable" event being emitted incorrectly * fix impl and add test * changes * asdfghj * esm
2023-07-10feat(crypto) add getCurves (#3598)Gravatar Ciro Spaciari 1-1/+35
* add getCurves * add nodefallbacks * update docs * oops
2023-07-10ignore checkGravatar Hanaasagi 1-2/+2
2023-07-10Merge branch 'main' into fix-httpGravatar Ai Hoshino 2-47/+113
2023-07-10call `writeHead` before send headersGravatar Hanaasagi 1-1/+5
Close: #3585
2023-07-10Fixes #3588 (#3590)Gravatar Jarred Sumner 1-36/+96
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-10trim node:stream a littleGravatar Jarred Sumner 1-11/+17
2023-07-07Update types, partially fix `typecheck` (#3551)Gravatar Colin McDonnell 1-0/+2
* Update types * Remove caret
2023-07-06Add util.toUSVStringGravatar Jarred Sumner 1-0/+5
2023-07-06Add missing export in `url`Gravatar Jarred Sumner 1-0/+1
2023-07-06refactor (#3543)Gravatar Ciro Spaciari 1-15/+14
2023-07-03[tls] add socket parameter, setServername and ALPNprotocols support (#3457)Gravatar Ciro Spaciari 2-48/+454
* add socket parameter support * refactor #socket * add test and more fixs * some fixes * bump uws * handlers fix * more fixes * fix node net and node tls tests * fix duplicate port * fix deinit on CallbackJobs * cleanup * add setImmediate repro * add test to setImmediate * this is necessary? * fix prependOnce on native listener * try to findout the error on nodemailer CI * show error message * Update bun.lockb * prettier * Use exact versions of packages * add alpnProtocol support * update * emit error when connect fails on net.Socket * format * fix _write and cleanup * fixup * fix connect, add alpn test * fix socket.io * add socket parameter to TLSSocket * add TLSSocket socket first parameter * fixup and _start * remove flask tests * fmt --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-30implement perf_hooks.constants (#3476)Gravatar dave caruso 1-0/+15