207 Commits

Author SHA1 Message Date
Dylan Conway
589a39d413 upgrade webkit (#10971) 2024-05-09 23:06:10 -07:00
dave caruso
37006509d9 Update ICU on Linux to 75.1 (#10960) 2024-05-09 17:08:46 -07:00
Jarred Sumner
6d717ac852 Revert "Bump"
This reverts commit 86820edbf9.
2024-05-09 15:29:13 -07:00
Jarred Sumner
86820edbf9 Bump 2024-05-09 05:22:01 -07:00
dave caruso
4c0d69af93 fix(windows): build all dependencies with proper cpu target (#10884)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-05-07 17:36:19 -07:00
Jarred Sumner
b1b91d59d8 Set frame pointers and sigaltstack (#10847) 2024-05-06 15:08:43 -07:00
Dylan Conway
5d7b3ab579 upgrade webkit (#10757) 2024-05-01 19:51:45 -07:00
Jarred Sumner
2724bd3649 Bump 2024-04-29 14:16:43 -07:00
Jarred Sumner
e58d67b468 Fixes #10588 & upgrade WebKit (#10596) 2024-04-28 01:10:52 -07:00
Jarred Sumner
555bd1defd Bump! 2024-04-26 15:30:38 -07:00
dave caruso
006575a0f1 watcher: major refactor to use Maybe types for better error reporting (#10492) 2024-04-25 18:44:11 -07:00
vico
164b2f610f docs: update clang/llvm version to 17 (#10439) 2024-04-22 10:42:56 -07:00
Jarred Sumner
7496299b00 Update CMakeLists.txt 2024-04-22 00:53:14 -07:00
Jarred Sumner
c604c57a32 Upgrade to LLVM 17, fix linux debug build, upgrade JSC, remove some C API usages (#10161)
* Upgrade to LLVM 17, JSC, remove more C API usages

* [autofix.ci] apply automated fixes

* Update scripts/setup.sh

Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>

* more

* update

* bump

* Fix unused variable

* Fix merge conflict

* [autofix.ci] apply automated fixes

* Increase limit

* double the limit

* CI

* Update CMakeLists.txt

* Update CMakeLists.txt

* Upgrade

* Upgrade more things

* Bump

* Remove ld64 flag

* typo

* Update Dockerfile

* update

* Update

* Up

* asd

* up

* Upgrade

* Bump!

* Fix crash

* Remove unnecessary cahnge

* Propagate canary flag + bump macOS 13

* Upgrades

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2024-04-21 19:03:01 -07:00
Jarred Sumner
1a4bad80b7 Bump 2024-04-20 21:30:14 -07:00
dave caruso
c99d7ed331 feat: overhaul the crash handler (#10203)
* some work

* linux things

* linux things

* feat: tracestrings on Windows

* bwaa

* more work on the crash handler

* okay

* adgadsgbcxcv

* ya

* dsafds

* a

* wuh

* a

* bru h

* ok

* yay

* window

* alright

* oops

* yeah

* a

* a

* OOM handling

* fix on window
2024-04-17 15:32:25 -07:00
Jarred Sumner
fbe2fe0c3f Bump 2024-04-15 21:32:17 -07:00
Jarred Sumner
9380e99e2b Fixes #9952 (#10069)
* Fixes #9952

* Update CMakeLists.txt

* Update CMakeLists.txt

* linux

* isolate this test
2024-04-08 07:27:07 -07:00
Jarred Sumner
8825b29529 bump webkit (#9997)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-04-05 12:09:27 -07:00
Jarred Sumner
00f27fbeec Get bunx tests to pass on Windows (#9729)
* Get bunx tests to pass on Windows

* wip

* WIP

* wip

* wip

* ads

* asdf

* makeOpenPath

* almost revert

* fix build

* enoent

* fix bun install git repos

* cleanup

* use custom zig stdlib from submodule

* update dockerfile to copy zig stdlib sources

* fix dockerfile, update gitmodules

* fix dockerfile

* fix build

* fix build

* fix symlinkat

* fix build

* fix build

* Remove usages of unreachable

* Fixup

* Fixup

* wip

* fixup

* Fix one of the bugs

* asd

* Normalize BUN_INSTALL_CACHE_DIR var

* Set iterable to false when we're about to delete

* Update bun.zig

* I still can't repro this outside CI

* i think that fixes it?

* fix posix compile

* factor out directory creation

* update all install methods to use InstallDirState

* move walker creation to init function

* fix error cleanup

* fix posix compile

* all install tests pass locally

* cleanup

* [autofix.ci] apply automated fixes

* Fix posix regressions

---------

Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Co-authored-by: Meghan Denny <hello@nektro.net>
Co-authored-by: Georgijs Vilums <georgijs.vilums@gmail.com>
Co-authored-by: Georgijs <48869301+gvilums@users.noreply.github.com>
Co-authored-by: Georgijs Vilums <georgijs@bun.sh>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-03 20:53:28 -07:00
Dylan Conway
c831dd8db8 Upgrade webkit (#9885)
* span

* remove JSStringIsEqualToString

* bump webkit tag

* span literal

* undo

* fix windows build

* Update JSStringDecoder.cpp

* Update JSStringDecoder.cpp

* Update JSStringDecoder.cpp

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-04-03 17:10:39 -07:00
Jarred Sumner
36f1bd3694 Truncate source lines in error messages (#9832)
* Truncate source lines in error messages

* Update .prettierignore

* trim

* fix

* try

* fix

* 1 more time

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-04-03 02:46:10 -07:00
dave caruso
a01b01ae72 chore!: enable 1.1's breaking changes (#9724)
* root scripts in foreground

* ignore if silent

* test for breaking changes

* move back to installPackages

* [autofix.ci] apply automated fixes

* boolean variable, comptime, 1_1_0

* flip the 1.1 flag

* add for the next batch of breakings

* make it buidl

* enable breaking changes tests

* fix version fmt

* silent node-gyp

* comment change

---------

Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2024-03-31 16:12:59 -07:00
Jarred Sumner
02ad501f9e Add missing globs 2024-03-29 23:40:13 -07:00
dave caruso
d712254128 internal: remove secret hidden internals and introduce new way to call native code from js (#8166)
* oooooh magic

* stuff

* run format

* ok

* yippee

* run the formatter back

* finish things up

* fix webkit

* more

* [autofix.ci] apply automated fixes

* fix compile

* fix compilation on windows, it seems to not work though :(

* update

* a

* v

* ok

* [autofix.ci] apply automated fixes

* OOPS

* bump bun to reduce ci bugs

* a

* js2native is done!

* improve array binding

* rebase

* some final stuff

* wasi fixes

* os

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-29 21:47:11 -07:00
dave caruso
0751581e86 bump: Bun v1.0.36 2024-03-28 17:42:06 -07:00
Jarred Sumner
2765347b65 Enable more C++ warnings (#9602)
* Enable more C++ warnings

* Only enable these ones in release builds

* Update MessagePortChannel.cpp

* Update BunProcess.cpp

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-24 17:28:58 -07:00
dave caruso
73a55cf075 windows: make more windows tests pass (#9370)
* run-eval.test.ts

* transpiler-cache.test.ts

* node net

* some open things

* a

* a

* yikes

* incredible

* run it back

* a

* this code is what i like to call, incorrect

* ok its all worng

* remove an assertion that is wrong again

* update test things and rebase

* performance test

* mark filesink with mkfifo as todo. see #8166

* hehe

* not done

* awa

* fs test pass

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-22 23:40:45 -07:00
Jarred Sumner
be4b47d49d Fixes #9563 (#9566)
* Remove flag in a test

* Get this test file to run in jest again

* Fixes #9563

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-22 07:50:00 -07:00
Jarred Sumner
c6f22de360 Make the version number bigger 2024-03-21 10:44:18 -07:00
Ashcon Partovi
d14c99510c Change macOS version check to be a warning, instead of error 2024-03-20 09:09:29 -07:00
Jarred Sumner
76ced7c6ed WIP Make process.stdout sync on windows (#9398)
* Make some things sync on windows

* WIP

* WIP

* remove uses to uv_default_loop

* remove a compiler warning on windows

* edfghjk

* Windows build fixes

* Fixup

* bundows

* Add quotes

* Fix --cwd arg on Windows

* comment

* move this up

* Fix some tests

* `mv` tests pass

* spawn.test passes again

* Allow .sh file extension for Windows

* Unmark failing tests

* env test pass

* windows

* Fix some tests

* Update ProcessBindingTTYWrap.cpp

* Update CMakeLists.txt

* Set tmpdir

* Make it 5s on windows

* Fixup

* Fixup

* Update ProcessBindingTTYWrap.cpp

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: dave caruso <me@paperdave.net>
2024-03-18 19:35:34 -07:00
Jarred Sumner
9e91e137f1 check is callable in util promisify timers (#9482)
* Update CMakeLists.txt

* Check is callable in util promisify

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-17 21:39:39 -07:00
nellfs
ca97a757bb Development environment documentation for openSUSE Tumbleweed (#9479)
* Add openSUSE Tumbleweed to the list of supported Linux distributions in CMakeLists.txt

* openSUSE Tumbleweed setup

* Revert "Add openSUSE Tumbleweed to the list of supported Linux distributions in CMakeLists.txt"

This reverts commit 93faed88a1.

---------

Co-authored-by: nellfs <nellfs@localhost.localdomain>
2024-03-17 21:12:09 -07:00
Jarred Sumner
785d2251da Fix incorrect include order (#9457)
* Update ImportMetaObject.cpp

* Add header guard

* Enable `-Werror=uninitialized` and `-Werror`

* Update napi.cpp

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-16 02:50:38 -07:00
Jarred Sumner
e89c8d2eaa Fix not using system shell on posix (#9449)
* Use system shell + add to bunfig

* Update CMakeLists.txt

* Fix tests + flags

* Use execPath

* windows

* Propagate exit code

* Add test for default shell in use

* Update bun-run-bunfig.test.ts

* Update bun-run-bunfig.test.ts

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-15 23:00:53 -07:00
Jarred Sumner
e256751218 Don't link libicudata? (#9424)
* Don't link libicudata?

* Fixups

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-14 20:46:11 -07:00
Ashcon Partovi
c72cf989f4 Fix 'xcrun: error: unable to lookup item' error when building on macOS 2024-03-14 12:23:00 -07:00
Jarred Sumner
570b3e567a Bump 2024-03-13 15:26:38 -07:00
Jarred Sumner
9bda350406 Add a helpful error message when the xcode SDK is newer than the current platform (#9397)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-13 14:34:31 -07:00
Jarred Sumner
c9fe57fa63 wip use wrapper for managing process (#8456)
* WIP sync close (shows ref count bug in stream)

* fix closing on PipeWriter and PipeReader

* remove old todos

* join

* Some shell changes

at least it compiles

* fix some compile errors

* fix ref/unref server on windows

* actually use the ref count in this places

* make windows compile again

* more tests passing

* Make shell compile again

* Slowly remove some `@panic("TODO SHELL")`

* Eliminate `@panic("TODO SHELL")` for BufferedWriter

* Holy cleansing of `@panic("TODO SHELL")`

at least it compiles now

* Okay now the shell compiles, but segfaults

* Fix compiler errors

* more stable stream and now Content-Range pass

* make windows compile again

* revert stuff until the fix is actually ready

* revert onDone thing

* Fix buffered writer for shell

* Fix buffered writer + shell/subproc.zig and windows build

* Fix for #8982 got lost in the merge

* Actually buffer subproc output

* Fix some stuff shell

* oops

* fix context deinit

* fix renderMissing

* shell: Fix array buffer

* more stable streams (#9053)

fix stream ref counting

* wip

* Remove `@panic("TODO")` on shell event loop tasks and Redirect  open flags got lost in merge

* Support redirects

* fixes

cc @cirospaciari

* Update ReadableStreamInternals.ts

* Fix spurious error

* Update stream.js

* leak

* Fix UAF

cc @cirospaciari

* Fix memory leaks

* HOLY FUCK big refactor

* misc cleanup

* shell: Fix a bunch of tests

* clean up

* gitignore: fix ending newline

* get windows compiling again

* tidy

* hide linker warn with icu

* closeIfPossible

* Better leak test

* Fix forgetting to decrement reference count

* Update stdio.zig

* Fix shell windows build

* Stupid unreachable

* Woops

* basic echo hi works on windows

* Fix flaky test on Windows

* Fix windows regression in Bun.main (#9156)

* Fix windows regression in Bun.main

* Handle invalid handles

* Fix flaky test

* Better launch config

* Fixup

* Make this test less flaky on Windows

* Fixup

* Cygwin

* Support signal codes in subprocess.kill(), resolve file path

* Treat null as ignore

* Ignore carriage returns

* Fixup

* shell: Fix IOWriter bug

* shell: Use custom `open()`/`openat()`

* windows shell subproc works

* zack commit

* I think I understand WindowsStreamingWriter

* fix thing

* why were we doing this in tests

* shell: Fix rm

* shell: Add rm -rf node_modules/ test

* shell: use `.runAsTest()` in some places to make it easier to determine which test failed

* [autofix.ci] apply automated fixes

* woopsie

* Various changes

* Fix

* shell: abstract output task logic

* shell: mkdir builtin

* fixup

* stuff

* shell: Make writing length of 0 in IOWriter immediately resolve

* shell: Implement `touch`

* shell: basic `cat` working

* Make it compile on windows

* shell: Fix IOReader bug

* [autofix.ci] apply automated fixes

* fix windows kill on subprocess/process

* fix dns tests to match behavior on windows (same as nodejs)

* fix windows ci

* again

* move `close_handle` to flags in `PipeWriter` and fix shell hanging

* Fix `ls` not giving non-zero exit code on error

* Handle edgecase in is_atty

* Fix writer.flush() when there's no data

* Fix some tests

* Disable uv_unref on uv_process_t on Windows, for now.

* fix writer.end

* fix stdout.write

* fix child-process on win32

* Make this test less flaky on Windows

* Add assertion

* Make these the same

* Make it pass on windows

* Don't commit

* Log the test name

* Make this test less flaky on windows

* Make this test less flaky on windows

* Print which test is taking awhile in the runner

* fixups

* Fixups

* Add some assertions

* Bring back test concurrency

* shell: bring back redirect stdin

* make it compile again cc @zackradisic

* initialize env map with capacity

* some fixes

* cleanup

* oops

* fix leak, fix done

* fix unconsumedPromises on events

* always run expect

* Update child_process.test.ts

* fix reading special files

* Fix a test

* Deflake this test

* Make these comparisons easier

* Won't really fix it but slightly cleaner

* Update serve.test.ts

* Make the checks for if the body is already used more resilient

* Move this to the harness

* Make this test not hang in development

* Fix this test

* Make the logs better

* zero init some things

* Make this test better

* Fix readSocket

* Parallelize this test

* Handle EPipe and avoid big data

* This was a mistake

* Fix a bunch of things

* Fix memory leak

* Avoid sigpipe + optimize + delete dead code

* Make this take less time

* Make it bigger

* Remove some redundant code

* Update process.zig

* Merge and hopefully don't breka things along teh way

* Silence build warning

* Uncomment on posix

* Skip test on windows

* windows

* Cleanup test

* Update

* Deflake

* always

* less flaky test

* [autofix.ci] apply automated fixes

* logs

* fix uaf on shell IOReader

* stuff to make it work with mini event loop

* fix 2 double free scenarios, support redirections on windows

* shell: Make `1>&2` and `2>&1` work with libuv

* yoops

* Partial fix

* Partial fix

* fix build

* fix build

* ok

* Make a couple shell tests pass

* More logging

* fix

* fix

* Fix build issue

* more tests pass

* Deflake

* Deflake

* Use Output.panic instead of garbled text

* Formatting

* Introduce `bun.sys.File`, use it for `Output.Source.StreamType`, fix nested Output.scoped() calls, use Win32 `ReadFile` API for reading when it's not a libuv file descriptor.

This lets us avoid the subtle usages of `unreachable` in std.os when writing to stdout/stderr.

Previously, we were initializing the libuv loop immediately at launch due to checking for the existence of a bun build --compile'd executable. When the file descriptor is not from libuv, it's just overhead to use libuv

cc @paperdave, please tell me if Iany of that is incorrect or if you think this is a bad idea.

* Fix closing undefined memory file descriptors in spawn

cc @zackradisic

* pause instead of close

* Fix poorly-written test

* We don't need big numbers for this test

* sad workaround

* fixup

* Clearer error handling for this test

* Fix incorrect test

@electroid when ReadableStream isn't closed, hanging is the correct behavior when consuming buffered data. We cannot know if the buffered data is finished if the stream never closes.

* Fix build

* Remove known failing on windows

* Deflake

* Mark no longer failing

* show all the failing tests

* Sort the list of tests

* fix argument handling

* dont show "posix_spawn" as an error code on windows

* make bun-upgrade.test.ts pass on windows

* fix bunx and bun create again sorry

* a

* fix invalidexe because we should not be running javascript files as if they were exes

* Concurrency in test runner + better logging

* Revert "fix invalidexe because we should not be running javascript files as if they were exes"

This reverts commit da47cf8247.

* WIP: Unix fixes (#9322)

* wip

* [autofix.ci] apply automated fixes

* wip 2

* [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>

* Update runner.node.mjs

* Update runner.node.mjs

* Document some environment variables

* shell: Make `Response` work with builtins

* Make it compile

* make pwd test pass

* [autofix.ci] apply automated fixes

* Fix printing garbage for source code previews

* Update javascript.zig

* Fix posix test failures

* Fix signal dispatch

cc @paperdave. Signals can be run from any thread. This causes an assertion failure when the receiving thread happens to not be the main thread. Easiest to reproduce on linux when you spawn 100 short-lived processes at once.

* windows

---------

Co-authored-by: cirospaciari <ciro.spaciari@gmail.com>
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com>
Co-authored-by: Zack Radisic <zackradisic@Zacks-MBP-2.attlocal.net>
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Zack Radisic <zack@theradisic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: dave caruso <me@paperdave.net>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2024-03-11 08:24:30 -07: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
Alexander Mykolaichuk
0b5e83db97 fix: linux distro name match (#9075) 2024-02-29 13:17:31 -08:00
Jarred Sumner
e9d4ced41e Bump WebKit 2024-02-24 18:46:00 -08:00
Meghan Denny
ed339b367d improve Bun.stringWidth's algorithm (#9022)
* improve Bun.stringWidth's algorithm

* add a bunch more tests from string-width package

* make typescript happy

* undo typescript changes

* use better #define check for debug mode

* properly handle latin1 width tests

* support grapheme clusters

* fix trailing newline

* visibleUTF16WidthFn- add fast path for leading ascii

* add firstNonASCII16IgnoreMin

* fix firstNonASCII16CheckMin

* vectorize visibleUTF16WidthFn

* support emoji variation selector

* expose stringWidth in release mode too

* vectorize visibleLatin1Width

* support ambiguousIsNarrow option

* add typescript definition for stringWidth
2024-02-22 19:16:17 -08:00
Jarred Sumner
a18b44d01f Bump version 2024-02-22 12:59:59 -08:00
Jarred Sumner
7407080628 Bump 2024-02-19 10:28:05 -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
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
dave caruso
aba37525a6 windows: fix bundler reliability and nuke WSL-based codegen scripts (#8890)
* bruh

* yeaaahhhhhhhhhhhhhhhhhhhhhhhhhhh

* revisions

* yeah

* fix

* make no codegen do less things
2024-02-13 20:33:24 -08:00