dave caruso
31ab56d362
Fix: console.log with class constructors ( #3602 )
...
* Fix console.log with class constructors
* oops
* fix it
* lol
* fix test
2023-07-11 12:48:19 -07:00
Ai Hoshino
e7afae305c
Merge branch 'main' into fix-http
2023-07-11 19:35:11 +08:00
Hanaasagi
17031936c8
small fix, check if the method has been reassigned.
2023-07-11 20:32:09 +09:00
dave caruso
b2c576bba2
fix "readable" event being emitted incorrectly ( #3475 )
...
* fix "readable" event being emitted incorrectly
* fix impl and add test
* changes
* asdfghj
* esm
2023-07-10 18:25:20 -07:00
Ciro Spaciari
4af4b508a1
feat(crypto) add getCurves ( #3598 )
...
* add getCurves
* add nodefallbacks
* update docs
* oops
2023-07-10 17:14:37 -07:00
Ai Hoshino
cc0d920018
Merge branch 'main' into fix-http
2023-07-10 21:12:00 +08:00
Hanaasagi
438d54f186
add tests
2023-07-10 22:04:39 +09:00
Jarred Sumner
963d4311e6
Fixes #3530 ( #3587 )
...
* Fixes #3530
* Handle OOM
* Add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-09 22:36:24 -07:00
Jarred Sumner
2f5e4fffe9
Implement process.memoryUsage() and process.cpuUsage() ( #3586 )
...
* Implement process.memoryUsage() and process.cpuUsage()
* Avoid mi_process_info
* Update bench
* Update Process.cpp
* fixup
* More tests + linux fixup
* Skip it for now since it seems less accurate
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-09 21:50:19 -07:00
Ai Hoshino
565d1689e9
fix metadata bits of uuid (randomUUID()) ( #3583 )
...
* fix uuid version
Close: https://github.com/oven-sh/bun/issues/3575
* add unittest
* small fix
* avoid unnecessary copying
2023-07-09 07:20:52 -07:00
Jarred Sumner
59570fe237
Handle case with TS decorators and export default anonymous class ( #3578 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-08 17:41:24 -07:00
Jarred Sumner
aa8b832ef6
Implement process.on("beforeExit", cb) and process.on("exit", cb) ( #3576 )
...
* Support `process.on('beforeExit')` and `process.on('exit')`
* [bun:sqlite] Always call sqlite3_close on exit
* Update process.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-08 14:26:19 -07:00
Jarred Sumner
fa632c3331
Fix bug with decorators not being generated in export default class ( #3577 )
...
* Fix bug with decorators not being generated in `export default class`
* Update decorator-export-default-class-fixture.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-08 04:00:55 -07:00
Jarred Sumner
fceacea37c
Unmark as TODO
2023-07-07 22:01:02 -07:00
Jarred Sumner
386d8b7836
Update test
2023-07-07 21:20:16 -07:00
Ai Hoshino
c0cf7b4501
fix decoding invalid UTF-8 input ( #3563 )
...
* fix decoding invalid UTF-8 input
Close: https://github.com/oven-sh/bun/issues/3562
* add unittest
2023-07-07 15:10:49 -07:00
Colin McDonnell
affd06d05c
Update types, partially fix typecheck ( #3551 )
...
* Update types
* Remove caret
2023-07-07 15:10:33 -07:00
Jarred Sumner
0ecdbf4793
[node:fs] read, write - support large numbers and BigInt ( #3556 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-07 00:33:43 -07:00
Dylan Conway
9bebb7f03d
add [dir] to default
2023-07-06 20:51:41 -07:00
Jarred Sumner
4d2c86fd5c
Add util.toUSVString
2023-07-06 17:08:01 -07:00
Ciro Spaciari
95ddfcc437
fix query without slash ( #3547 )
2023-07-06 12:01:16 -07:00
Jarred Sumner
3aaec120e7
Fixes #3512 ( #3526 )
...
* Fixes #3512
* Fix `clearTimeout` and `clearInterval` not cancelling jobs same-tick
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-05 03:46:10 -07:00
Jarred Sumner
a7f5a91cfb
Fixes #3520 ( #3522 )
...
* Fixes #3520
* Update html_rewriter.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-05 00:08:59 -07:00
Ciro Spaciari
3a93ddfab3
use sengrid account on nodemailer test ( #3517 )
2023-07-04 15:41:37 -07:00
Ciro Spaciari
979e999403
[tls] fix servername ( #3513 )
...
* fix servername
* add postgres tls tests
* update test packages
* add basic CRUD test
2023-07-04 15:40:26 -07:00
Ai Hoshino
c2755f770c
Add alias for readBigUInt64BE ... ( #3514 )
...
* Add alias for `readBigUInt64BE` ...
Close: https://github.com/oven-sh/bun/issues/3338
* add some tests for `readBigUint64BE` alias
* format code
2023-07-04 15:38:44 -07:00
Jarred Sumner
31f7f9e2dc
reduce count
2023-07-04 04:15:22 -07:00
Jarred Sumner
491e8f7e00
bump
2023-07-04 04:14:06 -07:00
Alex Lam S.L
3d0ffc48cb
[install] fix run-time module loading ( #3510 )
...
- fix version buffer confusion
- improve workaround to handle cached modules
fixes #3507
2023-07-04 02:09:58 -07:00
Jarred Sumner
bc7b5165be
less flaky
2023-07-04 01:51:09 -07:00
Jarred Sumner
3345a7fc3c
Allow zero length WebSocket client & server messages ( #3488 )
...
* Allow zero length WebSocket client & server messages
* Add test
* Clean this up a little
* Clean up these tests a little
* Hopefully fix the test failure in release build
* Don't copy into the receive buffer
* Less flaky
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-03 20:53:41 -07:00
Jarred Sumner
b26b0d886c
Fix napi bug
2023-07-03 15:57:10 -07:00
Ciro Spaciari
034577c9da
[fix] patch fs.watch sym link ( #3481 )
...
* oopsie
* add tests
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-03 14:08:49 -07:00
Ciro Spaciari
a7a01bd52f
[tls] add socket parameter, setServername and ALPNprotocols support ( #3457 )
...
* add socket parameter support
* refactor #socket
* add test and more fixs
* some fixes
* bump uws
* handlers fix
* more fixes
* fix node net and node tls tests
* fix duplicate port
* fix deinit on CallbackJobs
* cleanup
* add setImmediate repro
* add test to setImmediate
* this is necessary?
* fix prependOnce on native listener
* try to findout the error on nodemailer CI
* show error message
* Update bun.lockb
* prettier
* Use exact versions of packages
* add alpnProtocol support
* update
* emit error when connect fails on net.Socket
* format
* fix _write and cleanup
* fixup
* fix connect, add alpn test
* fix socket.io
* add socket parameter to TLSSocket
* add TLSSocket socket first parameter
* fixup and _start
* remove flask tests
* fmt
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-03 12:19:50 -07:00
Jarred Sumner
f0a795b568
Stub out useFakeTimers and useRealTimers
2023-07-02 22:42:13 -07:00
Jarred Sumner
aa38e51afb
Support mocking new Date() & Date.now() in bun:test ( #3501 )
...
* Support changing the time
* Bump WebKit
* Update bun.lockb
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 22:09:50 -07:00
dave caruso
c21fadf9bc
set content-length 0 in some cases ( #3503 )
2023-07-02 20:24:15 -07:00
Jarred Sumner
eb90ce50c3
Use fast path for Base64 in btoa ( #3504 )
...
* Use fast path for Base64 in `atob`
* Fix utf16, crash on linux
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 20:16:52 -07:00
Jarred Sumner
c3f8593f8c
[node:buffer] Implement isUtf8 and isAscii ( #3498 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 18:06:21 -07:00
dave caruso
4cbda049e9
fix zero length env var ( #3496 )
2023-07-02 10:12:31 -07:00
Jarred Sumner
b05879e9e2
Fixes #3489 ( #3490 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 01:06:40 -07:00
Jarred Sumner
8001038376
Use exact versions in tests
2023-07-01 22:43:59 -07:00
Jarred Sumner
617226e584
Make this test less flaky
2023-07-01 21:10:43 -07:00
Jarred Sumner
c72c82b970
Make this test less flaky
2023-07-01 21:08:26 -07:00
Jarred Sumner
af46a8ded1
Make this test less flaky
2023-07-01 17:38:19 -07:00
Jarred Sumner
f00e2be548
Use BunString in SystemError ( #3485 )
...
* Use `BunString` in SystemError
* Use Bun::toStringRef when we will de-ref strings
* Move `napi_create_error` to C++ to support `code` being a Symbol potentially
* Update blob.zig
* Make this test less flaky
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-01 17:37:44 -07:00
Ai Hoshino
4720fa1207
[WIP]Fix calling Buffer.toString with (offset, length, encoding) ( #3467 )
...
* Allow `toString` to be called with `(offset, length, encoding)`.
Close : #3085
* handle undefined value
* add tests for buffer.xxxSlice
* fix parameters
* fix offset and length
2023-07-01 17:01:52 -07:00
Dylan Conway
c033d55c47
skip private class fields ( #3484 )
2023-07-01 14:38:38 -07:00
Jarred Sumner
c794ea7ea7
Add test
2023-07-01 13:31:12 -07:00
Alex Lam S.L
02f707f231
[jest] fix lifecycle hook execution order ( #3461 )
...
* [jest] fix lifecycle hook execution order
* strip `std.debug.assert()` from release build
2023-07-01 11:44:04 -07:00