aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/node (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-04Implement `Bun.password` and `Bun.passwordSync` (#3204)Gravatar Jarred Sumner 1-0/+12
* Implement `Bun.password.{verify, hash}` and `Bun.passwordSync.{verify, hash}` * flip the booleans * delete unused * Add `cost` for `"bcrypt"`, add `"memoryCost"` and `"timeCost'` for argon2, use SHA512 * Update bun.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-03Fix crash with path parse in win32 (#3187)bun-v0.6.7Gravatar Jarred Sumner 1-4/+8
* Update CommonJSModuleRecord.cpp * smaller * [node:path] Fix crash, mark TODO --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-01Rename `ptr` to `_unsafe_ptr_do_not_use` (#3163)Gravatar Jarred Sumner 1-5/+8
* Rename `ptr` to `_unsafe_ptr_do_not_use` * Fixup --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-01random fixes that help vite/sveltekit (#3140)Gravatar dave caruso 1-18/+5
* existsSync with invalid paths should return false * partially support file urls (does not do percent encoding) * add utf16 support for Path.isAbsoluteString * Update src/resolver/resolver.zig Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * fixups * revert * prettier format --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-05-31isolated version of Path compatible with nodejs (#3143)Gravatar Ciro Spaciari 1-4/+3
2023-05-31invert base/filename internally (#3141)Gravatar Ciro Spaciari 1-3/+3
2023-05-31fix(path) fix parse behavior (#3134)Gravatar Ciro Spaciari 1-6/+9
2023-05-26Fix crash in test.todo + remove JSC C API usages in bun:test (#3079)Gravatar Jarred Sumner 1-1/+1
* Fix crash in test.todo * remove usages of JSC C API in bun:test * Remove additional JSC-C API usages * fix `make headers` * URLSearchParams.length * FormData length * URLSearchParams length * Fix `make headers` * very fancy length * Fix bug with exceptions being ignored sometimes * Add tests for extension toHaveLength --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-21fix(tls.connect) fix SNI on tls sockets and also servername (mongodb) (#2934)Gravatar Ciro Spaciari 2-11/+62
* 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-20[internal] Make `JSC.NewFunction` more type safeGravatar Jarred Sumner 1-1/+1
2023-05-17Fixes https://github.com/oven-sh/bun/issues/2931Gravatar Jarred Sumner 1-1/+4
2023-05-15Make `bun build --compile` a little more resilient, output better errors, ↡Gravatar Jarred Sumner 1-0/+15
and clean up files
2023-05-14Fix `process.argv` with standaloneGravatar Jarred Sumner 1-7/+13
2023-05-14feat(Timer.refresh) add refresh support on Timer (#2874)Gravatar Ciro Spaciari 1-0/+5
* 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-11fix(fs) mkdtemp and mkdtempSync errors (#2851)Gravatar Ciro Spaciari 1-7/+11
* fix mkdtemp * fmt * fix errno
2023-04-27Don't preallocate unless its profitableGravatar Jarred Sumner 1-3/+3
2023-04-27very slightly faster open() and writeFileSync() (#2759)Gravatar Jarred Sumner 2-45/+105
* Make open() slightly faster on macOS * Support using `writeFileSync` from native code * Add `openat$NOCANCEL` symbol * fixups for linux * do benchmark --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-19Fix broken autocompleteGravatar Jarred Sumner 9-24/+24
2023-04-17Fixes #2676Gravatar Jarred Sumner 1-2/+2
2023-03-28More bug fixes (#2486)Gravatar Jarred Sumner 1-5/+78
* readline_promises test fix * fix `escapeHTML` for baseline builds * fs test fixes, use `tmpdir()` * add paths for `resolve.test.js` * isError with toString symbol and error prototype * comment about `toString` * skip async macro transform * test cleanup, skip stack format test * readline undo and redo fix * capture error from readline keypress * Update tcp-server.test.ts * use `removefileat` for recursive rmdir * use strong for `signal.reason` * initialize `m_flags` * directory with file fs test * recursive option * import expect * could be less than * move abort signal tests to another process * fix typecheck --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-03-14Fix text formatting in .remoteAddress in `ServerWebSocket` and `Socket`Gravatar Jarred Sumner 1-20/+3
Fixes #2387
2023-03-07"binary" is an alias of "latin1"Gravatar Jarred Sumner 1-2/+5
Fixes https://github.com/oven-sh/bun/issues/2110
2023-03-07improve `Buffer` compatibility with Node.js (#2341)Gravatar Alex Lam S.L 1-69/+45
* improve `Buffer` compatibility with Node.js * use `memmove()` allow `encoding` to be `undefined`
2023-03-02fix(os.tmpdir()) strip trailing slash on *unix machines (#2276)Gravatar Ciro Spaciari 1-98/+76
* fix(os.tmpdir()) strip trailing slash on *unix machines * make use of strings.withoutTrailingSlash(dir);
2023-02-27Feat/os.network interfaces (#2142)Gravatar Justin Whear 1-2/+258
2023-02-24Implement `os.cpus` for Darwin (OS X) (#2115)Gravatar Justin Whear 1-70/+156
* adding experimental Mac implementation os os.cpus * Simplify cpus interfaces * remove support for osx 10 * Refactor os.cpus implementation This commit substantially refactors how the Linux and Darwin implementations of `os.cpus`. The goal is to avoid unnecessary copying and allow broader latitude in responding to errors per implementation. * improved comments * ensure no buffer overrun * use PROCESSOR_CPU_LOAD_INFO_COUNT; not sure if this is correct * oh teh noes * use sliceTo instead of span * cpu_ticks are uints
2023-02-24prefer `bun.copy()` over `std.mem.copy()` (#2152)Gravatar Alex Lam S.L 1-2/+2
2023-02-23Upgrade Zig (#2151)Gravatar Dylan Conway 3-40/+42
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
2023-02-22[breaking] Return Node.js `Timeout` objects in `setTimeout`, `setInterval`, ↡Gravatar Jarred Sumner 1-0/+27
and `setImmediate` Fixes #2129 #880
2023-02-18feat(node/os): implement `os.machine()` (#1378)Gravatar Carter Snook 1-12/+21
* feat(node/os): implement 'os.machine()' --------- Co-authored-by: Justin Whear <justin.whear+github@gmail.com>
2023-02-17Fix edgecase in some arg parsing in `fs` moduleGravatar Jarred Sumner 1-28/+28
2023-02-17use mapGravatar Jarred Sumner 1-21/+70
2023-02-17More correct filesystem flags parsingGravatar Jarred Sumner 1-49/+55
2023-02-16Implement `machine` for Linux (#2088)Gravatar Justin Whear 1-0/+13
2023-02-16Fix #1516 (#2089)Gravatar Justin Whear 2-7/+7
`FileSystemFlags.fromJS` was hardcoded to return O_RDONLY when the flag value was null or undefined and this caused breakage when used with write functions. Updated the function to take a `default` argument so that the caller can specify a sane default for their use.
2023-02-13Implement `FormData` (#2051)Gravatar Jarred Sumner 1-1/+24
* Backport std::forward change * Implement `FormData` * Fix io_darwin headers issue * Implement `Blob` support in FormData * Add test for file upload * Fix bug with Blob not reading Content-Type * Finish implementing FormData * Add FormData to types --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-06set the typeGravatar Jarred Sumner 1-1/+1
2023-02-06Make `Stat` functions fastGravatar Jarred Sumner 2-0/+69
2023-02-06Use new bindings for StatGravatar Jarred Sumner 3-154/+215
Fixes #1999
2023-02-06Expose Dirent and Stats (#1998)Gravatar MichaΕ‚ Warda 2-1/+5
* Expose dirent and stats * Expose Dirent and Stats inside fs * Add tests for Dirent and Stats exposing * Automatically generate bindings
2023-02-03Implement os.cpus() for Linux (#1977)Gravatar Justin Whear 1-2/+138
* Implement os.cpus() for Linux `os.cpus()` currently returns an empty array for all platforms. This PR implements full functionality for Linux and has been tested on x86-64. Other OSes will continue to return an empty array. Note that Linux on Arm64 may report the CPU model differently; if this is the case the CPU model will currently be reported as "unknown". As I do not have Arm64 hardware to verify and develop against, a todo has been left in the code. * resolve issues from review
2023-01-31Fixes fs.constantsGravatar Jarred Sumner 1-1/+3
2023-01-31Remove validateionGravatar Jarred Sumner 1-9/+0
2023-01-31Fix missing `*ms` getters in StatGravatar Jarred Sumner 1-12/+12
Related to #1949
2023-01-30fix utf16le fill and utf8 partial write of utf16 (#1943)Gravatar Ciro Spaciari 1-8/+8
2023-01-29Fix bug in fs.openSyncGravatar Jarred Sumner 1-1/+1
2023-01-27fix sentinel sliceGravatar Dylan Conway 1-1/+2
2023-01-26Remove usages of assumeSentinelGravatar Jarred SUmner 1-2/+2
2023-01-24Fixes #1887Gravatar Jarred Sumner 1-17/+25
2023-01-22cleanup execArgv a littleGravatar Jarred Sumner 1-4/+19