Jarred Sumner
05716ff39b
Stat largefile test ( #3870 )
...
* Add test for stat on a large file
* Update fs.test.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 18:55:04 -07:00
Jarred Sumner
97009a49bd
Mark broken test as todo
2023-07-28 16:59:46 -07:00
Dylan Conway
d432448ac8
fix types and add message channel/port gc test
2023-07-28 16:55:49 -07:00
Dylan Conway
d614fdfaac
MessageChannel and MessagePort (#3860 )
...
* copy and format
* copy
* copy
* cleanup
* some tests
* spellcheck
* add types
* don't lock getting contextId
* array buffer test
2023-07-28 16:44:28 -07:00
Jarred Sumner
0a4e476a7c
mark tests as todo
2023-07-28 16:24:22 -07:00
Vlad Sirenko
9078b1286d
add fork to child_process ( #3851 )
...
* add fork to child_process
* fix export
* add test to child_process method `fork`
* fmt fork
* remove only from test
2023-07-28 16:00:43 -07:00
Tiramify (A.K. Daniel)
242d8655d8
feat(bun/test): Impl. expect().pass() & expect().fail() ( #3843 )
...
* Impl. pass & fail
* fix
* fix 2
* smol
2023-07-28 15:46:44 -07:00
Ai Hoshino
9b91e3c1a2
fix the chunk boundary (node:stream:createReadStream) ( #3853 )
...
* fix the slice boundary.
Close : #3668
* Add more boundary test case.
* fix end is 0.
2023-07-28 15:44:33 -07:00
Jarred Sumner
7a1ebec26f
Support file: URLs in fetch ( #3858 )
...
* Support file: URLs in `fetch`
* Update url.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 15:44:05 -07:00
Ciro Spaciari
e7c80b90b8
fix(tls) exposes native canonicalizeIP and fix rootCertificates ( #3866 )
...
* exposes native canonicalizeIP
* remove unintended duplicate
* add tests
* add tests for debug builds
* add rootCertificates test and fix len
* just randomize test ids on prisma
* remove work around and bump usockets with the actual fix
* fix case
* bump uws
2023-07-28 15:43:15 -07:00
Jarred Sumner
e110ccf84d
Fixes #3795 ( #3856 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-28 01:33:00 -07:00
Jarred Sumner
70b9bf743c
Add Bun.isMainThread
2023-07-27 22:28:28 -07:00
Jarred Sumner
f3153fbee9
Uncomment test
2023-07-27 20:46:25 -07:00
Ciro Spaciari
7fa71dd032
Resolve watch directories outside main thread + async iterator and symlink fixes ( #3846 )
...
* linux working pending tests with FSEvents
* add more tests, fix async iterator
* remove unnecessary check
* fix macos symlink on directories
* remove indirection layer
* todos
* fixes and some permission test
* fix opsie and make prisma test more reliable
* rebase with main
* add comptime check for macOS
* oops
* oops2
* fix symlinks cascade on FSEvents
* use JSC.WorkPool
* use withResolver, createFIFO and fix close event on async iterator
* remove unused events
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-07-27 19:23:54 -07:00
Jarred Sumner
007f357495
Make readFile() async ( #3850 )
...
* less leaky
* async readfile
* Update types.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 16:55:49 -07:00
Jarred Sumner
704ee13392
Make readdir() async, fix crash in large directory trees ( #3838 )
...
* Fix unsafe GC behavior on large arrays returned by fs
* Fix crash in large arrays of strings
* async readdir
* Add tests for large number of files returned by readdir
* Move this down
* Fix encoding edgecase in path.join
* Async stat & lstat
* add test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-27 04:27:09 -07:00
Jarred Sumner
86633e0af4
Start time performance improvements to build tools ( #3797 )
...
* Make os.cpus() faster on Linux
* Fix crash
See https://github.com/ziglang/zig/issues/16540
* Handle watcher_count == 0
* Add assertion
* Clean up lifetimes of fs watcher a little
* ✂️
* Use `errdefer`
* Make the error better
* Make os.cpus() more lazy
* Please don't translate-c on the entire C standard library
* immediately closing works correctly is still bug
* ops
* fmt+fixeup
* add back verbose
* free instead of destroy
* remove destroy option for watcher tasks
* flush verbose and add debug log
* fixup files
* use log for debug
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: cirospaciari <ciro.spaciari@gmail.com >
2023-07-26 21:35:49 -07:00
Ai Hoshino
0297cb1527
fix the encoding of dirname's return value. ( #3799 )
2023-07-25 05:49:48 -07:00
Ai Hoshino
130079b558
fix some cases in the dirname function. ( #3785 )
...
Close : #3782
2023-07-25 00:41:22 -07:00
Jarred Sumner
e402159df1
test gardening
2023-07-24 19:36:53 -07:00
dave caruso
8a0152e129
Merge import.meta.require and require to be the same thing ( #3732 )
...
* Merge import.meta.require and require to be the same thing
* support `require` and BunPlugin (runtime plugin)
* plugins
* unused code
* revert launch.json
2023-07-24 19:32:04 -07:00
Jarred Sumner
1f1d0bfcfb
Make this test less flaky
2023-07-24 19:18:07 -07:00
Jarred Sumner
4ebf858f43
Less flaky
2023-07-24 19:14:41 -07:00
Jarred Sumner
e1a59d355a
slow test is allowed to be slow
2023-07-24 19:11:53 -07:00
Jarred Sumner
b02f097f4d
Fix bugs with connecting to localhost ( #3758 )
...
* Fix bugs with connecting to localhost
* Update uws
* More logs
* Allow not setting a hostname
* Make server.hostname & server.protocol faster
* Fixup
* normalize listening host
* Fix test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-23 05:13:48 -07:00
Alex Lam S.L
07e08b086a
[install] improve workspace substitution of npm dependencies ( #3754 )
...
- respect semver ranges
2023-07-22 20:05:24 -07:00
Jarred Sumner
bfaf095c2e
Fixes https://discord.com/channels/876711213126520882/1131175053409656833/1131175053409656833
...
@tr1ckydev this fixes the issue you ran into, see the diff for an example usage of a Bun.plugin that makes a network request on import.
2023-07-22 16:59:54 -07:00
dave caruso
b17b61b8c6
fix path.format for vite build ( #3734 )
...
* fix path.format for vite
* Update path.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-22 16:45:45 -07:00
Ai Hoshino
04d19d6f6a
Fix writeFileSync when the mode is greater than 0o777. ( #3747 )
...
Close : #3740
2023-07-22 07:10:36 -07:00
Jarred Sumner
3418feb2e9
Fixes #3744
2023-07-22 04:33:54 -07:00
Jarred Sumner
c6a3467625
Unified event loop ( #3741 )
...
* Unified event loop
* Update WebKit, add test for es-module-lexer
* Update README.md
* Use async wasm
* Explicitly set whether concurrenttask should be deinit'd
* Update package.json
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-22 04:31:58 -07:00
Jarred Sumner
636cec03e1
Use WebKit's URL parser in fetch() and bun install ( #3730 )
...
* Use WebKit's URL parser in fetch() and `bun install`
* Allocate less memory
* Fix test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-21 23:27:28 -07:00
Ai Hoshino
1ecd9f8a18
handle latin1 in Bun__encoding__toString. ( #3739 )
...
Close : #3738
2023-07-21 22:01:26 -07:00
Alex Lam S.L
311dffc690
improve test ( #3731 )
...
- minor build diffs
2023-07-22 02:42:30 +03:00
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