aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/node (follow)
AgeCommit message (Collapse)AuthorFilesLines
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
2023-01-21Implement `process.execArgv`Gravatar Jarred Sumner 1-0/+17
2023-01-20Further cleanup buffer encodingGravatar Jarred Sumner 1-48/+26
2023-01-19make this code easier to readGravatar Jarred Sumner 1-29/+1
2023-01-19Update types.zigGravatar Jarred Sumner 1-4/+0
2023-01-19Fix buffer encoding bugGravatar Jarred Sumner 1-1/+5
2023-01-18Fix crash with invalid arguments in readdir()bun-v0.5.0Gravatar Jarred Sumner 1-1/+6
2023-01-08Update process.versionsGravatar Jarred Sumner 1-4/+9
2023-01-07Implement DNS module (#1691)Gravatar Jarred Sumner 1-0/+1
* Boilerplate for DNS stuff * Add c-ares * lookup * make * Implement dns.lookup * Create c-ares * wip * normalize * repro * Revert "repro" This reverts commit 8b93e0c295b335b8882a9601da47720348549beb. * Implement macOS `getaddrinfo_async_start` * embiggen * Update string_immutable.zig * Update Makefile * alright * Update .gitignore * Add types * more ccache * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update bun.d.ts Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-12-29Introduce `Bun.CryptoHasher`Gravatar Jarred Sumner 1-0/+106
2022-12-28Upgrade to latest Zig (#1610)Gravatar Jarred Sumner 8-691/+484
* @min and @max * builtins and some trivial ones * Most of them * more * more! * More Progress * wip * Update tagged_pointer.zig * Update http_client_async.zig * Most of the iterable dir changes * alright * Remove usages of deprecated formatters * :camera: * fmt * Update shimmer.zig * wip * wip * wip * progress * more * Latest * stuck on error * latest * workaround stage2 * wip * Update string_immutable.zig * wip * Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings * Fix build errors * Fixup most of the test failures * Fix `make headers` * Fix "outside package path" error * Fixup aligned alloc * Add missing file * linux * More linux fixes * use latest peechy * Fix transpiler test failure * Forgot about these * Fixup test failure * Update node-timers.test.ts * [node:htt] Fix `undefined is not an object` error Fixes https://github.com/oven-sh/bun/issues/1618 * Update http.exports.js * Make this test less flaky * fix hashes * Fix hex formatting and zls issues * Download zig version * Update Dockerfile * Update Dockerfile * Update uws * Update Dockerfile * Set llvm version * Update README.md * Update uws * Update Dockerfile * Update io_linux.zig * Update bun.zig * Log output * workaround strange @cInclude error * Make ffi tests better * Don't use cImport * Update c.zig * Update c-bindings.cpp * call setOutputDir * Update Dockerfile * Use a longer name * latest * Update serve.test.ts Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-12-15[node:process] Implement `process.argv0`, `process.execPath`Gravatar Jarred Sumner 1-0/+14
Fixes https://github.com/oven-sh/bun/issues/1599
2022-12-07fix `dirname` on an empty stringGravatar Jarred Sumner 1-1/+1
2022-12-06Fix glibc symbol version issues preventing `bun install` from being used in ↵Gravatar Jarred Sumner 1-1/+16
older glibc versions (#1580) * Prevent integer overflow in connectError * Add missing deepEquals() type to Bun * fix missing glibc symbols * Fix missing symbol issues * Try this * Update glibc-versions-hack.cpp * Update glibc-versions-hack.cpp * Update glibc-versions-hack.cpp Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-12-04Mildly faster startup timeGravatar Jarred Sumner 1-8/+8
2022-11-29import everything from "bun" where possibleGravatar Jarred Sumner 9-26/+26
2022-11-28[internal] Add debug timerGravatar Jarred Sumner 1-2/+3
2022-11-25Prevent closing stdout / stderrGravatar Jarred Sumner 1-2/+10
2022-11-25[internal] Log stat callsGravatar Jarred Sumner 1-2/+13
2022-11-25Add recvGravatar Jarred Sumner 1-2/+9
2022-11-23possibly more reliable Bun.spawn (#1547)Gravatar Jarred Sumner 3-24/+28
* wip * wip * Fix bug with stdin * zig fmt * seems to work! * Update streams.test.js Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-16Make `node:http`.createServer work betterGravatar Jarred Sumner 1-0/+1
2022-11-14Bugfixes and perf improvements to child_processGravatar Jarred SUmner 3-5/+75