Zack Radisic
0845231a1e
Fix pipeline stack errors on Windows ( #21800 )
...
### What does this PR do?
### How did you verify your code works?
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-14 18:03:26 -07:00
taylor.fish
41b1efe12c
Rename disabled parameter in Output.scoped ( #21769 )
...
It's very confusing.
(For internal tracking: fixes STAB-977)
2025-08-11 20:19:34 -07:00
Jarred Sumner
6ad208bc32
Fix integer cast truncation panic on Windows for buffers > 4GB ( #21738 )
...
## Summary
This PR fixes a panic that occurs when file operations use buffers
larger than 4GB on Windows.
## The Problem
When calling `fs.readSync()` or `fs.writeSync()` with buffers larger
than 4,294,967,295 bytes (u32::MAX), Bun panics with:
```
panic(main thread): integer cast truncated bits
```
## Root Cause
The Windows APIs `ReadFile()` and `WriteFile()` expect a `DWORD` (u32)
for the buffer length parameter. The code was using `@intCast` to
convert from `usize` to `u32`, which panics when the value exceeds
u32::MAX.
## The Fix
Changed `@intCast` to `@truncate` in four locations:
1. `sys.zig:1839` - ReadFile buffer length parameter
2. `sys.zig:1556` - WriteFile buffer length parameter
3. `bun.zig:230` - platformIOVecCreate length field
4. `bun.zig:240` - platformIOVecConstCreate length field
With these changes, operations with buffers > 4GB will read/write up to
4GB at a time instead of panicking.
## Test Plan
```js
// This previously caused a panic on Windows
const fs = require('fs');
const fd = fs.openSync('test.txt', 'r');
const buffer = Buffer.allocUnsafe(4_294_967_296); // 4GB + 1 byte
fs.readSync(fd, buffer, 0, buffer.length, 0);
```
Fixes https://github.com/oven-sh/bun/issues/21699
🤖 Generated with [Claude Code](https://claude.ai/code )
---------
Co-authored-by: Jarred Sumner <jarred@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
2025-08-10 04:01:35 -07:00
Alistair Smith
be5c69df79
fix: main is not readonly in @types/node ( #21612 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-04 13:07:42 -07:00
Jarred Sumner
4494353abf
Split up some of sys.zig into more files ( #21603 )
2025-08-04 07:02:06 -07:00
Meghan Denny
64361eb964
zig: delete deprecated bun.jsc.Maybe ( #21327 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: taylor.fish <contact@taylor.fish >
2025-07-25 12:38:06 -07:00
taylor.fish
07cd45deae
Refactor Zig imports and file structure (part 1) ( #21270 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-22 17:51:38 -07:00
pfg
83760fc446
Sort imports in all files ( #21119 )
...
Co-authored-by: taylor.fish <contact@taylor.fish >
2025-07-21 13:26:47 -07:00
Dylan Conway
1a9bc5da09
fix(install): isolated install aliased dependency name fix ( #21138 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: Meghan Denny <meghan@bun.sh >
2025-07-19 01:59:52 -07:00
Meghan Denny
875604a42b
safety: a lot more exception checker progress ( #20956 )
2025-07-16 00:11:19 -07:00
Zack Radisic
ac61b1d471
Use better function names for bun.String ( #20999 )
2025-07-12 18:19:16 -07:00
Dylan Conway
f24e8cb98a
implement "nodeLinker": "isolated" in bun install ( #20440 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-07-09 00:19:57 -07:00
Meghan Denny
f9712ce309
make node:buffer,zlib,stream,fs exception checker clear ( #20494 )
2025-06-25 18:36:08 -07:00
Zack Radisic
0a3ac50931
Refactor shell to use AllocationScope and fix memory issues ( #20531 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com >
2025-06-23 22:29:48 -07:00
Jarred Sumner
633f4f593d
Ahead-of-time frontend bundling support for HTML imports & bun build ( #20511 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2025-06-20 19:55:52 -07:00
Zack Radisic
41d10ed01e
Refactor shell and fix some bugs ( #20476 )
2025-06-19 18:47:00 -07:00
Zack Radisic
c103b57bcc
Split out shell code into more files ( #20331 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2025-06-15 14:09:15 -07:00
Jarred Sumner
c9761d4aa6
Fixes flaky test-http-pipeline-requests-connection-leak.js ( #20248 )
2025-06-07 05:19:11 -07:00
Jarred Sumner
c863e7582f
Fix dest field in sys.Error ( #20244 )
2025-06-07 04:00:36 -07:00
Jarred Sumner
eddee1b8cb
*anyopaque -> mach_port_t (#20243 )
2025-06-07 00:30:58 -07:00
Jarred Sumner
3ea6133c46
CI: Remove unused top-level decls in formatter in zig ( #19879 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-05-23 22:49:48 -07:00
Meghan Denny
d774baa28a
tidyings from 18962 ( #19644 )
2025-05-14 18:47:51 -07:00
Jarred Sumner
64ed68c9e0
Delete .node files from bun build --compile after dlopen ( #19551 )
...
Co-authored-by: 190n <ben@bun.sh >
2025-05-09 21:26:28 -07:00
Dylan Conway
acf36d958a
fix(npmrc): handle BOM conversion ( #18878 )
2025-05-06 22:16:56 -07:00
Jarred Sumner
e9c653a1b6
Reduce CPU usage when using Bun.spawnSync with inherit ( #19105 )
2025-05-03 20:33:57 -07:00
190n
dbd30fe33a
chore: fix windows debug build ( #19406 )
2025-05-01 16:36:19 -07:00
chloe caruso
3349c995b5
no usingnamespace, organize jsc namespace, enable -fincremental ( #19122 )
...
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2025-04-22 16:34:15 -07:00
chloe caruso
7d7512076b
remove more usingnamespace ( #19042 )
2025-04-17 19:04:05 -07:00
chloe caruso
4ec410e0d7
internal: make @import("bun") work in zig ( #19096 )
2025-04-17 12:32:47 -07:00
chloe caruso
be77711a4e
delete usingnamespace in bindings generator ( #19020 )
2025-04-15 12:14:47 -07:00
chloe caruso
903706dccf
file descriptor rewrite ( #18790 )
2025-04-15 09:37:11 -07:00
Jarred Sumner
f937750ff0
Clean up some bounds checks ( #18990 )
2025-04-13 08:56:40 -07:00
chloe caruso
8414ef1562
preserve symlinks ( #18550 )
2025-04-03 19:14:02 -07:00
Jarred Sumner
fee911194a
Remove dead code from js_printer ( #18619 )
2025-03-29 04:46:23 -07:00
pfg
8e0c8a143e
Fix for test-stdin-from-file closing fd '0' ( #18559 )
2025-03-27 21:38:50 -07:00
190n
de4182f305
chore: upgrade zig to 0.14.0 ( #17820 )
...
Co-authored-by: 190n <7763597+190n@users.noreply.github.com >
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com >
Co-authored-by: pfg <pfg@pfg.pw >
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2025-03-14 22:13:31 -07:00
chloe caruso
85376147a4
node:module compatibility pt 1 ( #18106 )
2025-03-12 15:47:41 -07:00
chloe caruso
1a6a34700f
chore: less usingnamespace, deprecate bun.C in favor of automatic translate-c ( #17830 )
2025-03-03 15:04:21 -08:00
Jarred Sumner
1de31292fb
Add react, tailwind, react+tailwind+shadcn to bun init ( #17282 )
...
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2025-02-18 10:38:37 -08:00
Jarred Sumner
baee1c10d3
Fix flaky patch test ( #17301 )
2025-02-13 00:22:05 -08:00
chloe caruso
2b97d61deb
chore: remove some trivial usage of usingnamespace ( #17268 )
2025-02-11 19:38:52 -08:00
Jarred Sumner
ba8573494a
Add shadcn, tailwind and react detection & templates to bun create. Also: bun install --analyze <files...> ( #17035 )
2025-02-09 09:36:57 -08:00
chloe caruso
f912e0abc4
hot module reloading for HTML import development mode ( #16955 )
2025-02-08 00:31:30 -08:00
Minsoo Choo
fa502506e5
Fix formatting for extern "c" ( #16983 )
2025-02-02 21:34:58 -08:00
Meghan Denny
26d3688e53
zig: update to 0.14.0-dev ( #16862 )
...
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com >
2025-02-01 01:11:02 -08:00
Dylan Conway
b098c9ed89
fix(fs): WriteStream pending write fastpath ( #16856 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-01-31 05:14:41 -08:00
Jarred Sumner
f7c5b0d5fc
Fix Stat constructor, remove native code allocation for stat objects ( #16694 )
2025-01-24 04:40:00 -08:00
Jarred Sumner
b54f3f33f0
Clean up node:fs utimes, futimes , and lutimes ( #16634 )
2025-01-23 05:09:07 -08:00
Jarred Sumner
ba2bd5cff4
Fixes #16620 ( #16621 )
2025-01-22 18:07:27 -08:00
chloe caruso
5819fe49a7
node fs compat pr #2 ( #16422 )
...
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Meghan Denny <meghan@bun.sh >
Co-authored-by: dylan-conway <35280289+dylan-conway@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-01-21 10:28:35 -08:00