Commit Graph

8951 Commits

Author SHA1 Message Date
Jarred Sumner
c8a5fc3dcf Merge branch 'main' into jarred/process-change 2024-02-17 02:44:16 -08:00
Risu
c34bbb2e3f fix: organize tsconfig (#8654)
* fix: organize tsconfig

* fix: remove unnecessary comments in tsconfig

* docs: revert changes on comments and md text

* docs: fix case
bun-v1.0.27
2024-02-16 22:19:31 -08:00
Jarred Sumner
f9b12300d4 Make shell errors slightly better (#8945)
* Make shell errors slightly better

* Update shell.ts

* Fix the failing tests

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-02-16 20:43:42 -08:00
Jarred Sumner
abf1239976 feat: Support async generator functions in Response and Request for bodies (#8941) 2024-02-16 20:02:22 -08:00
Georgijs Vilums
8d5e528aa8 Merge branch 'jarred/process-change' of https://github.com/oven-sh/bun into jarred/process-change 2024-02-16 19:08:06 -08:00
Georgijs Vilums
5b450452a9 partially fix PipeWriter on windows (WIP) 2024-02-16 19:08:03 -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
Ashcon Partovi
27eed543ef Add .env to .gitignore 2024-02-16 14:13:19 -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
Georgijs Vilums
664baba714 add new test to bun write #8695 2024-02-16 10:33:05 -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
guest271314
dcda49a271 Missing toWeb (#8937)
https://github.com/oven-sh/bun/issues/3927
2024-02-15 21:41:46 -08:00
John-David Dalton
d49cb0b98e chore: Add PrivateRecursive type annotations (#8291) 2024-02-15 17:35:08 -08:00
dave caruso
bb31e768de docs: update windows build instructions
this removes the WSL codegen step as it is no longer supported, and some other notes i am aware of now
2024-02-15 16:54:03 -08:00
autofix-ci[bot]
1022f7c023 [autofix.ci] apply automated fixes 2024-02-16 00:32:02 +00:00
cirospaciari
d29bb8d36c more win 2024-02-15 21:31:09 -03:00
Jake Gordon
099825e5ac Common HTTP server usage guide (#8732)
Co-authored-by: Georgijs <48869301+gvilums@users.noreply.github.com>
2024-02-15 16:30:59 -08:00
Henrikh Kantuni
fc05cbfedc Fix typo (#8930)
"Buns supports" → "Bun supports"

Co-authored-by: John-David Dalton <john.david.dalton@gmail.com>
2024-02-15 16:20:55 -08:00
Georgijs Vilums
213ef4eedf remove wrong (?) asserts, skip watermark tests, update Bun.file streaming test 2024-02-15 15:51:31 -08:00
Georgijs Vilums
a1e6d6297d fix blocking reads from terminal 2024-02-15 14:20:36 -08:00
cirospaciari
2afeb98023 make stdin actually works 2024-02-15 19:01:57 -03:00
cirospaciari
cf1b89b96d opsie 2024-02-15 18:41:04 -03:00
autofix-ci[bot]
05dc7eb2b1 [autofix.ci] apply automated fixes 2024-02-15 21:37:40 +00:00
cirospaciari
acd5ac63b6 we should not crash here 2024-02-15 18:36:49 -03:00
autofix-ci[bot]
54d7391477 [autofix.ci] apply automated fixes 2024-02-15 21:29:40 +00:00
cirospaciari
a9a757a9ee we should call this.writer.end 2024-02-15 18:28:52 -03: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
Georgijs
da78103b1c fix typo (#8929) 2024-02-15 13:07:07 -08:00
cirospaciari
a564479563 more windows stuff 2024-02-15 18:02:21 -03:00
Georgijs Vilums
a502015e52 fix process.release test 2024-02-15 10:44:22 -08:00
Jarred Sumner
16243bdcbd Merge branch 'main' into jarred/process-change 2024-02-15 08:13:40 -08:00
Jarred Sumner
da190ef110 Update bun-linux-build.yml 2024-02-15 07:57:30 -08:00
Jarred Sumner
0894872c68 Fixup 2024-02-15 16:54:13 +01:00
Jarred Sumner
57dcdbfaad Fixes 2024-02-15 16:17:35 +01: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
Jarred Sumner
151512dcc9 Release weak refs before responding to websocket messages (#8898)
* Release weak refs before responding to websocket messages

* Yes

* Wrap the methods instead of the callers

* oops

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-02-15 07:09:10 -08:00
autofix-ci[bot]
1fb11bdb1a [autofix.ci] apply automated fixes 2024-02-15 13:59:33 +00:00
Jarred Sumner
b5f12b02f0 Many fixes 2024-02-15 14:58:05 +01:00
Toby Cm
1b945ba2ef fix: Update URL in non-avx warning message (#8435)
`https://github.com/oven-sh/bun/release/bun-v1.0.25/bun-linux-x64-baseline.zip`

->

`https://github.com/oven-sh/bun/releases/download/bun-v1.0.25/bun-linux-x64-baseline.zip`
2024-02-15 03:57:22 -08:00
Jarred Sumner
826db5f80c Merge branch 'main' into jarred/process-change 2024-02-14 23:04:47 -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
Jarred Sumner
c991595f2f Add signalCode to spawnSync when available 2024-02-14 22:24:36 -08:00
Jarred Sumner
02819a8239 Now With Even More @intCast ® 2024-02-14 21:20:49 -08:00
Jarred Sumner
a1495f47dc Update sys.zig 2024-02-14 21:15:14 -08:00
Jarred Sumner
109bdabdeb Add missing intcasts 2024-02-14 21:02:15 -08:00