Commit Graph

113 Commits

Author SHA1 Message Date
Jarred Sumner
d8f174e54c Always try to load bunfig.toml for install, dev, bun, test 2022-02-05 19:02:13 -08:00
Jarred Sumner
bf4943eec1 Implement TOML parser
No Date/DateTime/Time/Local Time yet
2022-01-28 23:56:45 -08:00
Jarred Sumner
32733210dc [bunfig] Implement config file format 2022-01-27 01:25:09 -08:00
Jarred Sumner
08bc06dfe0 No more leading ./ necessary to pass a script to bun to execute 2022-01-22 16:25:21 -08:00
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
0960f3d6d1 Implement a crash reporter and improve some error handling in bun install 2022-01-03 22:17:34 -08:00
luke miles
7f33846005 copy: replace Bun with bun (#99)
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-02 03:09:51 -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
f4870050e0 Update cli.zig 2021-12-28 03:43:19 -08:00
Jarred Sumner
f31e67b13d woops 2021-12-28 03:42:44 -08:00
Jarred Sumner
0d95cf8f5b [Bun.js] If you pass a js-like file path to bun with no subcommand, attempt to run it with Bun.js 2021-12-28 02:47:35 -08:00
Jarred Sumner
336a4b6ac2 Prepare to run unit tests & remove some dead code (#92)
* Remove some dead code

* 💀 code

* Fix the zig tests

* [JS Printer] Print integers faster & less scientific notation on decimals

* 💀 dead code

* skip

* Run all the unit tests
2021-12-27 18:06:31 -08:00
Jarred Sumner
ff99155f7d --dump-limits flag to inspect what the max file descriptor & stack size is 2021-12-21 18:48:52 -08:00
Jarred Sumner
38d3b200b5 Update cli.zig 2021-12-20 00:00:04 -08:00
Jarred Sumner
a0551a9b8b Autocomplete popular package names (thanks @evanwashere) 2021-12-19 23:30:25 -08:00
Jarred Sumner
4ee8055f17 Show help text when no options 2021-12-18 23:29:39 -08:00
Jarred Sumner
059f01d23a Add new zsh completions 2021-12-18 21:44:17 -08:00
Jarred Sumner
461c769ac4 Track peer dependencies but don't install them 2021-12-16 19:18:51 -08:00
Jarred Sumner
3036cbe552 bun add and bun remove sorta works now. but not fast enough! 2021-12-16 19:18:51 -08:00
Jarred Sumner
6382bb5333 [bun install] Start add/remove command 2021-12-16 19:18:51 -08:00
Jarred Sumner
d83c610002 [bun install] Support printing yarn.lock 2021-12-16 19:18:51 -08:00
Jarred Sumner
1610ff33ea [bun install] some things install 2021-12-16 19:18:51 -08:00
Jarred Sumner
94e469c803 [bun install] WIP 2021-12-16 19:18:51 -08:00
Jarred Sumner
bc3c17ffc8 Improve ZSH completions 2021-11-07 02:41:26 -08:00
Jarred Sumner
3ef55d10ae [bun run] Improve fish completions by adding a description 2021-11-05 01:15:09 -07:00
Jarred Sumner
fbb0342511 [CLI] Fix completions auto-installer for zsh 2021-11-01 21:23:47 -07:00
Jarred Sumner
0ba9784be2 [cli] Hardcode some paths to install for zsh 2021-11-01 06:10:13 -07:00
Jarred Sumner
1b474d4f97 [CLI] Spacing 2021-11-01 04:30:31 -07:00
Jarred Sumner
4467167f99 [cli] just open the directory, access is dumb 2021-11-01 04:27:44 -07:00
Jarred Sumner
173724b402 [CLI] Add zsh completions and auto-install completions 2021-11-01 03:43:27 -07:00
Jarred Sumner
64d3927879 [CLI] Add completions for Fish 2021-10-31 21:02:15 -07:00
Jarred Sumner
49ad70b11c [CLI] Print newline after --version 2021-10-31 16:19:28 -07:00
Jarred Sumner
0d0b769bcc Add -v shorthand for version 2021-10-31 16:19:15 -07:00
Jarred Sumner
ef94826f95 [CLI] Fix spacing (thanks @KishanBagaria) 2021-10-31 00:22:03 -07:00
Jarred Sumner
d79f34e960 Update cli.zig 2021-10-30 23:15:55 -07:00
Jarred Sumner
b6675dd0ab Explicitly check content type 2021-10-28 17:33:40 -07:00
Jarred Sumner
a44cb9708f New subcommand: bun upgrade. It upgrades bun to the latest version. 2021-10-28 05:34:38 -07:00
Jarred Sumner
fd27d403d7 Aligning text in terminals is tedious 2021-10-26 17:48:33 -07:00
Jarred Sumner
096d668d83 Bun is now a task runner as well 2021-10-26 17:24:09 -07:00
Jarred Sumner
49c5c32714 More spacing 2021-10-26 17:19:45 -07:00
Jarred Sumner
221b280856 spacing 2021-10-26 17:09:38 -07:00
Jarred Sumner
9ce38b86ab Fix edgecase with options loading attempting to create an output directory when it shouldn't 2021-10-26 16:18:51 -07:00
Jarred Sumner
0541cff2ad New subcommand: bun run run scripts in package.json really fast 2021-10-26 05:18:21 -07:00
Jarred Sumner
5691bf385b [.env loader] Add CLI flag to dump loaded environment variables as JSON 2021-10-25 17:04:32 -07:00
Jarred Sumner
38f83c50c4 Add flag for dumping the environment variables 2021-10-23 22:55:47 -07:00
Jarred Sumner
21b9884606 Support GitHub repositories, transform package.json to better fit Bun's usage 2021-10-16 21:33:05 -07:00
Jarred Sumner
7e159cb5cd ❇️ 2021-10-14 22:10:08 -07:00
Jarred Sumner
901d7d8759 Add doc explaining bun-create 2021-10-14 14:49:48 -07:00
Jarred Sumner
4b618f9ad1 bun create react app is almost done 2021-10-14 05:22:47 -07:00
Jarred Sumner
88a5e2d34d Add TLS 1.3 support, improve fetch() HTTPS performance 2021-10-13 00:27:35 -07:00