Meghan Denny
144a9c2f6d
node: fix buffer.writeBigInt return value ( #17695 )
2025-02-25 20:47:55 -08:00
Meghan Denny
82c26f0a58
node: Buffer.prototype.indexOf on number wasn't relative to buffer start ( #17631 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2025-02-24 14:26:40 -08:00
Meghan Denny
d862966631
node: test-buffer-write.js ( #17450 )
2025-02-22 00:24:44 -08:00
Meghan Denny
275a34b014
node: fix test-buffer-bigint64.js ( #17452 )
2025-02-20 14:16:09 -08:00
Meghan Denny
bdccbbc828
node: fix Buffer.from(arrayBuffer) ( #17267 )
2025-02-11 18:10:43 -08:00
Meghan Denny
180500181f
js: fix Buffer constructor and Buffer.from ( #16731 )
2025-02-07 15:13:21 -08:00
Meghan Denny
7d7a306313
js: Buffer: alias toString as toLocaleString ( #16732 )
2025-01-24 18:43:08 -08:00
dave caruso
79dc13ca79
pass all string decoder tests ( #15723 )
...
Co-authored-by: paperdave <paperdave@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-12-12 01:35:08 -08:00
Jarred Sumner
9d1a35b658
Fixes https://github.com/oven-sh/bun/issues/15556 ( #15582 )
...
Co-authored-by: Andres Gutierrez <andresgutierrez535@gmail.com >
2024-12-04 17:57:05 -08:00
Jarred Sumner
070e5804ad
Implement crypto.hash() ( #14683 )
2024-10-19 12:14:23 -07:00
Meghan Denny
3830b0c499
more passing node buffer tests ( #14371 )
2024-10-14 20:22:14 -07:00
Meghan Denny
25fcbed8d1
enhance Buffer.from to support (de)serialization roundtrip ( #14201 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-10-10 22:08:16 -07:00
Meghan Denny
05afe42f31
fix Buffer.fill with a non-null empty fill including uninitialized bytes ( #14199 )
2024-09-27 02:50:32 -07:00
Meghan Denny
7113206a7d
fix MAX_STRING_LENGTH constant value ( #14196 )
2024-09-27 02:48:04 -07:00
Jarred Sumner
14c63229a1
Revert "various node:buffer fixes" ( #13971 )
2024-09-14 23:41:33 -04:00
Meghan Denny
3c2e798eab
various node:buffer fixes ( #13757 )
...
Co-authored-by: nektro <nektro@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-09-14 04:09:20 -04:00
Jarred Sumner
cd6785771e
run prettier and add back format action ( #13722 )
2024-09-03 21:32:52 -07:00
Jarred Sumner
952d44b675
Fixes #13581 ( #13583 )
2024-08-28 13:54:57 -07:00
Jarred Sumner
3a245dd248
upgrade webkit ( #13192 )
...
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Zack Radisic <zack@theradisic.com >
2024-08-12 23:17:17 -07:00
Jarred Sumner
cb81fc5445
Make ${encoding}Slice & ${encoding}Write work on Uint8Array ( #12491 )
2024-07-10 16:58:01 -07:00
Jarred Sumner
fd6fd78f0f
Fixes #9120 ( #9128 )
...
* Fixes #9120
* Update buffer.test.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-02-26 19:15:28 -08:00
Meghan Denny
3a7df3f6c7
windows: add more passing test ( #8615 )
2024-02-01 13:45:47 -08:00
dave caruso
072f2f15ea
ci: run windows tests and also run them concurrently ( #7758 )
2024-01-12 17:02:20 -08:00
Jarred Sumner
8f975ec8ec
Faster Buffer.concat, fixes #8034 ( #8039 )
...
* Faster, safer `Buffer.concat`
* Use wrappers when creating `Buffer` in C++
* Bun.concatArrayBuffers small optimization
* Add comment
* Add tests
* Ignore empty buffers
* Add assertion
* Update buffer-concat.mjs
* Update buffer-concat.mjs
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-08 14:37:18 -08:00
Jarred Sumner
b43a8b54cf
Implement expect.unreachable(msg?: string | Error) ( #7131 )
...
* Implement `expect.unreachable`
* UIse expect.unreachable() in some tests
* Use more unreachable
* More unreachable
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-11-15 16:14:13 -08:00
Hanaasagi
8880bf1026
fix(node:buffer): fix Buffer.readUintBE ( #6770 )
...
Close : #6759
2023-10-30 00:07:27 -07:00
Ai Hoshino
1836ecd2ed
fix(node:buffer): fix Buffer.write stuck ( #6651 )
2023-10-22 13:42:05 -07:00
Ai Hoshino
0173571b19
fix(node:buffer): fix the behavior of totalLength in Buffer.concat ( #6574 )
...
* fix(node:buffer): fix the behavior of `totalLength` in `Buffer.concat`
Close : #6570
Close : #3639
* fix buffer totalLength type
---------
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
2023-10-18 14:30:53 -07:00
dave caruso
eb1dc7eede
fix(runtime/node): Allow new Buffer.alloc() + Upgrade WebKit ( #5699 )
...
* make bufferconstructor a static hash table
* chore: Upgrade WebKit to 4d995edbc44062b251be638818edcd88d7d14dd7
* make it constructable now
* fix comment
* yippee
* update CI workflows
2023-09-18 17:33:58 -07:00
Ai Hoshino
c4507a5db3
Fix Buffer.from to handle double-byte hex encoding strings ( #4933 )
...
Close : #4919
2023-09-11 17:27:12 -07:00
dave caruso
57a06745a4
Progress for Next.js ( #4468 )
...
* L
* ipc
* asdfghjkl
* dfghjk
* it works!
* types
* patches for next.js
* sdfghj
* wsdfgn,./
* this
* yolo
* okay loser
* asdfghjk
* add some more APIs
* MESS
* sdfghjkl
* remove native events from streams
* stuff
* remove lazy(primordials) test
* debugging
* okay
* less fake extensions object
* fix `Buffer.toString()` args logic
* fix deserialize
* make tests work
* add test for `Buffer.toString` args
* Update server.zig
* remove test
* update test
* Update spawn-streaming-stdin.test.ts
* fix linux build
* Update fs.test.ts
* cli message improvements
* dfshaj
* Fix fs.watch bug maybe?
* remove
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-09-07 04:58:44 -07:00
Jarred Sumner
c99a9ba33a
Implement File
2023-08-21 01:29:06 -07:00
Ai Hoshino
385d440694
Fix constructing buffer from a UTF16 string with the Latin1 encoding. ( #4086 )
...
Close : #3914
2023-08-09 09:45:50 -07:00
Yifei Wang
bdbc21ff7b
Buffer.copy should ignore out-of-range sourceEnd ( #3971 )
2023-08-04 16:08:25 -07:00
Ashcon Partovi
08cf0d562a
Bunch of fixes ( #3516 )
...
* Fix #3497
* Fix #3497
* Run prettier
* Fix package.json
* remove this too
* yeah
* Fix missing tests
* Use native for utf-8-validate
* Add module ID names to builtins
* Defer evaluation of ESM & CJS modules until link time
* Use builtin name for exports in plugins
* Add module IDs to builtins
* Update JSC build with new flag
* WebKit upgrade fixes
* Update WebKit
* prettier
* Upgrade WebKit
* bump
* Update once again
* Add visitAdditionalChildren, remove .fill() usage
* Update process.test.js
* Update fs.test.ts
---------
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-03 15:31:55 -07:00
dave caruso
c2a77cf7ec
Rewrite built-in modules to use CommonJS over ESM ( #3814 )
...
* stfdsafsd
sadffdsa
stuff
finish commonjs stuff
asdf
not done but work
not done but work
not done yet but this is how far i am
remove files
lol
update built files
uncomment everything in events lol
export default
stuff
* afdsafsd
* its not perfect but almost done
* okay
* cool
* remove temp file
* finish rebase
* revert settings.json
* a
* ch-ch-ch-ch-changes
* okay
* remove this check in release for now
* sxdcfghnjm,
* lkjhgf
* fmt
* filename can be null
* Update NodeModuleModule.h
* weee
* fmt
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-02 16:27:36 -07:00
Ai Hoshino
c2755f770c
Add alias for readBigUInt64BE ... ( #3514 )
...
* Add alias for `readBigUInt64BE` ...
Close: https://github.com/oven-sh/bun/issues/3338
* add some tests for `readBigUint64BE` alias
* format code
2023-07-04 15:38:44 -07:00
Jarred Sumner
c3f8593f8c
[node:buffer] Implement isUtf8 and isAscii ( #3498 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-07-02 18:06:21 -07:00
Ai Hoshino
4720fa1207
[WIP]Fix calling Buffer.toString with (offset, length, encoding) ( #3467 )
...
* Allow `toString` to be called with `(offset, length, encoding)`.
Close : #3085
* handle undefined value
* add tests for buffer.xxxSlice
* fix parameters
* fix offset and length
2023-07-01 17:01:52 -07:00
Jarred Sumner
e869fc092f
[node:buffer] Add missing inspect function
...
cc @paperdave
2023-05-22 13:53:24 -07:00
Alex Lam S.L
28346e4a39
improve Buffer compatibility with Node.js ( #2341 )
...
* improve `Buffer` compatibility with Node.js
* use `memmove()`
allow `encoding` to be `undefined`
2023-03-07 22:29:29 -08:00
Ashcon Partovi
f7e4eb8369
Reorganize tests ( #2332 )
2023-03-07 12:22:34 -08:00