Commit Graph

5895 Commits

Author SHA1 Message Date
Meghan Denny
4302a43374 which: windows: need to make sure the absolute path exists 2024-03-22 17:21:30 -07:00
Meghan Denny
d71846757c shell: windows: use case insensitive env map 2024-03-22 17:21:03 -07:00
Meghan Denny
1916a68cfd make 'bun add' also not print a crash trace when pm fails cleanly 2024-03-22 17:19:55 -07:00
Meghan Denny
b475a769eb fix recurring finalize crash 2024-03-22 17:18:42 -07:00
Meghan Denny
3a8691fe65 Merge branch 'main' into nektro-patch-22129 2024-03-21 21:36:59 -07:00
Meghan Denny
e4ecd46bd6 tidy 2024-03-21 21:34:55 -07:00
Meghan Denny
3438f9b5ab which: windows: dont check for files with no extensions but do if it matches the extensions we like 2024-03-21 21:28:59 -07:00
Meghan Denny
a2a8f95d41 which: succeed right away if given an absolute path 2024-03-21 21:28:25 -07:00
Meghan Denny
709afb9c71 shell: no need to allocate these messages 2024-03-21 21:27:22 -07:00
Meghan Denny
02db0e43df windows: use directory symlinks for directories 2024-03-21 21:26:31 -07:00
Meghan Denny
935146e9ab we actually did need this 2024-03-21 21:25:20 -07:00
Meghan Denny
b67739b7db update this check for windows too 2024-03-21 21:25:02 -07:00
Meghan Denny
632bdee900 i backed out of bun exec for now 2024-03-21 21:24:47 -07:00
Meghan Denny
7f6394e761 implement this todo 2024-03-21 21:24:28 -07:00
Dylan Conway
7e3e7d2ed4 enable autoinstall, fixup tests (#9539) 2024-03-21 21:12:54 -07:00
Jarred Sumner
b24d3ba5be Fix build 2024-03-21 11:05:52 -07:00
Jarred Sumner
e124f08caf A few fixes related to CommonJS module loading (#9540)
* Ensure we always deref the source code

* Move more work to concurrent transpiler

* Update NodeModuleModule.h

* Update string.zig

* Make `Bun.gc()` more effective

* Update text-loader-fixture-dynamic-import-stress.ts

* Update ZigSourceProvider.cpp

* Fixes #6946

* Update ModuleLoader.cpp

* Update ModuleLoader.cpp

* Fixes #8965

* Fixups

* Update ModuleLoader.cpp

* Update ModuleLoader.cpp

* Load it

* Update module_loader.zig

* Update module_loader.zig

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-21 10:42:57 -07:00
Jarred Sumner
0948727243 Fixes #9521 (#9530)
* Fixes #9521

* Another test

* Update load-file-loader-a-lot.test.ts

* Update module_loader.zig

* comments

* Rename variable

* Update module_loader.zig

* Update exports.zig

* small cleanup

* bundows

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-21 00:06:24 -07:00
Meghan Denny
1936940043 more tests 2024-03-20 23:43:19 -07:00
Meghan Denny
1fc547fdd9 shell: implement exit builtin 2024-03-20 23:21:41 -07:00
Meghan Denny
49ee19cb41 fix path error here 2024-03-20 23:20:06 -07:00
Meghan Denny
e8115529d3 fix windows build from poxix build fix 2024-03-20 17:53:19 -07:00
Ashcon Partovi
cc4479096a Update lockfiles 2024-03-20 09:16:01 -07:00
Meghan Denny
7c4616b2a1 Merge branch 'main' into nektro-patch-22129 2024-03-20 01:33:27 -07:00
Meghan Denny
b8b8b26f85 small fixes 2024-03-20 01:31:45 -07:00
Meghan Denny
714331909f add ensureTempNodeGypScript test 2024-03-20 01:30:55 -07:00
Meghan Denny
b3e53e1eb5 improve shebang script writing 2024-03-20 01:30:06 -07:00
Meghan Denny
5332a17551 remove bun exec 2024-03-20 01:28:38 -07:00
Meghan Denny
203022e04c use bun run instead of bun exec 2024-03-20 01:27:46 -07:00
Meghan Denny
c0e84c9076 windows: run: fix path delimeter placement 2024-03-20 01:26:16 -07:00
Meghan Denny
c861a6fcda use bun.exe_suffix in bunx 2024-03-20 01:25:37 -07:00
Meghan Denny
f1a61ceb8e fix selfExePath 2024-03-20 01:25:17 -07:00
Dylan Conway
d2ff2cc1dc fix invalid pointer 2024-03-19 23:16:07 -07:00
Meghan Denny
0b11991811 commit exec_command.zig 2024-03-19 22:23:20 -07:00
Meghan Denny
186456788e use 'bun exec' to run lifecycle scripts on windows 2024-03-19 22:20:24 -07:00
Meghan Denny
d6b815268d cli: add 'bun exec' to run bun shell 2024-03-19 22:19:55 -07:00
Meghan Denny
131bea538d memoize calls to selfExePath 2024-03-19 22:16:21 -07:00
Dylan Conway
931e04b019 fix(install): hoisting bug with devDependencies (#9519)
* fix with tests

* move to hoisting describe scope

* Update bun-install-registry.test.ts
2024-03-19 21:46:54 -07:00
Dylan Conway
cee6be12cc test for #9472 and bun pm trust waiter thread bugfix (#9498)
* test max concurrent scripts

* stress test, waiter thread bugfix

* different verbose

* escape

* Update src/install/lockfile.zig

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

* resource usage test

* fix invalid pointer

* another test

* update test

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-19 21:46:03 -07:00
Jarred Sumner
a54264177b Fix coercion edgecase with i32 and i64 (#9518)
* Fix coercsion edgecase

* Add sleep test

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-19 20:49:13 -07:00
Dylan Conway
f15e7f733d Revert "fix invalid pointer"
This reverts commit 3df320d0ed.
2024-03-19 16:48:34 -07:00
Dylan Conway
3df320d0ed fix invalid pointer 2024-03-19 16:45:27 -07:00
Dylan Conway
bf0e5a82f7 fix(windows): install bugfixes for workspaces, tarballs, and relative paths (#8813)
* more tests

* update migration.zig

* fix up paths

* update tests

* update tests

* test

* test

* update registry tests

* comments

* early exit if stream is invalid

* dont pass invalid_fd to openFileAtWindows

* fix merge

* misc crash fix

* make this use optional pointers instead of 0xaa

* ensure absolute paths are propagated properly

* package.json expects forward slash

* this assert was invalid

* add panic checks

* pass bun-remove

* more panic checks

* test: pass bun-add

* querying these hangs outside bun too

* fix compile error from merge conflict resolution

* use compileError instead of comptime unreachable

* tidy

* bunx: check for the .exe bin extension

* bunx: another route to make cache path if it doesnt exist

* install: another case of FolderResolution.getOrPut expecting absolute path

* fix a bun install crash

* dont print zig stack trace if bun install fails

* test: pass bun-link

* test: bunx: add more expects

* test: bun-install-registry: pass

* test: bun-install: pass

* test: bun-pm: pass

* fix merge main error

* fix posix tests

* fix last failing test in bun-install.test.ts
symlink difference between platforms

* bun-install-registry.test.ts fix

* bun-run.test.ts: remove stray console log

---------

Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Meghan Denny <hello@nektro.net>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-18 22:34:15 -07:00
Dylan Conway
06f04b584c fix(install): default trusted dependencies on windows (#9500)
* make sure source data is set too

* make default trusted dependencies work

* undo

* test

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2024-03-18 19:40:11 -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
Cezary Kupaj
4dd61bfd20 Fix crypto module to have proper id values for sign function (#9248)
* Fix crypto module to have proper id values for sign function

* Revert adding id hash to DSA sign functions - DSA algorithm doesnt use it

* Add tests for crypto.createSign() and crypto.verifySign()

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-03-17 21:13:43 -07:00
Jarred Sumner
a74d6f5a20 Clean up a little after #9402 (#9454)
* Clean up after #9402

* More

* More cleanup

* Bring back `dead`

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com>
2024-03-17 21:09:25 -07:00
Zack Radisic
4a6cda8d80 Fixes #9459 (shell mv regression) (#9475)
* Fix `mv`

* Add `mv` tests
2024-03-17 21:08:16 -07:00
Jarred Sumner
5fec71bda4 Fixes #9430 (#9472)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2024-03-17 07:19:24 -07:00