Jarred Sumner
84af4f0133
more gc in fs test
2022-09-30 01:04:10 -07:00
Jarred Sumner
c30346cf5d
Create test_scope_debug.ts
2022-09-30 00:25:28 -07:00
Jarred Sumner
3d35fae890
Add some tests for request body streaming
...
Need to fix an off-by-one error with Blob it seems
2022-09-28 23:43:40 -07:00
Jarred Sumner
b74351e55f
Support a default object in CommonJS wrapper
...
Fixes https://github.com/oven-sh/bun/issues/1284
Related to https://github.com/oven-sh/bun/issues/1285
2022-09-28 14:37:35 -07:00
Jarred Sumner
24a9bc23b7
[Web Streams] Add body to Response and Request ( #1255 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-09-26 20:04:28 -07:00
Jarred Sumner
9833841101
wip
2022-09-25 13:14:23 -07:00
Jarred Sumner
ffde9f7842
📷
2022-09-25 13:14:23 -07:00
Albert Putra Purnama
2819509786
test: Promisify basic tests ( #1018 )
...
* Promisify basic tests
* Add License header from node
* Add tests to complete existing promisify parity with node
* Update expected error message from nodejs test
2022-09-24 19:05:18 -07:00
Jarred Sumner
62e22b2995
Implement Bun.which
2022-09-23 03:10:56 -07:00
Jarred Sumner
2c1926993b
Faster Blob + begin to implement FileSink
2022-09-22 23:45:02 -07:00
Jarred Sumner
0968fd339f
Add epoll to list of syscalls that can fail
2022-09-22 03:06:48 -07:00
Jarred Sumner
ce9daa4857
1 event loop per thread. Instead of 3.
...
uWebSockets and uSockets will need to be upgraded to match the changes.
Previously:
- Bun had a separate kqueue/eventfd just for async wakeups.
- Bun had a separate kqueue/epoll just for reading files non-blocking in the same thread
This commit unifies it into one event loop per thread
2022-09-22 02:25:32 -07:00
Jarred Sumner
f1ffc72a62
Fix bun run foo -- by ignoring --
2022-09-22 01:56:07 -07:00
Jarred Sumner
37eee4235d
Fix preact & other "classic" jsx transforms, most likely
2022-09-21 20:00:12 -07:00
Jarred Sumner
6163fb830e
Add navigator.userAgent , navigator.hardwareConcurrency
2022-09-20 00:44:59 -07:00
Jarred Sumner
21770eb0f3
Implement imports in package.json (#foo imports)
...
Fixes https://github.com/oven-sh/bun/issues/478
Fixes https://github.com/oven-sh/bun/issues/234
Fixes https://github.com/oven-sh/bun/issues/822
2022-09-19 20:03:02 -07:00
Jarred Sumner
f55b9a8530
Fix origin missing protocol in URL
...
Fixes https://github.com/oven-sh/bun/issues/1244
2022-09-16 16:45:26 -07:00
Jarred Sumner
0ce709d96a
Make new HTTP client more stable
2022-09-16 00:53:03 -07:00
Jarred Sumner
a291c1676f
5x faster crypto.randomValues()
2022-09-14 18:23:22 -07:00
Jarred Sumner
7bfa302b75
Make crypto.getRandomValues() faster + fix > 1 byte/element typed arrays
...
Fix crypto.getRandomValues() with > 1 byte element typed arrays
Fixes https://github.com/oven-sh/bun/issues/1237
2022-09-14 04:12:32 -07:00
Jarred Sumner
9797b676b1
Add test
2022-09-11 17:11:23 -07:00
Jarred Sumner
c600196b1a
[node:fs] Fix readFileSync on non-regular files
...
Fixes https://github.com/oven-sh/bun/issues/1220
2022-09-09 19:26:02 -07:00
Jarred Sumner
f496740c19
[bun:ffi] Add f32, f64, i64, u64 to read`
2022-09-09 18:10:36 -07:00
Jarred Sumner
bcbe1b410a
Last commit was missing some code
2022-09-08 23:37:59 -07:00
Jarred Sumner
206820d27a
[bun:ffi] Implement read.{u8,i8,i16,i32,u16,u32,ptr,intptr}
...
`read` in `bun:ffi` lets you read data from a pointer without creating a new DataView/ArrayBufferView
```
import {read} from 'bun:ffi';
expect(read.i8(ptr_, i)).toBe(view.getInt8(i, true));
expect(read.i16(ptr_, i)).toBe(view.getInt16(i, true));
expect(read.i32(ptr_, i)).toBe(view.getInt32(i, true));
expect(read.u8(ptr_, i)).toBe(view.getUint8(i, true));
expect(read.u16(ptr_, i)).toBe(view.getUint16(i, true));
expect(read.u32(ptr_, i)).toBe(view.getUint32(i, true));
}
```
2022-09-08 23:29:30 -07:00
Jarred Sumner
a3cc9aaf6f
Make some more globals modifiable
2022-09-08 00:00:18 -07:00
Jarred Sumner
2dbc991af9
More tests for Bun.write
2022-09-07 19:58:04 -07:00
Jarred Sumner
c4b9c12677
Fix flaky tests
2022-09-07 19:56:23 -07:00
Jarred Sumner
65affacc50
Fix missing file in SQL-raw test
2022-09-06 21:00:56 -07:00
Jarred Sumner
6e9159a9ad
workaround test failure
2022-09-06 20:59:18 -07:00
Jarred Sumner
11aa17a57c
Support async onLoad callbacks in Bun.plugin
2022-09-05 23:05:22 -07:00
Jarred Sumner
7acf5d3831
Some tests
2022-09-04 00:54:51 -07:00
Jarred Sumner
04cc1968db
Fix createRequire() in node:module
...
Fixes https://github.com/oven-sh/bun/issues/831
Fixes https://github.com/oven-sh/bun/issues/453
2022-09-03 21:48:06 -07:00
Jarred Sumner
0ca42e81f3
Plugin API ( #1199 )
...
* Plugin API
* Fix the bugs
* Implement `"object"` loader
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-09-03 03:57:43 -07:00
Dylan Conway
8b2d07e82e
fixed is_export and added test cases ( #1203 )
2022-09-03 01:39:24 -07:00
Zilin Zhu
700c31dd13
Add native StringDecoder ( #1188 )
...
* Add native StringDecoder
* fix upon reviews
* add Constructor and use LazyClassStructure
2022-09-01 12:56:41 -07:00
Taher
8651799097
Fixed JSBuffer write issues ( #1175 )
2022-08-29 13:09:46 -07:00
Jarred Sumner
d7dbe6f329
Remove code that doesn't work
2022-08-28 21:46:47 -07:00
Jarred Sumner
c1734c6ec5
More reliable macOS event loop ( #1166 )
...
* More reliable macOS event loop
* Reduce CPU usage of idling
* Add another implementation
* Add benchmark
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-08-28 21:28:05 -07:00
Zilin Zhu
ce90e0c372
support pass null as NULL ptr ( #1160 )
2022-08-28 06:19:53 -07:00
Jarred Sumner
af5c4dedca
Update WebKit ( #1165 )
...
* Update WebKit
* Fix `DataView` and non-8 bit sized typed arrays with TextDecoder
* New WebKit
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-08-27 23:46:05 -07:00
Zilin Zhu
6644c2fd17
Fix ffi uint64_t parameter ( #1158 )
2022-08-27 12:32:13 -07:00
Hyro
7a734e0a28
feat: implement native os module ( #1115 )
...
* feat: implement os module
* revert(bun-error): package-lock.json
* feat: implement EOL
* feat: implement EOL
* feat: implement arch function
* feat: implement homedir function
* add comptime to homedir if
* feat: add platform function
* feat: implement type function
* feat: add hostname (not sure iff works on all platforms)
* chore: make requested changes
* fix: change toValueGC into toValue in arch function
* add EOL, devNull constant variables
* fix: store only string
* feat: add tests
* feat: add endianness
* ususe toValue for devNull & EOL
* feat: implement endianness & fix release
* revert javascript.zig fix
* feat: implement tmpdir
* feat: implement totalmem, freemem, uptime
* feat: loadavg
* feat: implement version
* feat: add userInfo
* feat: implement totalmem for macos
* feat: add getPriority (not finished, waiting for dc response)
* feat: finish userInfo implementation
* feat: implement cpus, not done
* feat: finish getPriority implementation & stats cpus()
* feat: implement setPriority
* reemove test.c
* feat: implement constants.dlope.xn, constants.priority.x, constants.UV_UDP_REUSEADDR
* feat: implement signals, errno
* updated cpus function, stilldoesnt work
* increase object length
* feat: add t more ests
* feat: add cpus()
* remov some files
* fix: handle empty array
* started working on interface addresses (in C)
ill use C++ after it work
* fix interface_addresses
* Improved getCpuInfo code, decreased ram usage, increased speed
* getCpuTime optimizations
* started working on networkInterfaces
* feat: networkInterfaces implementation
* delete unnecessary files
* add benchs & fix code
* add tests
* add missing benchs
* Increased buffer of getCpuInfo to 2048, it should skip few iterations
* remove hardcoded constants
* feat: implement errno constants
* fix getWindowsErrorConstant
* feat: add signal constants
* feat: implement priority constants
* remove duplications
* fix: change value to ?i16
* fix(__defineConstant): make some parameters comptime, change value to ?i32
* fix: add E to ERRNO constants, add SIG to SIG constants
* feat: add dlopen constants
* change functions to private
* feat: add UV_UDP_REUSEADDR
* fix typo
* simplify functions
* rename functions in bindings
* feat: implement loadavg for darwin
* feat: implement system uptime
* feat: implement get free memory for darwin
* fix system memory bindings
* feat: implement network interfaces for darwin
* code cleanup
* feat: support for macos version & release
* some fixes
* MacOS support for CpuInfo
* Fixed minor mistake in getCpuInfo_B
* Delete test.zig
* Update c_cpp_properties.json
* Update tasks.json
* feat: implement scopeid
* feat: implement cidr 🚀
* remove unnecesarry changes
* remove unnecesarry changes
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* chore: requested changes
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* fix: import string
* fix: change IPV6 to IPv6
* fix some things
* chore: make requested changes
* revert: launch.json
* fix test
* Fixed few memory leaks
* testing
* again
* added len
* another test
* improved parsing
* added small check
* Bonk
* FINISH 🚀 🚀 🚀 🚀 🚀 🚀
* Update tasks.json
* NetworkInterface test
* FINISH 🚀 🚀 🚀
Co-authored-by: Fire-The-Fox <gajdos.jan77@gmail.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-08-25 19:38:28 -07:00
Jarred Sumner
c4580ee2ca
Rename reactdom-bun -> react-dom-server.bun
2022-08-21 01:00:27 -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
0a0f8ff41c
Update bun init test
2022-08-19 00:35:26 -07:00
Jarred Sumner
0f45386673
Make Request, Response and TextDecoder not read-only
2022-08-18 23:21:52 -07:00
Jarred Sumner
0e4db0b28f
Add string support to Buffer.fill
2022-08-18 21:09:26 -07:00