Meghan Denny
c3f63bcdc4
zig: make throwInvalidArguments use JSError ( #15305 )
2024-11-21 16:19:13 -08:00
Meghan Denny
1efab7f42d
zig: JSValue: make .get and .toSliceOrNull use JSError ( #15270 )
2024-11-20 13:26:41 -08:00
Meghan Denny
795f14c1d1
zig: align getTruthy to use JSError ( #15199 )
2024-11-19 18:46:08 -08:00
Meghan Denny
befb269b2d
zig: align fromJS methods to using JSError ( #15165 )
2024-11-15 22:14:18 -08:00
dave caruso
32ddf343ee
bake: csr, streaming ssr, serve integration, safer jsvalue functions, &more ( #14900 )
...
Co-authored-by: paperdave <paperdave@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-11-13 18:19:12 -08:00
Meghan Denny
35513a9d6d
zig: remove JSValue.isEmpty ( #15128 )
2024-11-13 16:04:13 -08:00
Meghan Denny
f8979b05b1
rid nearly all use of ExceptionRef in zig ( #15100 )
...
Co-authored-by: nektro <nektro@users.noreply.github.com >
2024-11-13 15:23:52 -08:00
Jarred Sumner
2b9abc20da
Use linux syscall interface more in I/O ( #15067 )
2024-11-11 14:47:04 -08:00
Jarred Sumner
781a392baa
Add micro-optimization to fs.readFile ( #15076 )
2024-11-11 10:35:17 -08:00
Jarred Sumner
ce2afac827
Align "encoding" option in node fs with node ( #14937 )
2024-11-01 18:16:04 -07:00
dave caruso
e93c5ad993
feat(bake): css, production build, dev separateSSRGraph=false ( #14622 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: paperdave <paperdave@users.noreply.github.com >
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com >
2024-10-27 01:57:36 -07:00
Dylan Conway
e448c4cc3b
fs.mkdir empty string bugfix (#14510 )
2024-10-16 18:55:49 -07:00
Meghan Denny
3830b0c499
more passing node buffer tests ( #14371 )
2024-10-14 20:22:14 -07:00
Meghan Denny
1ce2d0e9f5
fix fs-read-empty-buffer.test.js ( #14316 )
2024-10-07 19:03:30 -07:00
Meghan Denny
c41ff9da93
fix fs-promises-file-handle-write.test.js ( #14315 )
2024-10-07 18:26:43 -07:00
Jarred Sumner
5722ae8d04
Make prototype pollution attacks harder in most Bun APIs that accept objects ( #14119 )
2024-09-25 01:16:29 -07:00
Dylan Conway
5af782344f
fix(watch): use case insensitive path comparison ( #13909 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-09-14 01:41:33 -04:00
Jarred Sumner
ac17735cac
Retry after chmod when cp fails
2024-09-10 19:30:13 -07:00
Ciro Spaciari
bd3c258af4
fix(FormData, Bun.file()) FormData can append file slices, Bun.file(..).slice(..).text() works as expected ( #13580 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-08-30 00:53:40 -07:00
Meghan Denny
7fd072f4af
node:fs: use bun.assert to fix zig linter ( #13353 )
2024-08-16 18:23:45 -07:00
Meghan Denny
715ff7f323
node:fs: add additional error handling for flags and mode ( #13321 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-08-15 13:13:11 -07:00
Meghan Denny
30edb594a8
node:fs: use libuv callbacks instead of custom workpool for some operations on windows ( #13278 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-08-14 14:57:25 -07:00
Jarred Sumner
7aaf935711
Handle OOM better ( #13142 )
2024-08-09 00:43:54 -07:00
Meghan Denny
c63c55cbb1
node:fs: fix assertion when chown is passed non-numbers ( #13113 )
2024-08-07 02:29:50 -07:00
dave caruso
2680deb5d3
feat: bun build --compile --sourcemap ( #13047 )
2024-08-06 13:51:11 -07:00
Jarred Sumner
8a78b2241d
Rename JSC.Node.StringOrBuffer -> StringOrBuffer
2024-07-26 14:50:30 -07:00
Jarred Sumner
f1151a84ad
On Windows, fix fs.writeFile(1, fs.writeFile(2, fs.writeFile(\\nul ( #12410 )
...
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2024-07-10 19:49:36 -07:00
Jarred Sumner
e7031b07ae
Fix memory leak in withFileTypes: true in fs.readdir ( #12393 )
2024-07-06 20:22:55 -07:00
dave caruso
b76376f8a6
chore: upgrade zig to 0.13.0 ( #9965 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Grigory <grigory.orlov.set@gmail.com >
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
Co-authored-by: Meghan Denny <hello@nektro.net >
Co-authored-by: Kenta Iwasaki <63115601+lithdew@users.noreply.github.com >
Co-authored-by: John-David Dalton <john.david.dalton@gmail.com >
Co-authored-by: Dale Seo <5466341+DaleSeo@users.noreply.github.com >
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com >
Co-authored-by: paperdave <paperdave@users.noreply.github.com >
Co-authored-by: Georgijs Vilums <georgijs.vilums@gmail.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2024-06-20 13:48:39 -07:00
Ciro Spaciari
1d89c5988e
refactor OOM errors ( #11540 )
2024-06-02 22:56:26 -07:00
Meghan Denny
c456622161
node:fs/promises.cp should make path if dest does not exist ( #11433 )
2024-05-30 01:15:20 -07:00
Meghan Denny
ecb6c810c8
replace [bun.MAX_PATH_BYTES]u8 with bun.PathBuffer ( #11162 )
2024-05-21 15:55:49 -07:00
dave caruso
0457d6a748
fix(win): bugs with files in roots / bugs with resolver and unc shares ( #11155 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-05-21 13:51:47 -07:00
Meghan Denny
396dc78522
node:fs: add Dirent.path and .parentPath fields ( #11135 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com >
2024-05-21 11:24:05 -07:00
Zack Radisic
4b581b011c
feat: Add cp builtin to shell for Windows ( #10174 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com >
Co-authored-by: zackradisic <zackradisic@users.noreply.github.com >
2024-05-08 17:01:00 -07:00
Meghan Denny
e45cd749e5
chore(zig): add a new lint for using bun.FD.cwd() ( #10683 )
2024-05-01 16:12:09 -07:00
Meghan Denny
23e4f609bf
Revert "node:fs.readdir: should not fail even if folder contains self-referential symlinks" ( #10750 )
2024-05-01 14:59:01 -07:00
Meghan Denny
bd632464a0
node:fs.readdir: should not fail even if folder contains self-referential symlinks ( #10679 )
2024-05-01 13:25:47 -07:00
Meghan Denny
74c6bd4197
node:fs.fdatasync: include fd in Error when thrown ( #10678 )
2024-04-29 22:35:09 -07:00
Meghan Denny
b257a30977
node:fs: fix arg parsing of readSync ( #10527 )
2024-04-25 20:49:17 -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
Georgijs
fdcc844027
fix path resolution for writeFile in nodefs ( #10179 )
...
* fix path resolution for writeFile in nodefs
* add test
* [autofix.ci] apply automated fixes
* use force copy
* fix build
* fix test on windows
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-15 05:02:09 -07:00
Georgijs
22d6227a3a
fix wrong truncation on fs.writeFileSync with fd argument ( #10225 )
...
* fix wrong truncate
* close fd in test
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-12 13:02:24 -07:00
Jarred Sumner
688844b472
refactor: ban std.debug.assert ( #10168 )
...
* Ban `std.debug.assert`
* Create .clangd
* Update lint.yml
* Update linter.ts
* update
* lint
* Update linter.ts
* Update linter.ts
* update
* Update linter.ts
* update
* Update linter.ts
* more
* Update install.zig
* words
* Remove UB
2024-04-11 17:52:29 -07:00
Meghan Denny
cd52f42148
windows: fs/promises: fix when writing to file opened in append mode ( #10134 )
...
* windows: fs/promises: fix when writing to file opened in append mode
* add default values since we're using one now
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-09 22:57:10 -07:00
Meghan Denny
e209ae81dd
meta: ensure there's a single 'bun' import per file in zig ( #10137 )
...
* meta: ensure there's a single 'bun' import per file in zig
* undo this change in codegen
2024-04-09 22:41:07 -07:00
Jarred Sumner
5735feac5d
Redo file watcher + Fix EBUSY when saving lockfile on Windows ( #9972 )
...
* Fix `EBUSY` when saving lockfile on Windows
* Redo file watcher wrapper on Windows
* Update lockfile.zig
* Update win_watcher.zig
* Update src/bun.js/node/node_fs.zig
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
* Add retry logic
* Comments
* more careful
* smaller
* Fix garbage
* Normalize the paths
* hmmm
* [autofix.ci] apply automated fixes
* try
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-05 15:40:05 -07:00
Jarred Sumner
8326235ecc
Ask for fewer permissions when opening directories ( #9928 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-04-04 04:18:15 -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
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