Claude Bot
8eba202718
feat: improve bytes import loader for TC39 compliance
...
- Add immutability (freeze) to Uint8Array and ArrayBuffer as per TC39 spec
- Optimize base64 decoding to use native Uint8Array.fromBase64 when available
- Add comprehensive tests for immutability requirements
- Add tests to verify same object returned for multiple imports
- Update bundler tests to verify immutability in build mode
The TC39 import-bytes proposal requires that imported bytes are immutable.
This change ensures compliance by freezing both the Uint8Array and its
underlying ArrayBuffer. Performance is also improved by using the native
Uint8Array.fromBase64 method when available (Stage 3 proposal).
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-23 18:47:07 +00:00
Jarred-Sumner
a642496daf
bun run prettier
2025-07-05 11:36:57 +00:00
Jarred-Sumner
8cebd2fc73
bun run zig-format
2025-07-05 11:35:40 +00:00
Jarred Sumner
9c8b40a094
Don't clone the bytes
2025-07-05 04:32:23 -07:00
Jarred Sumner
d3989ccc79
Update ModuleLoader.zig
2025-07-05 04:29:44 -07:00
Jarred Sumner
8ea625ea6c
feat: implement bytes import type attribute
...
Adds support for importing binary files as Uint8Array using the ES2022 import attributes syntax:
```javascript
import data from './file.bin' with { type: "bytes" };
// data is a Uint8Array containing the file contents
```
This follows the same pattern as the existing "text" and "file" import types, providing a convenient way to load binary data at build time. The implementation uses base64 encoding during transpilation and converts to Uint8Array at runtime using the native Uint8Array.fromBase64 method when available, with a polyfill fallback.
Key changes:
- Add bytes loader enum value and mappings in options.zig
- Add __base64ToUint8Array runtime helper using Uint8Array.fromBase64
- Implement transpiler support using lazy export AST pattern
- Add bundler support in ParseTask.zig
- Handle bytes loader in ModuleLoader with special case for runtime
- Add comprehensive test coverage
The loader validates that only default imports are allowed, matching the behavior of text and file loaders.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-07-05 04:18:28 -07:00
Dylan Conway
906b287e31
fix BUN-KHE ( #20820 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-07-04 15:17:24 -07:00
Jarred Sumner
eabbd5cbfb
Fix React HMR duplicate identifier error for named default exports ( #20812 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-07-04 03:06:00 -07:00
Meghan Denny
068997b529
make node:dns,net,cluster,tls exception checker clear ( #20658 )
...
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com >
2025-07-03 18:28:38 -07:00
Michael H
0612dc7bd9
Support process.features.typescript ( #20801 )
2025-07-03 16:26:32 -07:00
Michael H
8657d705b8
remove yarn from default-trusted-dependencies.txt ( #20684 )
2025-07-03 16:23:03 -07:00
Meghan Denny
2e59e845fa
test: refactor node-napi.test.ts for more observability ( #20781 )
...
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com >
2025-07-03 14:37:11 -07:00
Meghan Denny
00df6cb4ee
Bump
2025-07-03 11:59:00 -07:00
Jarred Sumner
0d4089ea7c
Fixes #20753 ( #20789 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
bun-v1.2.18
2025-07-03 01:06:22 -07:00
Jarred Sumner
27c979129c
Introduce Bun.randomUUIDv5 ( #20782 )
...
Co-authored-by: Cursor Agent <cursoragent@cursor.com >
Co-authored-by: jarred <jarred@bun.sh >
Co-authored-by: Meghan Denny <meghan@bun.sh >
2025-07-02 22:47:14 -07:00
Jarred Sumner
8bb835bf63
Fix: Dynamic imports incorrectly resolve to CSS files when code splitting is enabled ( #20784 )
...
Co-authored-by: Meghan Denny <meghan@bun.sh >
2025-07-02 22:31:02 -07:00
Jarred Sumner
8bf50cf456
Fix 2 differences in napi vs node ( #20761 )
...
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <Jarred-Sumner@users.noreply.github.com >
2025-07-02 22:11:21 -07:00
Meghan Denny
01e2cb25e3
test: bump zlib/leak.test.ts for asan
2025-07-02 21:48:24 -07:00
Jarred Sumner
010e715902
Upgrade Webkit to 29bbdff0f94f ( #20780 )
2025-07-02 20:50:15 -07:00
Jarred Sumner
8b321cc1c6
Match Node.js v24 behavior for napi_get_value_string_utf8 handling of NAPI_AUTO_LENGTH ( #20698 )
...
Co-authored-by: Claude <noreply@anthropic.com >
2025-07-02 20:10:08 -07:00
Zack Radisic
0b9bab34d8
SSG ( #20745 )
...
Co-authored-by: Alistair Smith <hi@alistair.sh >
2025-07-02 20:06:43 -07:00
Meghan Denny
61f0cc497b
ci: log available disk space at the start of build/test run ( #20779 )
2025-07-02 19:43:54 -07:00
Michael H
764e20ee19
implement bun pm version ( #20706 )
2025-07-02 18:54:47 -07:00
Meghan Denny
0276f5e4a3
misc: use fromJSHostCallGeneric in a few more places ( #20778 )
2025-07-02 18:35:44 -07:00
Jarred Sumner
5a7b5ceb33
Fix several missing async context tracking callbacks ( #20759 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2025-07-02 17:45:00 -07:00
Ciro Spaciari
a04cf04cd5
fix(grpc/http2) fix tonic Rust support ( #20738 )
...
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com >
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-07-02 17:43:38 -07:00
Ben Grant
79284376ca
Delete test-net-bytes-stats.js
...
Mistakenly re-added in #20659 after prior revert in #20693
2025-07-02 17:32:19 -07:00
Alistair Smith
452000a2ce
Node.js test test-fs-watchfile.js ( #20773 )
2025-07-02 15:04:39 -07:00
190n
172aecb02e
[publish images] Upgrade self-reported Node.js version from 22.6.0 to 24.3.0 (v2) ( #20772 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Meghan Denny <meghan@bun.sh >
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: pfg <pfg@pfg.pw >
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-07-02 12:06:08 -07:00
Ben Grant
ea57037567
Revert "Upgrade self-reported Node.js version from 22.6.0 to 24.3.0 ( #20659 ) [publish images]"
...
This reverts commit 80309e4d59 . It breaks the Windows CI.
2025-07-02 09:40:32 -07:00
Jarred Sumner
80309e4d59
Upgrade self-reported Node.js version from 22.6.0 to 24.3.0 ( #20659 ) [publish images]
...
Co-authored-by: Claude <noreply@anthropic.com >
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Meghan Denny <meghan@bun.sh >
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: pfg <pfg@pfg.pw >
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com >
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Ben Grant <ben@bun.sh >
2025-07-02 00:03:05 -07:00
190n
48c5256196
Fix assertions_only usage in fromJSHostCallGeneric ( #20733 )
2025-07-01 23:36:56 -07:00
Jarred Sumner
e1ec32caea
Fix incorrect comptime conditional
2025-07-01 20:33:34 -07:00
mizulu
7f55b1af55
docs: fix missing word in the bundler text loader section ( #20723 )
2025-07-01 16:05:06 -07:00
Jarred Sumner
fbe405fb89
Fail the test when no tests match the filter ( #20749 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2025-07-01 16:03:19 -07:00
pagal
cd561c6bba
Documentation fix for --filter ( #20714 )
2025-07-01 15:30:39 -07:00
Jarred Sumner
1b5c6fcfb5
Update building-bun.mdc
2025-07-01 14:44:16 -07:00
Jarred Sumner
74e65317f2
Fix type for HTML imports ( #20744 )
2025-06-30 23:36:41 -07:00
Jarred Sumner
72d43590a1
Add export default to more node polyfills ( #20747 )
...
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2025-06-30 23:02:52 -07:00
Jarred Sumner
9049b732db
Fix regression from referencing global inside of node fallbacks without making it === globalThis ( #20739 )
2025-06-30 18:57:58 -07:00
Jarred Sumner
1e3d82441c
Create environment.json
2025-06-30 15:00:16 -07:00
Meghan Denny
ca59ed04bd
node: sync updated tests ( #20625 )
2025-06-30 14:52:50 -07:00
Jarred Sumner
fc7e2e912e
Revert "Configure cursor background agents"
...
This reverts commit 16915504da .
2025-06-30 10:02:16 -07:00
Jarred Sumner
16915504da
Configure cursor background agents
2025-06-30 09:28:27 -07:00
github-actions[bot]
6d03bdfc03
deps: update sqlite to 3.50.200 ( #20711 )
...
Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com >
2025-06-28 23:47:47 -07:00
Jarred Sumner
034bcf2b57
Deflake
...
These tests should not have been marked as passing.
test/js/node/test/parallel/test-cluster-worker-kill-signal.js
test/js/node/test/parallel/test-child-process-prototype-tampering.mjs
2025-06-28 23:45:34 -07:00
pfg
3223da2734
ReadableStream .text(), .json(), .arrayBuffer(), .bytes() ( #20694 )
...
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-06-28 00:27:57 -07:00
Jarred Sumner
dd67cda545
Fixes #20615 ( #20616 )
2025-06-27 22:05:20 -07:00
Sharun
a067619f13
docs(prisma): update the prisma init command to use --bun ( #15171 )
...
Co-authored-by: Meghan Denny <meghan@bun.sh >
2025-06-27 22:04:52 -07:00
Yiheng
c9242dae3a
Update bunfig.md ( #16029 )
2025-06-27 21:32:38 -07:00