Commit Graph

25 Commits

Author SHA1 Message Date
Jarred Sumner
d3a93d5273 fs.*Sync(), bun wiptest, and More ™ (#106)
* 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

* 😪

* [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`,

* Implement `process.env.toJSON()`

* [Bun.js] Improve performance of `fs.existsSync`

* 💅

* [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

* 📷

* 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-19 02:29:07 -08:00
Jarred Sumner
e75c711c68 Upgrade to latest Zig, remove dependency on patched version of Zig (#96)
* 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

* 📷

* 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-30 21:12:32 -08:00
Jarred Sumner
94e469c803 [bun install] WIP 2021-12-16 19:18:51 -08:00
Jarred Sumner
e10fe8aaad [JS transpiler] Ensure reserved words don't end up in nonUniqueIdentifier() 2021-12-15 17:08:04 -08:00
Jarred Sumner
309298fa42 Fix bug with MutableString.ensureValidIdentifier 2021-10-23 22:54:39 -07:00
Jarred Sumner
afb6684782 Fix resolve bug with mixed-case node_modules
Former-commit-id: 5bdae0ee491e28b49ceed6136f04e0c1feddc808
2021-08-23 02:30:30 -07:00
Jarred Sumner
ece2a3ccfd alright now it crashes
Former-commit-id: 26745bb5f3
2021-06-29 01:34:38 -07:00
Jarred Sumner
adbeb24979 starting to work
Former-commit-id: ae113559c6
2021-06-27 23:36:35 -07:00
Jarred Sumner
7eb887edd5 HMR crashily works, started working on CSS Scanner
Former-commit-id: d0f91082fc
2021-06-14 19:45:51 -07:00
Jarred Sumner
122ef023dd extremely close!!!!!
Former-commit-id: 44fce3c5e8
2021-06-14 01:49:53 -07:00
Jarred Sumner
faa3c867e2 Fix extra space in printer
Former-commit-id: c17c200cfd
2021-06-04 18:26:55 -07:00
Jarred Sumner
756c41719c Fix extra underscore in ensureValidIdentifier
Former-commit-id: 1cc15b6c20
2021-06-04 17:33:11 -07:00
Jarred Sumner
fa2f60cdd5 fix the leaks
Former-commit-id: 58d77ab827
2021-06-04 02:47:07 -07:00
Jarred Sumner
f8131f42bc okay
Former-commit-id: 2c20d88e8d
2021-05-12 01:46:58 -07:00
Jarred Sumner
324784cd6e update
Former-commit-id: a5f1670e92
2021-05-11 18:39:00 -07:00
Jarred Sumner
fc75a0dea6 asdasdasdasd
Former-commit-id: 2b3c0584c6
2021-05-10 20:05:53 -07:00
Jarred Sumner
166c353ddb 1day
Former-commit-id: b7d8fe2f35
2021-05-09 18:57:48 -07:00
Jarred Sumner
e70ac2ce82 wip
Former-commit-id: 79223472f7
2021-05-07 23:34:16 -07:00
Jarred Sumner
fad34bb4ab cool
Former-commit-id: 96ff169e46
2021-05-07 01:26:26 -07:00
Jarred Sumner
6be0a4653f damn tho
Former-commit-id: e1df98878d
2021-05-05 03:09:59 -07:00
Jarred Sumner
d19f939e7d keeper
Former-commit-id: 83ff3453dc
2021-05-04 15:54:17 -07:00
Jarred Sumner
568db047a3 wap 2021-04-26 00:34:45 -07:00
Jarred Sumner
99918c35ec it prints true and false 2021-04-25 18:47:09 -07:00
Jarred Sumner
da509f3d5a a 2021-04-22 14:24:28 -07:00
Jarred Sumner
5ae24b75ae lots 2021-04-19 20:53:54 -07:00