Commit Graph

92 Commits

Author SHA1 Message Date
Jarred Sumner
2fc881540b Add a function for moving slices from a type 2022-03-26 20:35:56 -07:00
Jarred Sumner
8f93cc37d2 handle min ascii 16 2022-03-14 23:44:24 -07:00
Jarred Sumner
4ab4ae77ac Reference-counting for Blob and Headers 2022-03-14 01:31:56 -07:00
Jarred Sumner
44b0c8153a Source Maps for client-side errors & columns 2022-03-11 00:03:09 -08:00
Jarred Sumner
1422055304 [bun.js] Support sourcemaps! 2022-03-10 05:39:46 -08:00
Jarred Sumner
187fd9f61f woops 2022-03-10 00:44:13 -08:00
Jarred Sumner
69eeff1f76 console.log(<JSX>) support 2022-03-10 00:44:01 -08:00
Jarred Sumner
01b1fee284 69% perf improvement for long string literals 2022-03-09 04:00:19 -08:00
Jarred Sumner
d43a645535 source maps optimizations 2022-03-07 00:33:49 -08:00
Jarred Sumner
7c5c6cd519 source maps work for app code in bun dev! 2022-03-06 07:35:16 -08:00
Jarred Sumner
51fbbea1d3 upgrade zig 2022-03-04 00:20:22 -08:00
Jarred Sumner
806e406b67 Expose TextEncoder & TextDecoder globally 2022-02-24 00:15:17 -08:00
Jarred Sumner
3a0577ba96 Use an enum for Ref instead of a buggy packed struct
Fixes a printing bug with `Symbol`
2022-02-18 20:33:04 -08:00
Jarred Sumner
a0717e6fa7 Simple dead code elimination 2022-02-18 15:24:09 -08:00
Jarred Sumner
7653a2338e [bun.js] formatter 2022-02-14 04:28:25 -08:00
Jarred Sumner
a52a948a70 path.relative passes Node's tests (which also fixed bugs) 2022-02-02 23:33:37 -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
eb142a6be5 little test 2021-12-31 15:30:57 -08:00
Jarred Sumner
d7c69d3b78 Add unrolled case insensitive string comparison 2021-12-31 15:07:14 -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
3036cbe552 bun add and bun remove sorta works now. but not fast enough! 2021-12-16 19:18:51 -08:00
Jarred Sumner
c6dcc1cd9e [bun install] Lockfile saves. Starting to implement diffing 2021-12-16 19:18:51 -08:00
Jarred Sumner
da80830bc5 Mimalloc cleanup 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
6167d95167 Update string_immutable.zig 2021-12-16 19:18:51 -08:00
Jarred Sumner
d44abd8e4d Update string_immutable.zig 2021-11-04 18:41:40 -07:00
Jarred Sumner
fc59a32b63 [JS Parser] Decode JavaScript-like input as WTF-8 instead of UTF-8 2021-11-04 18:30:43 -07:00
Jarred Sumner
303a5ea898 [JSX] Fix regression with JSX entities 2021-11-03 19:29:07 -07:00
Jarred Sumner
bc5f99dc43 [internal] Tiny changes that will eventually make it easier to update zig 2021-11-01 04:04:18 -07:00
Jarred Sumner
417c4e0faa - Fix consistentcy issue with runtime hash
- Fix edgecases in strings.eqlComptime by simplifying the implementation
2021-10-28 19:03:49 -07:00
Jarred Sumner
4e889c7b47 Fix JSX unicode handling, slightly improve perf 2021-10-25 05:42:01 -07:00
Jarred Sumner
42c264bf7b Fix all known string encoding bugs 2021-10-25 00:52:07 -07:00
Jarred Sumner
213f361551 [internal] Handle allocation failure 2021-10-24 15:55:27 -07:00
Jarred Sumner
de01d581c1 Rewrite the CodepointIterator to fix some bugs 2021-10-23 04:58:20 -07:00
Jarred Sumner
58b196c583 rewrote most of the router 2021-10-20 04:18:29 -07:00
Jarred Sumner
3dc53c3d13 Starting to rewrite the router to fix some bugs and support catch-all + optional routes 2021-10-18 23:55:17 -07:00
Jarred Sumner
fd6d93292c more strings 2021-10-16 20:23:37 -07:00
Jarred Sumner
bbc1bcbed1 Support local templates 2021-10-14 18:55:41 -07:00
Jarred Sumner
f9dfa226a5 Fix bug in string eql check that was never used before 2021-09-27 20:53:57 -07:00
Jarred Sumner
66ed7c1f30 Basic macro impl 2021-09-26 00:14:15 -07:00
Jarred Sumner
2326a1e105 Fix the compiler errors 2021-09-21 23:28:05 -07:00
Jarred Sumner
9c109b744f Most of the ESM resolution algorithm (still untested) 2021-09-21 21:49:32 -07:00
Jarred Sumner
42c1d54b3f endsWithAny -> endsWithAnyComptime 2021-09-21 18:07:23 -07:00
Jarred Sumner
5e634cd612 Parse "exports" field from package.json (WIP) 2021-09-21 18:05:42 -07:00
Jarred Sumner
ab565f1a3c Fix parsing/printing unicode identifiers, switch to UTF-8 for prefilled strings, remove eagerly loading identifier_name 2021-09-20 22:37:22 -07:00
Jarred Sumner
90cd3bf4cb Fix how error lines with strings are highlighted 2021-09-20 18:04:45 -07:00
Jarred Sumner
359df89fe3 Fix "browser" map resolution, _almost_ fix symbol collisions, cache absolute paths for file entries 2021-09-12 23:40:12 -07:00
Jarred Sumner
fc907e2f81 current 2021-09-09 23:33:34 -07:00
Jarred Sumner
8a02ad48a5 fetc h!!! 2021-09-09 05:40:07 -07:00
Jarred Sumner
1d1a70c21f WIP error css
Former-commit-id: 36f03bf491cf274f68361e334a706538464ee271
2021-09-07 03:21:58 -07:00