taylor.fish
edf13bd91d
Refactor BabyList ( #22502 )
...
(For internal tracking: fixes STAB-1129, STAB-1145, STAB-1146,
STAB-1150, STAB-1126, STAB-1147, STAB-1148, STAB-1149, STAB-1158)
---------
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: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-09 20:41:10 -07:00
taylor.fish
437e15bae5
Replace catch bun.outOfMemory() with safer alternatives ( #22141 )
...
Replace `catch bun.outOfMemory()`, which can accidentally catch
non-OOM-related errors, with either `bun.handleOom` or a manual `catch
|err| switch (err)`.
(For internal tracking: fixes STAB-1070)
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2025-08-26 12:50:25 -07:00
Dylan Conway
8fad98ffdb
Add Bun.YAML.parse and YAML imports ( #22073 )
...
### What does this PR do?
This PR adds builtin YAML parsing with `Bun.YAML.parse`
```js
import { YAML } from "bun";
const items = YAML.parse("- item1");
console.log(items); // [ "item1" ]
```
Also YAML imports work just like JSON and TOML imports
```js
import pkg from "./package.yaml"
console.log({ pkg }); // { pkg: { name: "pkg", version: "1.1.1" } }
```
### How did you verify your code works?
Added some tests for YAML imports and parsed values.
---------
Co-authored-by: Claude Bot <claude-bot@bun.sh >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-08-23 06:55:30 -07:00
Dylan Conway
9a2dfee3ca
Fix env loader buffer overflow by using stack fallback allocator ( #21416 )
...
## Summary
- Fixed buffer overflow in env_loader when parsing large environment
variables with escape sequences
- Replaced fixed 4096-byte buffer with a stack fallback allocator that
automatically switches to heap allocation for larger values
- Added comprehensive tests to prevent regression
## Background
The env_loader previously used a fixed threadlocal buffer that could
overflow when parsing environment variables containing escape sequences.
This caused crashes when the parsed value exceeded 4KB.
## Changes
- Replaced fixed buffer with `StackFallbackAllocator` that uses 4KB
stack buffer for common cases and falls back to heap for larger values
- Updated all env parsing functions to accept a reusable buffer
parameter
- Added proper memory cleanup with defer statements
## Test plan
- [x] Added test cases for large environment variables with escape
sequences
- [x] Added test for values larger than 4KB
- [x] Added edge case tests (empty quotes, escape at EOF)
- [x] All existing env tests continue to pass
fixes #11627
fixes BAPI-1274
🤖 Generated with [Claude Code](https://claude.ai/code )
---------
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-28 00:13:17 -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
Ciro Spaciari
964f2a8941
fix(fetch/s3) Handle backpressure when upload large bodies ( #20481 )
...
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com >
2025-06-27 20:52:46 -07:00
190n
346e97dde2
fix bugs found by exception scope verification ( #20285 )
...
Co-authored-by: 190n <7763597+190n@users.noreply.github.com >
2025-06-18 23:08:19 -07:00
Jarred Sumner
498186764a
Remove a memcpy ( #20261 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2025-06-08 05:07:09 -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
Dylan Conway
8e80afbce1
Replace string runtime flags with enum ( #19827 )
2025-05-22 22:36:46 -07:00
Dylan Conway
acf36d958a
fix(npmrc): handle BOM conversion ( #18878 )
2025-05-06 22:16:56 -07:00
Christoph
b7c5bd0922
Fix crash on empty text file import ( #19165 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-04-25 23:42:41 -07:00
Jarred Sumner
9646bf1a38
Fixes #16671 ( #19227 )
...
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2025-04-23 16:42:33 -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
4ec410e0d7
internal: make @import("bun") work in zig ( #19096 )
2025-04-17 12:32:47 -07:00
chloe caruso
903706dccf
file descriptor rewrite ( #18790 )
2025-04-15 09:37:11 -07:00
Don Isaac
f730a355bf
fix: BufferWriter never returns an error ( #18981 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-04-13 08:57:41 -07:00
chloe caruso
c29933f823
implement require.extensions attempt 2 ( #18686 )
2025-04-01 14:31:16 -07:00
Jarred Sumner
f3da1b80bc
Use macOS signpost api for tracing ( #14871 )
...
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Don Isaac <donald.isaac@gmail.com >
Co-authored-by: DonIsaac <DonIsaac@users.noreply.github.com >
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2025-03-31 04:13:11 -07:00
Jarred Sumner
f38d35f7c9
Revert #18562 #18478 ( #18610 )
2025-03-28 20:23:49 -07:00
chloe caruso
8f4575c0e4
fix: detection module type from extension ( #18562 )
2025-03-27 20:47:31 -07:00
Don Isaac
75144ab881
fix: reflect-metadata import order ( #18086 )
...
Co-authored-by: DonIsaac <22823424+DonIsaac@users.noreply.github.com >
2025-03-26 16:19:45 -07:00
chloe caruso
589fa6274d
dev server: forgotten changes ( #17985 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-03-07 17:53:07 -08:00
chloe caruso
66cf62c3c4
dev server: rewrite HMRModule, support sync esm + hot.accept ( #17954 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-03-07 15:12:16 -08:00
Zack Radisic
e6cb0de539
CSS modules ( #17958 )
2025-03-06 23:35:06 -08:00
pfg
d502df353c
Support import with { type: "json" } and others ( #16624 )
2025-03-06 15:04:29 -08:00
Meghan Denny
1574df835e
zig: make JSValue.toBunString use JSError ( #17648 )
2025-02-25 13:04:44 -08:00
chloe caruso
cbeffe1b48
hmr7 ( #17641 )
2025-02-24 20:02:38 -08:00
chloe caruso
3b956757d9
disable async in script tags in dev server ( #17517 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-02-21 11:28:27 -08:00
chloe caruso
dc5fae461d
Implement simple barrel file optimization ( #17514 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-02-20 22:50:51 -08:00
Don Isaac
f0e7251b61
chore: remove dead in transpiler ( #17379 )
2025-02-16 02:20:39 -08:00
chloe caruso
2b97d61deb
chore: remove some trivial usage of usingnamespace ( #17268 )
2025-02-11 19:38:52 -08:00
Jarred Sumner
7a918d24a7
Fix loading react-jsxdev instead of react-jsx ( #17013 )
...
Co-authored-by: chloe caruso <git@paperclover.net >
2025-02-03 14:10:09 -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
Meghan Denny
676e8d1632
zig: delete is_bindgen ( #16858 )
2025-01-28 23:51:24 -08:00
Meghan Denny
af79cebf9e
unflag experimental css and html ( #16561 )
...
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com >
Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com >
2025-01-21 06:44:54 -08:00
Zack Radisic
d40f971a53
CSS fixes ( #16514 )
2025-01-18 23:55:54 -08:00
pfg
0d17843251
Fix bun run folder ( #15117 )
...
Co-authored-by: pfgithub <pfgithub@users.noreply.github.com >
2025-01-17 22:08:07 -08:00
chloe caruso
834ad11d48
get node:fs tests passing part 1 ( #16270 )
2025-01-14 20:53:02 -08:00
Jarred Sumner
c2e150f916
Revert "Skip javascriptcore's first parse step for ES Modules" ( #16370 )
2025-01-13 01:24:48 -08:00
pfg
ccc7bde7c6
Skip javascriptcore's first parse step for ES Modules ( #15758 )
2025-01-09 19:31:44 -08:00
Jarred Sumner
2465ccae53
Re-sync our Mutex implementation with zig stdlib ( #16271 )
2025-01-08 21:09:27 -08:00
chloe caruso
a3cbf974eb
transpiler: dont inline import.meta.require ( #16222 )
2025-01-07 23:14:09 -08:00
Jarred Sumner
da54e81955
Support bundling HTML files and their js, css, and assets in Bun.build and bun build ( #15940 )
2024-12-23 11:04:38 -08:00
Jarred Sumner
d6b9c444c1
Rename src/bundler.zig to src/transpiler.zig ( #15921 )
...
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2024-12-21 00:59:37 -08:00