Ciro Spaciari
c4f062dbf4
clean tables before testing ( #3721 )
...
* clean tables before testing
* typo
2023-07-21 16:13:04 -07:00
Dylan Conway
218958dbd1
Update async_hooks.node.test.ts
2023-07-20 21:13:11 -07:00
dave caruso
9c85465a58
fix process.exit status code handling ( #3714 )
2023-07-20 19:16:56 -07:00
Dylan Conway
9ad330d917
Update process.test.js
2023-07-20 15:32:20 -07:00
Jarred Sumner
ef89f03de6
Update text-decoder.test.js
2023-07-20 15:26:06 -07:00
Julian
c383c6cd81
Pass constructor arguments to TextDecoder ( #3692 )
...
* Make TextDecoder constructor use options parameter
The constructor now actually sets TextDecoder properties using the
options parameter.
* Defer decoder allocation to end of constructor
* Verify types of TextDecoder options
* TextDecoder throw TypeError on failure
* Tidying
2023-07-20 14:50:54 -07:00
Ciro Spaciari
99da0ae54b
fix start delay on Worker ( #3707 )
...
* fix start delay on Worker
* fmt
* add delay test
2023-07-20 14:49:10 -07:00
Jarred Sumner
0b365781a8
Bump version to Bun v0.7.0
2023-07-19 23:57:41 -07:00
Jarred Sumner
dd46c11273
Support streams in response.formData() & request.formData, introduce Bun.readableStreamToFormData() ( #3697 )
...
* codegen
* FormData.from
* Fixes #3225
* Introduce `Bun.readableStreamToFormData`
* Update bun.d.ts
* Add examples
* add
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-19 23:12:06 -07:00
Jarred Sumner
ed8be46a7b
Inlinebun object from workers
2023-07-19 22:53:28 -07:00
dave caruso
9b6dc49575
Implement AsyncLocalStorage ( #3089 )
...
* work to get async local storage working.
* a
* a
* everything but queueMicrotask
* sdfghj
* .
* finish
* tests
* test
* ok
* done
* im so stupid
* Upgrade WebKit
* refactor
* refactor
* changes requested
* oops
* cool
* fix runInAsyncScope
2023-07-19 17:20:00 -07:00
Ciro Spaciari
f63398ffe4
update root certificates and add tls.rootCertificates ( #3688 )
...
* implement tls.rootCertificates
* add test
* bump uws/usockets
* bump uws + .len on certs
2023-07-19 16:02:29 -07:00
Ciro Spaciari
2fbf73535c
fix createDecipheriv ( #3680 )
...
* fix createDecipheriv
* fix createDecipheriv iv and password validations
2023-07-19 16:01:36 -07:00
Ciro Spaciari
112f01ca61
feature(constants) add constants/node:constants module and tests(prisma) use prima 5.0.0 + use same connection for postgres, add prisma mssql (disabled for now) ( #3672 )
...
* use prima 5.0.0 + use same connection for postgres
* change mongodb test URL
* constants module + mssql prisma test (disabled)
2023-07-18 16:09:18 -07:00
Ciro Spaciari
49231b2cb9
patch checkServerIdentity ( #3671 )
2023-07-18 16:03:05 -07:00
Alex Lam S.L
1790357021
[jest] execute lifecycle hooks on empty blocks ( #3663 )
...
fixes #3494
2023-07-18 04:54:24 -07:00
Jarred Sumner
71f1aa1802
Enable postgres prisma test
2023-07-17 23:17:06 -07:00
Jarred Sumner
b760d1da30
Fix potential crash in process.dlopen()
2023-07-17 23:02:33 -07:00
Ciro Spaciari
13b54fbdb8
[tls] General compatibility improvements ( #3596 )
...
* wip
* subjectaltname
* more progress
* bindings
* fmt
* getCert/getPeerCertificate
* fix checkServerIdentity
* fix checkServerIdentity
* add a lot of TLSSocket functions
* getEphemeralKeyInfo fix and comment
* add alternative for getEphemeralKeyInfo
* add get session and set session
* fix isSessionReused
* get back the raw data for MSSQL
* fixeup
* fixup getSession + tests
* fix doc + fmt
* getFinished/getPeerFinished
* codegen
* fixup
* revert webkit
* more fixes
* ssl helper + revert test oops
* asserts
2023-07-17 19:39:09 -07:00
Alex Lam S.L
570a44d73a
workaround readable-stream compatibility ( #3626 )
...
- update `bun link` tests
- update `tests/bun.lockb`
- drop unused import in test
2023-07-17 20:05:01 +03:00
Jarred SUmner
5218a33fb6
Fix flaky process test
2023-07-17 04:51:26 -07:00
Jarred Sumner
99de971359
Fix incorrect name
2023-07-17 04:21:00 -07:00
Jarred Sumner
6ca20424d6
Fix crash in console.log(urlSearchParams) on a URLSearchParams object with a lot of keys
2023-07-17 04:18:43 -07:00
Jarred Sumner
edeb3b48e8
Fix test
2023-07-16 22:46:06 -07:00
Jarred Sumner
7917ebd58f
Fixes base64url encoding for crypto ( #3654 )
...
* Fixes base64url encoding for crypto
* 🍏
* Update nodejs-apis.md
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-16 22:42:19 -07:00
Jarred Sumner
209dc981c0
Implement Workers ( #3645 )
...
* copy files
* format
* options
* Introduce `Worker`, `onmessage`, `onerror`, and `postMessage` globals
* Stub `Worker.prototype.ref` & `Worker.prototype.unref`
* Update web_worker.zig
* Worker works
* Add "mini" mode
* add wakeup
* Partially fix the keep-alive issue
* clean up refer behavior
* Implement `serialize` & `deserialize` in `bun:jsc` & add polyfill for `node:v8`
* Types & docs
* Update globals.d.ts
* Add mutex
* Fixes
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-16 21:15:24 -07:00
Dylan Conway
c39c11e101
structured clone ( #3637 )
...
* copy `SerializedScriptValue`
* format
* make `SerializedScriptValue` compile
* add `transfer` option
* tests
* serialize/deserialize blobs
* tests for blobs
* serialize/deserialize file blobs
* more tests
* small cleanup
* format
* small changes + serialize offset
* slice helper
* map and set test
2023-07-14 19:37:22 -07:00
Ashcon Partovi
9eb8eea2a8
Implement ping(), pong(), terminate() for WebSocket client and server ( #3257 )
2023-07-13 09:39:43 -07:00
Tiramify (A.K. Daniel)
0631f87866
feat(bun/test): Implement "bail" option for "bun test" ( #3253 )
...
* Implement bun test --bail
* Fixes
* move printSummary() (more readable)
* Fixes 2
* idk why it got deleted
* Fixes 3
* fmt this better
* Update test_command.zig
* Fix "0 files"
* track number of files so bailing out early prints the right number
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-07-12 13:41:46 -07:00
Jarred Sumner
5ea32a976e
Update process.test.js
2023-07-11 19:49:41 -07:00
Jarred Sumner
c5f2280489
Implement process.kill and process._kill
2023-07-11 19:06:01 -07:00
Jarred Sumner
2106e1d7f6
Tests
2023-07-11 17:48:13 -07:00
Jarred Sumner
fd4c8fb871
Merge branch 'jarred/fix-http-compression'
2023-07-11 13:09:37 -07:00
Dylan Conway
5c8726d602
process signal events ( #3569 )
...
* signal events
* simple tests
* ignore SIGSTOP
* better tests
* use `EventEmitter`
* use `Bun__getDefaultGlobal`
* progress
* don't use 'Bun__getDefaultGlobal`
* fix tests
* remove signals from map
* update tests
* don't overwrite event emitter methods
* avoid two lookups
* use `std::once`
* releaseEarly()
* Remove signal handler after use
* Update call-raise.js
* Create process-signal-handler.fixture.js
* Don't register duplicates
* Add missing lock
* another test
* update test
* revert some changes
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-11 12:48:46 -07:00
Dylan Conway
ae7bc37e94
fix iterating stack trace ( #3600 )
...
* `i + 1` and remove `defer`
* a test
* fix test
2023-07-11 12:48:32 -07:00
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
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
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
Jarred Sumner
4d2c86fd5c
Add util.toUSVString
2023-07-06 17:08:01 -07:00