aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/fs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-30Update cp.test.tsGravatar Jarred Sumner 1-1/+1
2023-09-30tweak github actions (#6195)Gravatar Jarred Sumner 1-1/+1
* Discord comments * better * better * actions --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-27fix(node:fs): fix `fs.exists` callback parameters (#6097)Gravatar Ai Hoshino 1-0/+41
Close: #6073
2023-09-21Don't use arena in node:fs (#5863)Gravatar Jarred Sumner 1-0/+19
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-21fix(node:fs): use the right copyFile constants (#5874)Gravatar dave caruso 1-1/+30
2023-09-16fix: node compatibility with empty path string (#4693)Gravatar MrPalixir 1-0/+17
Co-authored-by: MrPalixir <73360179+MrPalixir@users.noreply.github.com>
2023-09-14async-ify all node:fs functions (#5360)Gravatar Jarred Sumner 1-5/+8
* 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-07Fix a couple important bugs (#4560)bun-v1.0.0Gravatar Jarred Sumner 1-1/+7
2023-09-07revert (#4539)Gravatar dave caruso 1-5/+1
* 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 1-3/+7
* 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-03fix(syscall): fix handling syscall errno (#4461)Gravatar Ai Hoshino 1-0/+21
* fix(syscall): fix handling syscall errno Close: #4198 * remove unused code * add more tests * remove unused code
2023-08-31fix(runtime): `fs.cp` edge cases (#4439)Gravatar dave caruso 1-3/+36
* yippee * enable cpSync tests * much better * that doesnt actually do anything * lose
2023-08-30feat(node:fs): add `cp`/`cpSync`/`promises.cp` + async `copyFile` (#4340)Gravatar dave caruso 2-2/+259
* 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-29fix(node-fetch): use stream.Readable instead of web streams (#4394)Gravatar dave caruso 2-46/+0
* fix blobFrom * fix(node-fetch): use stream.Readable instead of web streams * uncomment * comment why
2023-08-29emit open and call close callback (#4384)Gravatar Dylan Conway 1-0/+55
2023-08-28use `options.fd` if provided for `fs.Read/WriteStream` (#4378)Gravatar Dylan Conway 1-0/+22
* use `options.fd` over path * tests * fix `@clack/prompts` * == null
2023-08-20Fixes #1675 (#4230)Gravatar Jarred Sumner 2-0/+76
* Fixes https://github.com/oven-sh/bun/issues/1675 * Add fallback for Bun.write * Update blob.zig * Fix test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-18Implement BigIntStats (#4208)Gravatar dave caruso 1-0/+35
* Implement BigIntStats * changes * rename test * comment * test changes?
2023-08-17Support Nitro (#4098)Gravatar dave caruso 1-0/+25
* Add formatWithOptions * tests and tweaks * adjust * changes * hi * add mark/measure stubs * stuff * allow unix absolute paths here * typo * rebase * fix stats
2023-08-17Fix(node:fs): add buffer parameter in fs.read callback. (#4191)Gravatar Ai Hoshino 1-0/+116
Close: #4178
2023-08-10async realpath (#4117)Gravatar Jarred Sumner 1-1/+31
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-06Fixes #4029 and fixes #4022 (#4032)Gravatar Jarred Sumner 1-22/+22
* Fixes #4029 and Fixes #4022 Fixes #4029 Fixes #4022 * Add test for all the fetches --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-03Fix thread safety issue in async fs functions file paths (#3964)Gravatar Jarred Sumner 1-0/+33
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-03Bunch of fixes (#3516)Gravatar Ashcon Partovi 1-1/+1
* Fix #3497 * Fix #3497 * Run prettier * Fix package.json * remove this too * yeah * Fix missing tests * Use native for utf-8-validate * Add module ID names to builtins * Defer evaluation of ESM & CJS modules until link time * Use builtin name for exports in plugins * Add module IDs to builtins * Update JSC build with new flag * WebKit upgrade fixes * Update WebKit * prettier * Upgrade WebKit * bump * Update once again * Add visitAdditionalChildren, remove .fill() usage * Update process.test.js * Update fs.test.ts --------- Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 1-2/+2
* 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-08-02Fixes #3931 (#3933)Gravatar Jarred Sumner 2-1/+15
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-28Stat largefile test (#3870)Gravatar Jarred Sumner 1-0/+22
* Add test for stat on a large file * Update fs.test.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-27Make readFile() async (#3850)Gravatar Jarred Sumner 1-0/+28
* 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 1-0/+81
* 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-22Fix `writeFileSync` when the mode is greater than 0o777. (#3747)Gravatar Ai Hoshino 1-1/+6
Close: #3740
2023-07-11Testsjarred/throw-ifGravatar Jarred Sumner 1-0/+12
2023-07-10fix "readable" event being emitted incorrectly (#3475)Gravatar dave caruso 1-0/+23
* fix "readable" event being emitted incorrectly * fix impl and add test * changes * asdfghj * esm
2023-07-07[node:fs] `read`, `write` - support large numbers and BigInt (#3556)Gravatar Jarred Sumner 1-0/+52
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-29cant believe i missed this (#3453)Gravatar dave caruso 1-0/+13
2023-06-26Implement writev & readv (#3419)Gravatar Jarred Sumner 1-0/+65
* [node:fs] Implement `writev` and `readv` * writev & readv tests * cast to const type * woops * cast --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-25Fix the parameters of WriteStream constructor. (#3402)Gravatar Ai Hoshino 1-0/+38
* Fix the parameters of the `WriteStream` constructor. Close: https://github.com/oven-sh/bun/issues/3395 * test append mode in `createWriteStream` * fix lint * wait first stream finished
2023-06-23Make node-fallbacks build as esm not cjs / Fix `node-fetch` (#3377)Gravatar dave caruso 1-1/+13
* Make node-fallbacks build as esm not cjs. * fix stuff
2023-06-20Cleanup fs.utimesSync (#3363)Gravatar Jarred Sumner 1-0/+72
* Fix UB in fs.utimesSync when passing a number with an integer greater than i32 * Fix make headers --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-18Fix a bunch of bugs (#3352)Gravatar Jarred Sumner 1-1/+56
* Fix a bunch of bugs * undo that one * Fix crash in readdir() * woops * woops * Add comment * :scissors: * Make `readlink()` and `realpath` use much less memory * Update BunString.cpp * woopsie * Unnecessary * Don't commit these --------- 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-0/+7
* 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-19Make `node-fetch` polyfill better (#2962)Gravatar Jarred Sumner 1-0/+21
* Make `node-fetch` polyfill better * fixup * Test using localhost * Add comment --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-17Update fs.test.tsGravatar Jarred Sumner 1-7/+10
2023-05-17Fixes https://github.com/oven-sh/bun/issues/2931Gravatar Jarred Sumner 1-0/+26
2023-05-12windows path compatibility (#2869)Gravatar dave caruso 2-1/+1
* winndows path compatibility * change * to "star" and fix import --------- Co-authored-by: cirospaciari <ciro.spaciari@gmail.com>
2023-05-11fix(fs) mkdtemp and mkdtempSync errors (#2851)Gravatar Ciro Spaciari 1-0/+17
* fix mkdtemp * fmt * fix errno
2023-04-06fix: export `constants` from `fs/promises` (#2567)Gravatar dave caruso 1-0/+5
* fix: export `constants` from `fs/promises` * fix type tests * third time's the charm fixing the typedef * run fmt * remove injected constant from fs, re-exporting from fs/promises
2023-04-04Implement `import.meta.main` (#2556)Gravatar Jarred Sumner 1-0/+1
* Implement `import.meta.main` * Update main-test-1.js * Update fs.test.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-04Dylan/fix some failing tests (#2544)Gravatar Jarred Sumner 1-1/+1
* handle `umask()` invalid arguments * move `bktree-fast` to test root, fix postinstall * fix fs test * could be baseline * handle different timezones * accidentally deleted tests * fix hang in `AbortSignal.timeout` * bring abort tests back * Revert "bring abort tests back" This reverts commit 0ff2ad5bf408694ac719b8ba0a38b16070e10201. * bunx node-gyp * bun x * fix typecheck * test * Update inspect.test.js --------- Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2023-03-28More bug fixes (#2486)Gravatar Jarred Sumner 1-48/+58
* 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-22A couple bug fixes (#2458)Gravatar Dylan Conway 2-4/+188
* fix valid status code range * update path * highwatermark option * throw DOMException * remove extra transpiler output * more transpiler tests * comment * get index not quickly * replace with `getDirectIndex` * update abort test * throw out of range status code * promisify test fix * move stdio test instance files * working crypto tests * allow duplicate set-cookie headers * different formatting * revert, fix will be in different pr * it is called * use min buffer size * fix url tests * null origin for other protocols * remove overload * add very large file test * await * coerce to int64 * 64 * no cast * add todo blob url tests * use `tryConvertToInt52`