aboutsummaryrefslogtreecommitdiff
path: root/src/fs.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-02-24prefer `bun.copy()` over `std.mem.copy()` (#2152)Gravatar Alex Lam S.L 1-5/+5
2023-02-23Upgrade Zig (#2151)Gravatar Dylan Conway 1-4/+4
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
2023-02-17[install] support git dependencies (#2094)Gravatar Alex Lam S.L 1-9/+11
2023-02-11fix string corruption in FS entry cache (#2055)Gravatar Alex Lam S.L 1-34/+23
2023-01-16Fix `getFdPath` when `/proc/fd` is not mountedGravatar Jarred Sumner 1-2/+2
2022-12-28Upgrade to latest Zig (#1610)Gravatar Jarred Sumner 1-19/+24
* @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-19New subcommand: `bunx` (#1634)Gravatar Jarred Sumner 1-1/+1
* Implement `bunx` * copy cleanup Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-12-04[internal] Make string comparisons fasterGravatar Jarred Sumner 1-1/+1
2022-12-04Mildly faster startup timeGravatar Jarred Sumner 1-2/+2
2022-11-29import everything from "bun" where possibleGravatar Jarred Sumner 1-1/+1
2022-11-23possibly more reliable Bun.spawn (#1547)Gravatar Jarred Sumner 1-1/+1
* 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-07Handle threadsafety issueGravatar Jarred Sumner 1-3/+3
2022-09-05Support async `onLoad` callbacks in `Bun.plugin`Gravatar Jarred Sumner 1-2/+2
2022-08-04Implement `bun init` subcommandGravatar Jarred Sumner 1-0/+8
2022-04-30cleanupGravatar Jarred Sumner 1-0/+9
2022-03-31[bun dev] Improve HMR reliability when filesystem is slow or reading large filesGravatar Jarred Sumner 1-8/+40
2022-03-14Switch to std.HashMap for DirEntry storeGravatar Jarred Sumner 1-6/+28
2022-03-08rename _global -> bunGravatar Jarred Sumner 1-20/+20
2022-03-07source maps optimizationsGravatar Jarred Sumner 1-0/+6
2022-03-06source maps work for app code in `bun dev`!Gravatar Jarred Sumner 1-1/+12
2022-03-04upgrade zigjarred/upgrade-zig-2Gravatar Jarred Sumner 1-4/+4
2022-03-02Update fs.zigGravatar Jarred Sumner 1-0/+3
2022-02-27WASMGravatar Jarred Sumner 1-3/+3
2022-02-10[bun dev] Implement `hash:` namespace for `file` loader to improve browser ↵Gravatar Jarred Sumner 1-10/+17
cache invalidation This appends a hash to URLs and import paths In `bun dev`, this means: `/foo.woff2` => `/hash:/foo.woff2` `bun dev` simply ignores this.
2022-01-22Make `Ref` more safeGravatar Jarred Sumner 1-0/+5
2022-01-19`fs.*Sync()`, `bun wiptest`, and More ™ (#106)Gravatar Jarred Sumner 1-17/+44
* very very wip * almost ready to fix the errors * Update identity_context.zig * Update base.zig * [bun test] It runs successfully * Remove unnecessary call * [Bun.js] Improve JS <> Zig unicode string interop This fixes longstanding unicode bugs with `console.log` & `fetch`. I believe @evanwashere reported this first awhile ago * [Bun.js] Implement `Object.is()` binding and a way to set a timeout for script execution * Update PLCrashReport.zig * [Bun.js] Make `console.log` more closely match Node.js and Deno * [Bun.js] Implement formatting specifier for console.* * Implement `console.clear()` * bug fix * Support console.clear() * Buffer stderr * [bun test] Begin implementing Node.js `fs` * Update darwin_c.zig * Implement more of `fs` * `mkdir`, `mkdir` recursive, `mkdtemp` * `open`, `read` (and pread) * Move some things into more files * Implement readdir * `readFile`, `readLink`, and `realpath` * `writeFile`, `symlink`, `chown`, `rename`, `stat`, `unlink`, `truncate` * `lutimes` * Implement `SystemError` and begin wiring up the `fs` module * `"fs"` - Most of the arguments / validation * `fs` - Rest of the arguments / validations * Begin wiring up the `fs` module * Fix all the build errors * support printing typed arrays in console.log * It...works? * Support `require("fs")`, `import fs from 'fs';`, `import * as fs from 'fs'` * Fix a couple bugs * get rid of the crash reporter for now * Update fs.exports.js * [bun.js] slight improvement to startup time * [bun.js] Improve error message printing * [Bun.js] Add `Bun.gc()` to run the garbage collector manually and report heap size * [Bun.js] Add Bun.generateHeapSnapshot to return what JS types are using memory * [Bun.js] Add `Bun.shrink()` to tell JSC to shrink the VM size * Improve encoding reader * [bun.js] Improve callback & microtask performance * Update node_fs.zig * Implement `console.assert` * simple test * [Bun.js] Prepare for multiple globals/realms to support testing * Create callbacks-overhead.mjs * Update http.zig * [Bun.js] Implement `queueMicrotask` * Add test for queueMicrotask * :sleepy: * [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`, * Implement `process.env.toJSON()` * [Bun.js] Improve performance of `fs.existsSync` * :nail_care: * [Bun.js] Implement `process.chdir(str)` and `process.cwd()`, support up to 4 args in `process.nextTick` * Make creating Zig::Process lazy * Split processi nto separte file * [Bun.js] Node.js Streams - Part 1/? * [Bun.js] Node.js streams 2/? * WIP streams * fix crash * Reduce allocations in many places * swap * Make `bun` start 2ms faster * Always use an apiLock() * libBacktrace doesn't really work yet * Fix crash in the upgrade checker * Clean up code for importing the runtime when not bundling * :camera: * Update linker.zig * 68! * backtrace * no, really backtrace * Fix * Linux fixes * Fixes on Linux * Update mimalloc * [bun test] Automatically scan for {.test,_test,.spec,_spec}.{jsx,tsx,js,cts,mts,ts,cjs}
2022-01-05Reduce memory usageGravatar Jarred Sumner 1-2/+2
2022-01-03[bun install] Significant perf improvement to installing new packages and ↵Gravatar Jarred SUmner 1-5/+0
fixes 'bun install --production'. Closes #97
2022-01-02[bun install] Fix `RenameAcrossMountPoints` errorGravatar Jarred Sumner 1-1/+15
2021-12-30Upgrade to latest Zig, remove dependency on patched version of Zig (#96)Gravatar Jarred Sumner 1-40/+42
* Prepare to upgrade zig * zig fmt * AllocGate * Update data_url.zig * wip * few files * just headers now? * I think everything works? * Update mimalloc * Update hash_map.zig * Perf improvements to compensate for Allocgate * Bump * :camera: * Update bun.lockb * Less branching * [js parser] Slightly reduce memory usage * Update js_parser.zig * WIP remove unused * [JS parser] WIP support for `with` keyword * Remove more dead code * Fix all the build errors! * cleanup * Move `network_thread` up * Bump peechy * Update README.md
2021-12-27Prepare to run unit tests & remove some dead code (#92)Gravatar Jarred Sumner 1-84/+17
* Remove some dead code * :skull: code * Fix the zig tests * [JS Printer] Print integers faster & less scientific notation on decimals * :skull: dead code * skip * Run all the unit tests
2021-12-24Improve devcontainer environment errorsGravatar Jarred Sumner 1-1/+1
2021-12-21--dump-limits flag to inspect what the max file descriptor & stack size isGravatar Jarred Sumner 1-0/+18
2021-12-16[bun install] Fix case when lockfile existsGravatar Jarred Sumner 1-2/+6
2021-12-16[bun install] WIPGravatar Jarred Sumner 1-6/+5
2021-10-28New subcommand: `bun upgrade`. It upgrades bun to the latest version.Gravatar Jarred Sumner 1-1/+1
2021-10-04memfd experiment did not yield perf gains on Linuxjarred/fix-bunbun-on-wslGravatar Jarred SUmner 1-4/+3
I suspect the reason why is because we were already using tmpfs. So it was already writing to an in-memory file. O_TMPFILE doesn't seem to do anything for us either here.
2021-10-04Don't pass O_EXCLGravatar Jarred Sumner 1-2/+2
2021-10-04O_TMPFILEGravatar Jarred Sumner 1-4/+2
2021-10-04memfd_create does not actually make it fasterGravatar Jarred Sumner 1-30/+7
2021-10-04Attempt to optimize `bun bun` on Linux by using memfd_create and copying the ↵Gravatar Jarred Sumner 1-0/+73
resulting file via sendfile()
2021-10-03Fix various macOS-specific compile errors and run `zig fmt`Gravatar Jarred Sumner 1-2/+1
2021-10-02Linux works now.Gravatar Jarred SUmner 1-10/+16
2021-09-20Fix handling when file metadata store stored exceeds statically allocated ↵Gravatar Jarred Sumner 1-11/+8
count (at time of writing, 16k)
2021-09-12Fix "browser" map resolution, _almost_ fix symbol collisions, cache absolute ↵Gravatar Jarred Sumner 1-6/+11
paths for file entries
2021-09-12Support bundling dynamically imported modules.Gravatar Jarred Sumner 1-0/+1
2021-09-04Fixed memory leaks, but SSR is slower. Should move cleanup & restart steps ↵Gravatar Jarred Sumner 1-6/+14
to a real idle timeout Former-commit-id: 9499ee3109cb336deb9380f0190631a30c9da51c
2021-09-03Fix logging in bun bun + bumpGravatar Jarred Sumner 1-3/+3
Former-commit-id: 19275a07342879d9b02b9d9527b762c8bfadb9e6
2021-09-02latestGravatar Jarred Sumner 1-0/+10
Former-commit-id: 1086d4f894611c1171f57d9eaf82f9170e9de2d1
2021-09-02Fix UMD, fix PNPM, importing require'd modules in app codeGravatar Jarred Sumner 1-6/+106
Former-commit-id: 3d831ad95904d2123964f2ebccff48f1e9f954e9