Jarred Sumner
33cf491fea
Add a userland way to hide stack frames
2022-12-02 19:33:59 -08:00
Jarred Sumner
8eddfc61a8
Add generic way to block on a promise
2022-12-02 01:56:12 -08:00
Jarred Sumner
7a158e68ae
Fix crash when macros return a Promise
2022-12-01 23:46:18 -08:00
Jarred Sumner
2621fbf206
Remove file blob caching
2022-12-01 23:42:57 -08:00
Jarred Sumner
bddf523ac9
Reduce memory usage in Bun.serve() by up to 3x ( #1569 )
...
* Update WebKit
* Use 5x less memory in Bun.serve()
* Update Dockerfile.devcontainer
* Update async-overhead.mjs
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-12-01 02:34:15 -08:00
Jarred Sumner
b631ea7d72
import everything from "bun" where possible
2022-11-29 02:42:56 -08:00
Jarred Sumner
a6cadce6f6
Fix process.env and Bun.env object spread
...
Fixes https://github.com/oven-sh/bun/issues/1512
2022-11-28 15:55:02 -08:00
Jarred Sumner
d21aee5143
Introduce Bun.FileSystemRouter API
2022-11-22 02:13:03 -08:00
Jarred Sumner
b230e7a73a
[fetch] Fix sporadic data corruption bug in HTTP client and add fast path
...
- This removes memory pooling from the HTTP client which sometimes caused invalid memory to be written to the response body.
- This adds a fast path for small HTTP/HTTPS responses that makes it a single memory allocation for the response body, instead of copying & allocating a temporary buffer
cc @Electroid
2022-11-19 22:34:57 -08:00
Jarred Sumner
7c7769a7c7
Fix GC crash when handling rejected promises uncovered via BUN_GARBAGE_COLLECTOR_LEVEL
2022-11-19 04:59:38 -08:00
Jarred Sumner
bb95f90a62
Introduce BUN_GARBAGE_COLLECTOR_LEVEL debug environment variable
2022-11-19 04:56:46 -08:00
Jarred Sumner
f3fb712051
Fix crash in process.env.FOO = bar that happened sometimes
2022-11-18 03:47:10 -08:00
Jarred Sumner
272e71fec2
Fix string encoding issue in JSC C API usages
2022-11-14 17:53:15 -08:00
Jarred Sumner
b18e4064a2
Make node streams faster ( #1502 )
...
* Make node streams faster
* Fix for macOS, improve performance, handle ref and unref
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-13 19:14:44 -08:00
Jarred Sumner
21bf3ddaf2
Redo how we poll pipes ( #1496 )
...
* Fix pipe
* Handle unregistered
* Fix failing test
2022-11-12 18:30:12 -08:00
Jarred Sumner
24a85f8de6
Improve error message
2022-11-11 00:20:42 -08:00
Jarred Sumner
9fccbf9364
Remove bun:wrap from stack traces
2022-11-09 22:44:45 -08:00
Dylan Conway
047a8d3f0d
Error.captureStackTrace implementation ( #1476 )
...
* capture stack trace formatting, tests
* fix callsite methods, stack formatting or undefined
* isNative, tests for callsite methods
* Update src/bun.js/bindings/ZigGlobalObject.cpp
* Update src/bun.js/bindings/ZigGlobalObject.cpp
* template and macros for visitchildren
* static strings, handle infinity and clamp stacktracelimit
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-11-09 00:37:57 -08:00
Jarred Sumner
c00359a521
[bun:test] Implement done callback with support for async functions
2022-11-07 04:49:10 -08:00
Jarred Sumner
072cd5a745
Fix UAF in canary
2022-11-07 00:50:32 -08:00
Jarred Sumner
e45f72e8e4
Automatically install npm packages when running a script in Bun's runtime ( #1459 )
...
* Update bundler.zig
* WIP
* Update README.md
* Update README.md
* wip
* Support running scripts without package.json
* Add `--no-auto-install` and `--prefer-offline` flags
* WIP
* wip
* Update headers-handwritten.h
* WIP
* Build fixes
* Fix UAF
* Update install.zig
* Must call .allocate()
* Micro-optimization: only call .timestamp() once per tick when installing packages
* Support progress bar
* Extend the timestamp for package staleness checks to 1 day
* Add `--prefer-latest`, `-i` CLI Flags
* Fix crash
* Support line text manually being set on an Error instance
* Add a few more fields for error messages
* Fix bug when counting 8 character strings in string builder
* Implement error handling for automatic package installs!
* Fix crash
* Make it say module when there's a slash
* Update module_loader.zig
* Ban dependency versions in import specifiers when a package.json is present
* Remove unused field
* Update README.md
* Update README.md
* Update README.md
* Update README.md
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-06 21:42:05 -08:00
Jarred Sumner
5c8cbf9806
Allow overriding node polyfills via BUN_OVERRIDE_MODULE_PATH
2022-10-27 18:25:43 -07:00
zhiyuan
28d71e2d9f
Fix lexer expected token error ( #1387 )
...
* fix: lexer expected token error
* fix: handle parse error through logs
2022-10-25 12:34:40 -07:00
Jarred Sumner
b3434a8b88
Add fd to SystemError and fix 2 cases with invalid tagged union
...
cc @sno2
2022-10-23 22:29:23 -07:00
Jarred Sumner
76652ac3ca
Add Web Crypto API ( #1384 )
...
* Add Web Crypto API
* Duplicate symbols
* Update c_cpp_properties.json
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-10-23 20:25:18 -07:00
Jarred Sumner
8d67870da4
Fix segfault when logging position object from failed nested import
2022-10-21 22:34:47 -07:00
Jarred Sumner
b50dc40fb8
Reload node:fs in development
2022-10-21 21:13:50 -07:00
Jarred Sumner
30d43b027f
Update javascript.zig
2022-10-18 13:48:50 -07:00
Jarred Sumner
693b1c9b23
Implement performance.timeOrigin
2022-10-18 13:36:44 -07:00
Jarred Sumner
1b1b96aff8
add more logging
2022-10-15 21:01:50 -07:00
Jarred Sumner
2292ef8d0e
Keep the process alive
2022-10-10 21:00:39 -07:00
Jarred Sumner
4dbbdb1671
Clean up how we reload entry point a little
2022-10-09 02:02:47 -07:00
Jarred Sumner
9294ef73b7
Update WebKit
2022-10-09 02:02:46 -07:00
Jarred Sumner
5c3ce875b2
Automatically support hot reloading with export default { fetch() }
2022-10-06 14:21:14 -07:00
Jarred Sumner
2c762f47c9
Add simple Hot Module Reloading to bun's runtime
2022-10-06 00:47:03 -07:00
Jarred Sumner
dbccfc2b26
Fix missing path/posix and path/win32
2022-10-05 18:07:41 -07:00
Jarred Sumner
3b4900193b
Fix setTimeout(0), improve test coverage slightly, reduce memory usage of timers
2022-10-01 16:02:29 -07:00
Jarred Sumner
bee72be733
Increase test coverage for request body streaming
...
There is still one memory issue to address
2022-10-01 01:13:27 -07:00
Jarred Sumner
6338413696
Remove extraneous calls to .ref()
2022-09-30 00:44:36 -07:00
Jarred Sumner
16929129f0
Clean up some of the event loop code
2022-09-28 23:34:03 -07:00
Jarred Sumner
5ef36f1b6f
Implement isatty in node:tty
2022-09-25 14:56:22 -07:00
Jarred Sumner
9833841101
wip
2022-09-25 13:14:23 -07:00
Jarred Sumner
2c1926993b
Faster Blob + begin to implement FileSink
2022-09-22 23:45:02 -07:00
Jarred Sumner
167948f5c3
Fix incorrect hostname logic
...
Fixes https://github.com/oven-sh/bun/issues/1261
2022-09-20 00:07:01 -07:00
Jarred Sumner
bd77afb2df
Fix issue with server not starting before exiting
2022-09-16 22:36:06 -07:00
Jarred Sumner
da6f954e0d
Fix process not exiting
2022-09-16 14:28:07 -07:00
Jarred Sumner
0ce709d96a
Make new HTTP client more stable
2022-09-16 00:53:03 -07:00
Jarred Sumner
7bfa302b75
Make crypto.getRandomValues() faster + fix > 1 byte/element typed arrays
...
Fix crypto.getRandomValues() with > 1 byte element typed arrays
Fixes https://github.com/oven-sh/bun/issues/1237
2022-09-14 04:12:32 -07:00
Jarred Sumner
c7874ed3fe
Fix issue with loading bundled entry points
2022-09-07 00:18:25 -07:00
Jarred Sumner
bac93e14ad
Fix bug with macros
2022-09-06 17:24:45 -07:00