aboutsummaryrefslogtreecommitdiff
path: root/src/fs.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
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
2021-08-29latestGravatar Jarred Sumner 1-2/+14
Former-commit-id: 096ec1222ad723d006b0151f10cb0c1b95e2bfd3
2021-08-26Fix unbundled importsGravatar Jarred Sumner 1-1/+5
Former-commit-id: f221da115c1afcd136648c9683d8e9907005a128
2021-08-26Fix file loader, automatically support CSS imports when a framework isn't setGravatar Jarred Sumner 1-13/+0
Former-commit-id: 94750e5987ea8f6e4c946bfc06715e09a48c0eec
2021-08-25latestGravatar Jarred Sumner 1-14/+16
Former-commit-id: f5600d123d3710e7ea80ff2b7c66d13382462420
2021-08-23Fix resolve bug with mixed-case node_modulesGravatar Jarred Sumner 1-80/+66
Former-commit-id: 5bdae0ee491e28b49ceed6136f04e0c1feddc808
2021-08-21Fix watcher when you move files/dirs around. It'll bust the cache and ↵Gravatar Jarred Sumner 1-18/+34
recreate it (and leak memory) Former-commit-id: 8faf6127547411c1fdcee9e4e7440825f21ecd99
2021-08-20Use the new Lock typeGravatar Jarred Sumner 1-1/+1
Former-commit-id: fcb04d39a1629047ab0a227c2992922725189ca7
2021-08-18etcGravatar Jarred Sumner 1-0/+1
Former-commit-id: 67546a63021c0b5b58841a03115fa699ae3e441f
2021-08-14.env worksGravatar Jarred Sumner 1-2/+14
Former-commit-id: 45ee7874f2c8566c3034743161031b0859423f41