Commit Graph

8910 Commits

Author SHA1 Message Date
Kyle Scully
440cee1755 refactor: remove unnecessary spread (#9137) 2024-03-06 09:00:29 -08:00
マルコメ
9b4a74715b docs: update test matchers on jest compatibility (#9272) 2024-03-06 00:11:29 -08:00
Meghan Denny
8fc08752e5 node:http: emit 'socket' event after calling http.request() (#9270)
* node:http: emit 'socket' event after calling http.request()

* add reference links for why this is how it is

* add guards to not waste time

* add a regression test

* use test harness port number
2024-03-05 23:01:32 -08:00
Meghan Denny
bb3295ba84 node:url implement domainToASCII and domainToUnicode (#9257)
* node:url implement domainToASCII and domainToUnicode

* fix arg checks

* remove unneeded use of WTF::Vector

* tidy

* throw a js error if icu fails

* add a ton more tests, fix ascii guard, upconvert latin1

* even more tests

* add a comment for this guard

* use ASSERT_NOT_REACHED() instead of raise(SIGABRT)
2024-03-05 19:46:38 -08:00
Ashcon Partovi
c837903e4e Fix new Request("/") not working with node-fetch (#9246)
* Fix `new Request("/")` not working with `node-fetch`

* Address review

* Address review 2

* Fix bad test
2024-03-05 16:51:52 -08:00
Ryan Dsouza
b55e62b634 Update cache.md (#9260)
Specify `bunfig.toml` to make it easy to check where this option needs to be added.
2024-03-05 16:28:08 -08:00
Cameron Haley
2b8fc7a9a8 Running absolute/relative path shouldn't rely on the existence of package.json script (#9265) 2024-03-05 16:27:57 -08:00
Jarred Sumner
edeeffc74c Fixes #9263 (#9266)
* Fixes #9283

* Update URLSearchParams.test.ts

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-05 16:27:33 -08:00
Jarred Sumner
12c257a012 Fix out of bounds memcpy in crypto 2024-03-05 13:52:27 -08:00
Yash Singh
bd2176ffb0 fix: format specifier without characters in between (#9209)
* fix: format specifier without spaces in between, resolves #9208

* chore: test in console-log.test.ts
2024-03-04 17:46:19 -08:00
ErikOnBike
4f0a497660 Fix lost constructors in Node.js module classes (#9245) 2024-03-04 16:12:22 -08:00
dave caruso
472a0b482d feat: signal handling on windows (#9129)
* start some signal handling

* ok

* work on this from friday

* ok

* ref stuff

* threadsafety

* fix the buikld

* alright

* ok

* fix posix compilation error

* header fix

* revisions

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Zack Radisic <zack@theradisic.com>
2024-03-04 15:37:08 -08:00
Brook Jeynes [SSW]
fa08ac34c9 Fixes #7767: Updated bun upgrade to return error when used with cmd arguments (#7784)
* Updated `upgrade` to return error when used with cmd arguments
- Updated `upgrade` command to check for command-line arguments and return an error if so providing a suggested `update` command.

* added test

* updated condition to allow

* Upgrade argument check now only checks if all arguments contain `--`
- Added more tests

* Using `cpSync` in the following context results in an "Is a directory" error

* Update message displayed back to user

Co-authored-by: dave caruso <me@paperdave.net>

* moved args check to upgrade_command.zig

* fixed broken tests

* changing string interpolation to join() for paths

* [autofix.ci] apply automated fixes

* Fixed build errors
- Removed call to `std.mem.span`
- Added conditional to only run if there's more than 2 arguments (ignores the exec and `upgrade`)
- Added new test to ensure `upgrade` runs with 0 arguments passed

---------

Co-authored-by: dave caruso <me@paperdave.net>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-04 15:30:20 -08:00
Yash Singh
51466ff1a2 fix: sep state for assertions and hasAssertions (#9210) 2024-03-04 12:01:50 -08:00
cyfung1031
b14c7aa0b5 docs: Correct Incorrect Information (#9214)
`URL.createObjectURL` is not yet implemented.
See https://github.com/oven-sh/bun/issues/3925
2024-03-04 08:27:18 -08:00
Jarred Sumner
1424a196ff Support "conditions" in Bun.build (#9234)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
bun-v1.0.30
2024-03-03 23:52:24 -08:00
Zack Radisic
05a7779880 shell: Improve ShellError stacktrace (#9233)
* Improve stacktrace

* woops
2024-03-03 21:46:42 -08:00
Jarred Sumner
95fc939d0b Fixes #9225 (#9232)
* Fixes #9225

* Pass all arguments along

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-03 20:50:35 -08:00
Jarred Sumner
6d52b3b62b Fixes #8794 (#9231)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-03 20:13:22 -08:00
Jarred Sumner
30fdfdb295 Fixes #9222 (#9230)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-03 19:26:27 -08:00
Jarred Sumner
a43a8a8cea Fixes #9226 (#9229)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-03 17:32:18 -08:00
argosphil
4257457c6a Allow relative paths in cpAsync again (#9184)
* allow relative paths in cpAsync again

* test for #9024

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-03 16:30:34 -08:00
Cameron Haley
b5cea9a20c Avoid manually destroying stream when IncomingMessage stream is done reading (#9219)
* Avoid manually destroying stream when IncomingMessage stream is done reading

* Add test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-03 16:29:13 -08:00
Jarred Sumner
49ccad9367 Finish jest.clearAllMocks() implementation (#9217)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-03 03:48:13 -08:00
Jarred Sumner
71405ff4dc Fix regression from 648d5ae (#9215)
* Slightly reduce number of system calls on Linux

* Fix regression from 648d5aecf3

648d5aecf3 caused HTTP response bodies sent streamingly with a single chunk to include an extraneous 0\r\n\r\n chunk, leading valid clients to close the connection prematurely.

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-03 00:02:44 -08:00
Jarred Sumner
0017dbec4e Fixes #9180 (#9212)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-02 21:42:57 -08:00
Jarred Sumner
a3a5ed3870 Update shell.md 2024-03-02 01:39:34 -08:00
Jarred Sumner
dd111589b0 Update shell.md 2024-03-02 01:37:42 -08:00
Jarred Sumner
3c62580529 Add a couple guides 2024-03-02 01:24:40 -08:00
Dylan Conway
309b417009 add assertion for generated functions returning JSValue.zero without an exception (#9197)
* assert exception when JSValue.zero is returned

* Update generate-classes.ts
2024-03-01 20:18:40 -08:00
Yash Singh
b2794ad7cf feat: implement expect.assertions and expect.hasAssertions (#9190)
* chore: merge oven-sh/bun

* chore: merge oven-sh/bun

* chore: merge oven-sh/bun

* fix: comptime for compiling

* fix: error reporting

* chore: revert runner.node.mjs

* fix: dont construct err b4

* chore: rm force throw test

* chore: rerun

* chore: reset unrelated changes

* fix: return undefined

* fix: dont return undefined on invalid args

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-01 20:17:44 -08:00
Jarred Sumner
4489cda25b Bump (#9196)
* Bump

* Even more calloc

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-01 20:13:16 -08:00
Igor Wessel
dcf6f244a4 feat: add support --conditions flag (#9106)
* feat(options): add possibility to append a custom esm condition

* feat(cli): parse --conditions flag

* test: add case for custom conditions

* fix(cli): not get short-hand --conditions flag

* test: add case using cjs with custom condition

* fix(options): address possible memory issues for esm conditions

* refactor(cli): remove -c alias for --conditions flag

* test: add cases for multiple --conditions specified

* test(bundler): add support to test --conditions

* chore(cli): fix grammar mistakes in --conditions

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-01 18:57:45 -08:00
Meghan Denny
3134ae1ada ci: comment disabled actions/upload-artifact call (#9195) 2024-03-01 18:14:15 -08:00
Meghan Denny
4baad765ec windows: pass test/js/web/timers/setTimeout.test.js (#9176)
* windows: pass test/js/web/timers/setTimeout.test.js

* gotta go fast

* ci: windows: try reverting this line

reproducibly getting:
Error: Unable to download artifact(s): Artifact not found for name: bun-windows-x64-zig

* ci: switch back to namespace for zig build
2024-03-01 17:48:52 -08:00
Ashcon Partovi
714e04eeec Github actions changes (#9189)
* Test out custom oven-sh/setup-bun action

* Add files
2024-03-01 17:48:23 -08:00
Jarred Sumner
64bdf6a138 Zero initialize some things in usockets (#9191)
* Zero initialize some things in usockets

* Update epoll_kqueue.c

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-01 17:47:00 -08:00
Meghan Denny
141c2b52b1 ci: fail step if actions/upload-artifact fails (#9194)
* ci: fail step if actions/upload-artifact fails

* the arm64 workflow doesnt have these and they were failing on x86
2024-03-01 17:46:18 -08:00
Jarred Sumner
fd26c3fb55 Fixes #9153 (#9175)
* Fixes #9153

* Update napi.zig

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-01 14:42:20 -08:00
Lucas Garron
7909f0eff4 Fix typo: demonstates → demonstrates (#9179) 2024-03-01 05:44:44 -08:00
Jarred Sumner
1e217ce78f Fix path bug (#9173) 2024-02-29 22:35:52 -08:00
Jarred Sumner
08ef0e8e8e Use namespace on more machines 2024-02-29 22:16:47 -08:00
Ashcon Partovi
536919e783 Use namespace.so for faster CI (#9160)
* Use namespace.so for faster CI

* arm64 runners arent working

* deflake

* more

* Update bun-mac-x64-baseline.yml

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-02-29 16:14:12 -08:00
Meghan Denny
e45a4019c1 windows: pass test/transpiler/transpiler-stack-overflow.test.ts (#9164)
* windows: pass test/transpiler/transpiler-stack-overflow.test.ts

* remove regression silencing comment

* needed this too

* use proper drive letter detection

* oopsie
2024-02-29 15:21:39 -08:00
Alexander Mykolaichuk
0b5e83db97 fix: linux distro name match (#9075) 2024-02-29 13:17:31 -08:00
Meghan Denny
2fb6733eeb windows: pass test/js/node/process/process.test.js (#9161) 2024-02-28 20:25:05 -08:00
Meghan Denny
bcd604edc7 windows: pass test/js/bun/resolve/resolve.test.ts (#9158) 2024-02-28 19:58:42 -08:00
Cameron Haley
bfdad44460 Fix issue where process.stdin is ended too early (#9155)
* Fix issue wherein process.stdin is ended too early

* [autofix.ci] apply automated fixes

* test: Generate prisma client on 'big' schema

* Update test/js/third_party/prisma/helper.ts

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-02-28 19:03:08 -08:00
Jarred Sumner
27a0deab5f Make this test less flaky on Windows 2024-02-28 17:03:00 -08:00
Jarred Sumner
c7a0c3c5fd Merge branch 'main' of https://github.com/oven-sh/bun 2024-02-28 16:56:02 -08:00