Alex Lam S.L
136014b13a
fix bugs ( #1795 )
...
- segfault reading stacktrace from `fs/promises` rejections
- `Promise` rejection within `describe()` ends testing abruptly
- `FSSink.write()` incorrectly handles `objectMode`
- `FSSink.write()` throws wrong error codes
2023-01-14 16:50:55 -08:00
Jarred SUmner
168bb1427f
move more things
2023-01-13 11:38:16 -08:00
Jarred SUmner
996ef44c02
Split some things into more files and use bun namespace instead of import more
2023-01-13 11:27:16 -08:00
Jarred Sumner
1a4685213b
[bun:test] Support async in expect(async () => { await 1; }).toThrow()
2023-01-12 13:11:05 -08:00
Jarred Sumner
4a1470d26c
require.resolve in the runtime should use CommonJS export conditions
2023-01-11 14:22:31 -08:00
Alex Lam S.L
270b07e85e
use strings.hasPrefixComptime() ( #1755 )
2023-01-10 05:35:20 -08:00
Jarred Sumner
c30a110641
Cleanup code in expectToThrow
2023-01-09 03:25:41 -08:00
Alex Lam S.L
8a29c64302
clean up Promise handling ( #1697 )
2023-01-01 16:37:45 -08:00
Jarred Sumner
c0dd284136
Upgrade to latest Zig ( #1610 )
...
* @min and @max
* builtins and some trivial ones
* Most of them
* more
* more!
* More Progress
* wip
* Update tagged_pointer.zig
* Update http_client_async.zig
* Most of the iterable dir changes
* alright
* Remove usages of deprecated formatters
* 📷
* fmt
* Update shimmer.zig
* wip
* wip
* wip
* progress
* more
* Latest
* stuck on error
* latest
* workaround stage2
* wip
* Update string_immutable.zig
* wip
* Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings
* Fix build errors
* Fixup most of the test failures
* Fix `make headers`
* Fix "outside package path" error
* Fixup aligned alloc
* Add missing file
* linux
* More linux fixes
* use latest peechy
* Fix transpiler test failure
* Forgot about these
* Fixup test failure
* Update node-timers.test.ts
* [node:htt] Fix `undefined is not an object` error
Fixes https://github.com/oven-sh/bun/issues/1618
* Update http.exports.js
* Make this test less flaky
* fix hashes
* Fix hex formatting and zls issues
* Download zig version
* Update Dockerfile
* Update Dockerfile
* Update uws
* Update Dockerfile
* Set llvm version
* Update README.md
* Update uws
* Update Dockerfile
* Update io_linux.zig
* Update bun.zig
* Log output
* workaround strange @cInclude error
* Make ffi tests better
* Don't use cImport
* Update c.zig
* Update c-bindings.cpp
* call setOutputDir
* Update Dockerfile
* Use a longer name
* latest
* Update serve.test.ts
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Veikka Tuominen <git@vexu.eu >
2022-12-28 00:51:22 -08:00
Jarred Sumner
b746579863
[internal] Change HashMap implementation for storing symbols
2022-12-11 18:41:54 -08:00
Jarred Sumner
fe4f39fd17
Add AbortSignal.timeout
2022-12-02 20:48:57 -08:00
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