Jarred Sumner
abf1239976
feat: Support async generator functions in Response and Request for bodies ( #8941 )
2024-02-16 20:02:22 -08:00
argosphil
e2c92c69b5
fix: make sure Bun.sleep(Date) doesn't resolve prematurely ( #8950 )
...
* fix: make sure Bun.sleep(Date) doesn't return prematurely
Fixes #8834 .
This makes Bun.sleep(new Date(x)) fulfill its promise only when
Date.now() >= x.
* resolve test now #8834 is fixed
11 ms is in fact the right limit.
---------
Co-authored-by: John-David Dalton <john.david.dalton@gmail.com >
2024-02-16 18:32:37 -08:00
Tony Zhang
135de4dff7
fix(sqlite): enable math functions ( #8944 )
...
* fix(sqlite): enable math functions
* fix(sqlite): enable math function flag in CMakeLists
* test: add math function tests
---------
Co-authored-by: Georgijs <48869301+gvilums@users.noreply.github.com >
Co-authored-by: John-David Dalton <john.david.dalton@gmail.com >
2024-02-16 18:24:55 -08:00
Dmitri
fe8ec29f1f
Add fs.exists[util.promisify.custom] ( #8936 )
...
* Add fs.exists[util.promisify.custom]
fs.exists doesn't follow the error-first-callback convention, so it
needs a custom implementation for util.promisify.
* Simplify
---------
Co-authored-by: John-David Dalton <john.david.dalton@gmail.com >
2024-02-16 18:24:04 -08:00
John-David Dalton
17e01a284b
Add url unit tests with failing tests TODO commented-out ( #8933 )
...
Co-authored-by: Georgijs <48869301+gvilums@users.noreply.github.com >
2024-02-16 11:32:08 -08:00
Zack Radisic
2b56451a11
Shell changes/fixes ( #8846 )
...
* Fix #8403
* Throw on error by default
* Add the shell promise utilities to `ShellOutput` and `ShellError`
* Fix tests
* [autofix.ci] apply automated fixes
* Fix memleak
* [autofix.ci] apply automated fixes
* Woops
* `Bun.gc(true)` in fd leak test
* fd leak test should check if `fd <= baseline`
* wtf
* oob check
* [autofix.ci] apply automated fixes
* Fix double free
* Fix #8550
* increase mem threshold for linux
* Requested changes and make not throw on by default
* [autofix.ci] apply automated fixes
* more requested changes
* Do destructuring in function definition
* delete
* Change shell output test to enable throwing
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-16 05:01:55 -08:00
Zack Radisic
0e2a3a0197
fix(glob): fix patterns starting with * #8817 ( #8847 )
...
* Fix #8817
* [autofix.ci] apply automated fixes
* yoops
* fix broken stuff from merge
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-16 04:12:12 -08:00
Zack Radisic
ebaeafbc89
feat: More robust and faster shell escaping ( #8904 )
...
* wip
* Proper escaping algorithm
* Don't use `$` for js obj/string referencs
* [autofix.ci] apply automated fixes
* Changes
* Changes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-02-16 04:09:34 -08:00
Meghan Denny
2b335d72e7
windows: make websocket-client.test.ts pass ( #8935 )
2024-02-16 04:07:06 -08:00
argosphil
c920919c42
fix: distinguish getters and setters in Bun.inspect() ( #8858 )
...
* Bun.inspect: distinguish [Getter], [Setter], [Getter/Setter]
fixes #8853
NOTE: this modifies files which were auto-generated at one point, but
which are now maintained as part of the Bun sources.
* test for #8853
---------
Co-authored-by: Georgijs <48869301+gvilums@users.noreply.github.com >
2024-02-15 13:09:13 -08:00
dave caruso
a2ae984c3e
disable some tests that are failing in ci ( #8922 )
...
* try to make ci green
* fix a crash in debug mode
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-15 07:09:44 -08:00
dave caruso
e8dff7b029
chore: random acts of cleanup to tests ( #8915 )
...
* random acts of cleanup to tests
* nerf the watchFile test, is CI slow?
* more things
* [autofix.ci] apply automated fixes
* a
* remove a log
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-14 22:40:50 -08:00
argosphil
0714b3a06b
fix: throw on gunzipSync/inflateSync error ( #8901 )
...
* fix: zlib functions should throw an error if appropriate
Fixes #8887 .
* Tests for #8887
* fix: drive-by fix to avoid unreachable code being reached on error
2024-02-14 18:01:05 -08:00
James Anderson
00cc2eae67
Fix tsconfig path longest prefix matching ( #8892 )
2024-02-14 08:23:45 -08:00
7f8ddd
05d33c39cd
fix: Add charset to text/css mime type ( #8825 )
...
* Add charset to text/css mime type
Standard: https://www.iana.org/assignments/media-types/text/css
More info: https://stackoverflow.com/questions/70643383/which-mime-types-contain-charset-utf-8-directive
Fixes the warning in Edge that says to include utf-8 when Bun returns a stylesheet.
* Add test
* Change "content type" to "mime-type"
2024-02-13 20:47:02 -08:00
dave caruso
04a6ebaa17
fix: allow opening win32 device files in node:fs and bun.file ( #8801 )
...
* support opening device files in node:fs and bun.file
* tidy tests
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-02-13 18:24:14 -08:00
Ciro Spaciari
d0b6218bdf
fix(fetch) redirects bodies should be handled ( #8874 )
...
* redirects bodies should be handled
* [autofix.ci] apply automated fixes
* Update src/http.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-02-12 21:14:00 -08:00
Meghan Denny
8afcb39055
windows: more tests are passing ( #8873 )
2024-02-12 17:52:14 -08:00
Zack Radisic
aca936515a
Make glob work for windows ( #8382 )
...
* Fix some related to paths and string encoding
* Fix relative paths with glob
* Fix scan tests
* Fix glob scan test
* [autofix.ci] apply automated fixes
* Fix leak test
* clean up post merge
* [autofix.ci] apply automated fixes
* clean up glob getcwd
* remove old struct
* fix open on posix
* feat: Add win32 path.toNamespacedPath and align rest of node:path with Node (#8469 )
* restore zls file change
* [autofix.ci] apply automated fixes
* switch to using fs.top_level_dir in glob
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Georgijs Vilums <georgijs.vilums@gmail.com >
Co-authored-by: Georgijs Vilums <georgijs@bun.sh >
Co-authored-by: John-David Dalton <john.david.dalton@gmail.com >
Co-authored-by: Georgijs <48869301+gvilums@users.noreply.github.com >
2024-02-12 16:30:58 -08:00
John-David Dalton
96e7227087
feat: Add win32 path.toNamespacedPath and align rest of node:path with Node ( #8469 )
2024-02-12 14:27:26 -08:00
Ciro Spaciari
90fd322b5c
fix timer tests ( #8804 )
2024-02-09 14:00:47 -08:00
cirospaciari
58d22b063c
Unmark tests that are now passing on Windows
2024-02-08 23:02:32 -03:00
dave caruso
2d7df726fd
fix: get bun build working on window ( #8712 )
...
* work on bundler
* a
* YAAAAYYAYAYAYYAYA
* get some more bundler tests working
* Update src/bundler/bundle_v2.zig
* rev
* ok
* i converted the cmakelists into LF
* personal review
* we didnt win
* okey they pass
* revert :(
* a
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-02-08 17:56:26 -08:00
cirospaciari
db85e04ade
Unmark tests that are now passing on Windows
2024-02-08 22:19:31 -03:00
Ciro Spaciari
c2936b205d
[windows] fix(fetch) file:///, keepalive and tests on Windows ( #8784 )
...
* fix file:/// on windows
* skip fifo test
* fix keepalive
* fixes
* avoid std.os.getcwd on POSIX
2024-02-08 17:11:06 -08:00
dave caruso
8680641c23
make process.test.js pass ( #8798 )
2024-02-08 16:54:09 -08:00
Ciro Spaciari
e77db8ebac
[windows] fix which ( #8791 )
...
* fix which
* [autofix.ci] apply automated fixes
* refactor
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-08 15:44:56 -08:00
Ashcon Partovi
8624a86eba
Unmark tests that are now passing on Windows
2024-02-08 13:42:13 -08:00
Ciro Spaciari
5df59cb02b
[windows] fix(fs.watch) ( #8746 )
...
* clean fixes
* [autofix.ci] apply automated fixes
* more tests passing
* EPERM instead of AccessDenied
* [autofix.ci] apply automated fixes
* fix test on windows
* cleanup
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-07 15:44:07 -08:00
Jarred Sumner
b61282e290
Fix async module mocking ( #8769 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-02-07 15:40:10 -08:00
Georgijs
a9a4bbcd24
remap 0.0.0.0 to localhost on windows ( #8770 )
2024-02-07 15:17:24 -08:00
Georgijs
2bd4fe578e
Make HTTP shutdowns more robust, speed up connection to localhost ( #8730 )
...
* http use arraylist to handle shutdowns
* on windows use wsaconnectbyname to speed up localhost connections
* use arbitrary port
* close socket on setsockopt error
* use null timeout in wsaconnectbyname
* Update src/http.zig
* fix zig compile
* update hostname on linux
* [autofix.ci] apply automated fixes
* fix getpeername failing after connecting with socket
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-07 12:19:41 -08:00
Georgijs
d672309547
c-ares dns on windows ( #8737 )
...
* c_ares dns on windows works
* handle errors
* fix invalid hostnames test
2024-02-07 16:26:53 -03:00
argosphil
e171f04ce6
Fix ref-counting of Bun.file(0) etc. ( #8687 ) ( #8741 )
...
* Test for #8687
* Fix reference counting of Bun.file(0) etc. (#8687 )
Fixes #8687 .
2024-02-06 18:11:25 -08:00
Ciro Spaciari
651d5699a0
[windows] fix(fs.watchFile) ( #8735 )
...
* fix fs.watchFile
* oopsie
* fix bigint and persistent
* use repeat to make watchFile tests more reliable
* [autofix.ci] apply automated fixes
* follow the pattern
* add increment
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-06 18:10:28 -08:00
Meghan Denny
d0d4d8bf85
windows: enable more passing tests ( #8711 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-02-06 16:08:49 -08:00
Ciro Spaciari
53814dda00
[windows] fix(http2) ( #8734 )
...
* fix win http2
* add includes
* cleanup
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-06 15:37:39 -08:00
Jarred Sumner
972a7b7080
skip some tests
2024-02-05 19:51:08 -08:00
dave caruso
e366921e90
fix(windows): make fs.symlink normalize forward slashes to backslashes ( #8710 )
...
* fix fs.symlink()
* update comment
* .
* add todo
2024-02-05 16:09:50 -08:00
Ashcon Partovi
264142e756
Add isWindows and related helpers to test harness
2024-02-05 12:47:52 -08:00
Jarred Sumner
1f0c1c81e9
Fix test
2024-02-04 00:42:40 -08:00
Jarred Sumner
1009b07807
Implement server.unref() and server.ref() ( #8675 )
...
* Implement server.ref() and server.unref()
* Update dns_resolver.zig
* Update server.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-02-03 23:57:34 -08:00
Georgijs
1a695f13bf
Async file copying on windows ( #8649 )
...
* rework and simplify file opening in windows
* fix tests
* symlink tests pass
* update error handling
* remove outdated normalization check
* fix mac build
* apply suggested fixes
* fix path tests
* remove debug print
* fix windows compile
2024-02-03 22:33:35 -08:00
Jarred Sumner
c75e768a6c
Assert we drained the microtask queue since the last time we called into JavaScript ( #8646 )
...
* Add checks that we drain the microtask queue whenever we call into JavaScript
* Drain microtasks in more places
* Tweak assertions for entering/exiting the event loop
* Drain more
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-02-03 07:40:15 -08:00
Dylan Conway
7d86f9e590
fix(test): strict equals and deleted properties ( #8663 )
...
* deleted properties size
* dont need count if structure id is eql
* more test
* fix slow path
* oops forgot this
2024-02-03 06:35:13 -08:00
Jarred Sumner
2c0c562d1d
Fixes #4746 ( #8661 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-02-03 03:38:59 -08:00
Jarred Sumner
683a03d8c7
Set a default value for Error.prepareStackTrace to align with Node ( #8657 )
...
* Set a default value for `Error.prepareStackTrace` to align with Node
* Ensure we never set negative line/column numbers in error.stack (#8656 )
* fix(windows): fix macros (#8653 )
* fix macro tests
* path format options
* remove failing comment
* fix buffer toString memcpy length
* Ensure we never set negative line/column numbers in error.stack
---------
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2024-02-03 02:04:58 -08:00
Dylan Conway
5934b17f00
fix(windows): fix a few more tests ( #8644 )
...
* fix regression tests
* fix fs.test.ts bigintstats
* enable transpiler cache lol
* remove failing
* fix filesystem router
* update
* fix run-unicode test
* update comment
* add updated snapshot
* fix remaining node-module-module tests
* fixup
* [autofix.ci] apply automated fixes
* fix tty tests
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-02-02 18:58:16 -08:00
dave caruso
647b15e4f3
fix(windows): initialize uv allocators earlier ( #8631 )
...
* uv loop is thread local
* hi
* stuff so far
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-02-02 00:18:28 -08:00
Meghan Denny
3a7df3f6c7
windows: add more passing test ( #8615 )
2024-02-01 13:45:47 -08:00