aboutsummaryrefslogtreecommitdiff
path: root/src/javascript (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-19Bun.Transpiler – API for scanning imports/exports of JSX/TSX/TS/JS filesGravatar Jarred Sumner 5-6/+707
2022-01-19small bugfixGravatar Jarred Sumner 1-6/+6
2022-01-19`fs.*Sync()`, `bun wiptest`, and More ™ (#106)Gravatar Jarred Sumner 36-687/+13853
* 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-04noramlize some errorsGravatar Jarred Sumner 1-1/+1
2022-01-04[Bun.js][bun dev] Support macros inside of Bun.jsGravatar Jarred Sumner 2-45/+71
Closes #36
2022-01-03dead codeGravatar Jarred Sumner 1-35/+0
2022-01-02LLVM 13 for WebKitGravatar Jarred Sumner 1-0/+0
2022-01-02Update WebKitGravatar Jarred Sumner 1-0/+0
2022-01-02copy: replace Bun with bun (#99)Gravatar luke miles 2-4/+4
Most CLI tools have the style convention of referring to themselves in lowercase. It is, after all, the name that users type in when using the tool. This PR maintains that convention in bun. "Drop the uppercase B, it's cleaner"
2022-01-01[bun dev] Automatically set `origin` - improve support for proxying BunGravatar Jarred Sumner 3-17/+36
Previously, when running Bun behind a reverse proxy, you had to pass an explicit `--origin` arg and it could only run behind one proxy at a time. Now, Bun automatically determines the origin from the request if possible. It reads `Forwarded`, `X-Forwarded-Proto`, `X-Forwarded-Host`, `Origin`, and lastly `Host`. If none are available, it falls back to the `--origin` CLI arg. This change is important for usecases like Replit which shows multiple iframes in different origins.
2021-12-31Attempt to fix watcher issue with repl.itGravatar Jarred Sumner 1-1/+2
2021-12-30Fix issue with headersGravatar Jarred Sumner 5-3/+17
2021-12-30linuxGravatar Jarred Sumner 3-2/+400
2021-12-30[internal] Move network_thread into http packageGravatar Jarred Sumner 6-422/+20
2021-12-30Upgrade to latest Zig, remove dependency on patched version of Zig (#96)Gravatar Jarred Sumner 18-666/+896
* 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-28dead codeGravatar Jarred Sumner 1-6/+1
2021-12-28[Bun.js] Add Bun.argv api, so you can get the arguments that started a scriptGravatar Jarred Sumner 1-1/+26
2021-12-27Prepare to run unit tests & remove some dead code (#92)Gravatar Jarred Sumner 2-20/+14
* 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-24muslGravatar Jarred Sumner 1-0/+0
2021-12-23Workaround miscompilation so JavaScriptCore runs on Linux AARCH64Gravatar Jarred Sumner 7-47/+38
2021-12-22[Bun.js] Fix SSR when using `fetch`Gravatar Jarred Sumner 2-5/+11
2021-12-21Slightly less pointer chasingGravatar Jarred SUmner 2-1/+1
2021-12-19Remove duplicate codeGravatar Jarred Sumner 1-2/+2
2021-12-18Use new http in `bun upgrade`Gravatar Jarred Sumner 2-2/+2
2021-12-17bindingsGravatar Jarred Sumner 1-0/+6
2021-12-17👶event loopGravatar Jarred Sumner 13-105/+393
2021-12-16wipGravatar Jarred Sumner 2-3/+33
2021-12-16[macros] Do not automatically load node_modules.bun in macrosGravatar Jarred Sumner 1-11/+11
2021-11-06[internal] Generated filesGravatar Jarred Sumner 3-8/+2
2021-11-04[internal] fmtGravatar Jarred Sumner 1-20/+28
2021-11-03[Bun.js] Rename `Bun.sleep` -> `Bun.sleepSync`bun-v0.0.44Gravatar Jarred Sumner 1-3/+3
2021-10-31[Bun.js] Bun.sleep() lets you synchronously sleep. Thanks @evanwashereGravatar Jarred Sumner 1-0/+19
2021-10-30Update javascript.zigGravatar Jarred Sumner 1-0/+1
2021-10-30[Bun.js] Lazily add `FORCE_COLOR` environment variable for better ↵Gravatar Jarred Sumner 1-1/+13
compatibility with Node.js modules that detect whether the terminal supports colors
2021-10-30[Bun.js] Partially fix loading Node.js fallback modulesGravatar Jarred Sumner 1-2/+19
2021-10-30[Bun.js] Add API for detecting if ANSI colors are enabledGravatar Jarred Sumner 1-25/+29
2021-10-30[Bun.js] Enable SharedArrayBufferGravatar Jarred Sumner 1-0/+3
2021-10-30[Bun.js] Add performance.now()Gravatar Jarred Sumner 1-0/+40
2021-10-29[internal] This is no longer a feature flag in JSCGravatar Jarred Sumner 1-1/+0
2021-10-29[Bun.js] Fix silly oversight with fetch implementationGravatar Jarred Sumner 1-3/+6
2021-10-29[internal] Fix missing symbol errors when building JavaScriptCore bindings ↵Gravatar Jarred Sumner 6-23/+20
without already having the object files
2021-10-28FIx webkit commitGravatar Jarred Sumner 1-0/+0
2021-10-28New subcommand: `bun upgrade`. It upgrades bun to the latest version.Gravatar Jarred Sumner 1-0/+0
2021-10-25Fix JSX unicode handling, slightly improve perfGravatar Jarred Sumner 1-0/+4
2021-10-25[Bun.js] When `Body` is UTF-16 encoded, convert it to UTF-8.Gravatar Jarred Sumner 1-6/+30
2021-10-24Mark all exported symbols as weak, always `zig fmt` the headers file to ↵Gravatar Jarred Sumner 3-5/+9
reduce diff churn
2021-10-24[internal] Get source URLs in C++Gravatar Jarred Sumner 1-45/+0
2021-10-23[internal] Remove more dead code, add script to find .zig files that aren't ↵Gravatar Jarred Sumner 4-0/+0
imported by other .zig files
2021-10-23[internal] :scissors: dead codeGravatar Jarred Sumner 4-154/+0
2021-10-23Add "process.env" to global objectGravatar Jarred Sumner 4-18/+36