Jarred Sumner
9388b3f825
Add a zig fmt action ( #2277 )
...
* Add a zig fmt action
* add failing file
* Setup prettier better
* Update prettier-fmt.yml
* Fail on error
* Update prettier-fmt.yml
* boop
* boop2
* tar.gz
* Update zig-fmt.yml
* Update zig-fmt.yml
* Update zig-fmt.yml
* Update zig-fmt.yml
* Update zig-fmt.yml
* boop
* Update prettier-fmt.yml
* tag
* newlines
* multiline
* fixup
* Update zig-fmt.yml
* update it
* fixup
* both
* w
* Update prettier-fmt.yml
* prettier all the things
* Update package.json
* zig fmt
* ❌ ✅
* bump
* .
* quotes
* fix prettier ignore
* once more
* Update prettier-fmt.yml
* Update fallback.ts
* consistentcy
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-03-02 19:02:10 -08:00
Justin Whear
e67b4e73b5
Fix 2063 ( #2079 )
2023-02-15 12:58:53 -08:00
Jarred Sumner
675529bd0c
Fixes https://github.com/oven-sh/bun/issues/2052
2023-02-11 18:11:09 -08:00
Alex Lam S.L
6052a3edbd
fix assertion failure ( #2033 )
2023-02-09 21:20:11 -08:00
Alex Lam S.L
119120d21c
[simdutf] workaround validation OOB access ( #2031 )
2023-02-09 20:26:23 -08:00
Dylan Conway
6fdbb25f9a
utf16 to utf8 conversion validation ( #2001 )
...
* use replacement character for invalid surrogate pairs
* return index of non-ascii
* non-allocating case
* edge cases
* function rename
* oops
* get length once, index counter
2023-02-08 14:42:10 -08:00
Jarred Sumner
cc4326cd82
Re-run prettier after changes
2023-01-31 17:55:16 -08:00
Alex Lam S.L
ec2c16fefa
fix assert() crash ( #1941 )
2023-01-30 12:20:29 -08:00
Jarred Sumner
eb5105aa09
Update buffer.test.js
2023-01-29 21:27:52 -08:00
Jarred Sumner
8e52e36846
[buffer] Buffer.byteLength passes Node.js tests
2023-01-29 03:45:58 -08:00
Jarred Sumner
7db4b90837
commit failing tests
2023-01-28 04:03:45 -08:00
Jarred Sumner
ec010e4930
Update buffer.test.js
2023-01-27 14:47:13 -08:00
Jarred Sumner
90d62ecc24
Add DOMJIT test
2023-01-23 23:08:31 -08:00
Jarred Sumner
7420cb1d73
fix test failure in aarch64 and add test for simd code path
2023-01-23 18:03:48 -08:00
Ciro Spaciari
b3533fb3a8
fix(Buffer) Fix arguments in buffer.write, fix size returned from buffer.write for utf16, fix size calc for base64, fix calc for hex byte size ( #1881 )
...
* fix buffer write when more than 2 args are passed
* fix encoding parameter
* better buffer write tests
* fix ucs2/utf8 len return
* fix base64 size in Buffer write
* fix hex encoding size
* actual fix base64
* actual fix base64
* fix segfault
* add fill parameter in Buffer.alloc
* use createUnitialized when alloc have fill parameter, use RETURN_IF_EXCEPTION when static casting
* fix utf16le, ucs2 copying in Buffer write
2023-01-23 16:48:52 -08:00
Jarred Sumner
a2cfdf0e1c
Refactor new Buffer to pass Node.js tests
2023-01-21 23:03:43 -08:00
Jarred Sumner
d955bfe50f
[buffer] Make Buffer.from pass more tests
2023-01-21 03:12:59 -08:00
Jarred Sumner
4648131c41
Add missing buffer module exports
2023-01-16 12:49:57 -08:00
Jarred Sumner
bcabf31121
Make Buffer mockable
2023-01-10 18:49:26 -08:00
Malcolm Still
f1e6ea2254
Implement Buffer swap16, swap32, swap64 ( #1659 )
...
* Implement Buffer swap16, swap32, swap64
* Initial incorporation of feedback
- Use constexpr
- Clean up the indexing
- Check for detached
- Use suggested text for exception text
2023-01-10 18:43:58 -08:00
Jarred Sumner
4a328609b9
10x faster new Buffer ( #1717 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-01-04 03:30:15 -08:00
Jarred Sumner
ed15259623
Fix Buffer.toString("latin1") and make Buffer.toString("utf16le") faster
...
Fixes #455
Fixes #1016
2022-11-27 20:21:41 -08:00
Jarred Sumner
4272038743
Fix failing buffer tests
2022-11-27 20:04:57 -08:00
Colin McDonnell
f7f1b60444
Add bun-types, add typechecking, add child_process types ( #1475 )
...
* Add bun-types to packages
* Improve typing
* Fix types in tests
* Fix dts tests
* Run formatter
* Fix all type errors
* Add strict mode, fix type errors
* Add ffi changes
* Move workflows to root
* Add workflows
* Remove labeler
* Add child_process types
* Fix synthetic defaults issue
* Remove docs
* Move scripts
* Run prettier
* Include examples in typechecking
* captureStackTrace types
* moved captureStackTrace types to globals
* Address reviews
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2022-11-09 15:40:40 -08:00
Jarred Sumner
af3931371e
Fix Buffer.from(text, "base64") and Buffer.toString("base64")
2022-11-08 21:30:54 -08:00
Jarred Sumner
38db5f1c83
Fix Buffer.slice and Buffer.subarray
2022-11-08 00:07:25 -08:00
Jarred Sumner
6970250b57
Fix Buffer.toJSON()
2022-10-06 14:18:12 -07:00
Jarred Sumner
0ce709d96a
Make new HTTP client more stable
2022-09-16 00:53:03 -07:00
Jarred Sumner
9797b676b1
Add test
2022-09-11 17:11:23 -07:00
Taher
8651799097
Fixed JSBuffer write issues ( #1175 )
2022-08-29 13:09:46 -07:00
Zilin Zhu
2641884342
Add buffer.indexOf, includes and lastIndexOf ( #1112 )
...
* Add buffer.indexOf, includes and lastIndexOf
* use memmem
* use int64_t
* fix upon reviews
2022-08-20 00:17:17 -07:00
Zilin Zhu
b1bc549cf7
fix buffer.slice(0, 0) ( #1114 )
2022-08-19 23:25:10 -07:00
Zilin Zhu
8cf57eb582
fix buffer.copy ( #1113 )
2022-08-19 23:13:38 -07:00
Jarred Sumner
0e4db0b28f
Add string support to Buffer.fill
2022-08-18 21:09:26 -07:00
Jarred Sumner
b310d7c40d
[node.js compat] latin1 & ascii encoding for Buffer
2022-08-03 21:11:20 -07:00
szatkus
a00eb95e29
#609 Don't truncate ascii buffers to 7-bit ( #775 )
2022-07-27 11:42:39 -07:00
Jarred Sumner
b15d862275
Fix buffer test which was failing for correct reasons
2022-06-23 01:35:48 -07:00
Jarred Sumner
729d445b68
change the directory structure
2022-06-22 23:21:48 -07:00