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
Jarred Sumner
036e580045
Fixes https://github.com/oven-sh/bun/issues/1069
2022-08-18 01:13:11 -07:00
Jarred Sumner
5de8271181
Handle builds with remote inspector disabled
2022-08-18 00:22:24 -07:00
Jarred Sumner
cb1114dba6
uncomment
2022-08-17 19:27:35 -07:00
Jarred Sumner
bc412e1f6f
slightly improve streams perf
2022-08-17 19:25:43 -07:00
Jarred Sumner
4df0385c23
Update WebKit
2022-08-12 18:28:32 -07:00
Jarred Sumner
4fe24a4f3c
Log uncaught exceptions
2022-08-10 21:46:17 -07:00
Jarred Sumner
d9ae284463
Fix console.log with typed arrays
2022-08-10 21:26:20 -07:00
Jarred Sumner
2644b9d792
[TS] Fix bug with import Foo = require("bar")
...
Closes https://github.com/oven-sh/bun/issues/1045
2022-08-10 15:08:54 -07:00
Jarred Sumner
67cdf1c9b3
Commit snapshot
2022-08-10 13:41:43 -07:00
Jarred Sumner
c148c33510
[js] Fix console.log(Infinity)
2022-08-09 16:37:05 -07:00
Jarred Sumner
429abc1278
[bun:ffi] ~30% perf improvement for wrapped functions
2022-08-09 16:35:06 -07:00
Jarred Sumner
3dca3baaec
[bun:ffi] Re-enable most of the tests
2022-08-09 16:17:35 -07:00
Jarred Sumner
f44f98be33
[node compat] Add tests for fs.copyFileSync
2022-08-09 05:48:22 -07:00
Jarred Sumner
b36b7fee16
[node compat] Implement require.resolve
2022-08-09 01:41:13 -07:00
Zilin Zhu
463f2b7dab
fix segfault for query().all() with more than 64 properties ( #1025 )
...
* fix segfault for query().all() with more than 64 properties
* Update src/bun.js/bindings/sqlite/JSSQLStatement.cpp
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2022-08-08 00:54:13 -07:00
Jarred Sumner
05bca1e4e4
bun link fixture
2022-08-07 23:28:10 -07:00
Hyro
1cb8f0fa73
feat(util): support for util.TextDecoder ( #990 )
...
* build:(landing) automated website build
* Revert "build:(landing) automated website build"
This reverts commit ddee8485fd .
* feat(util): support for util.TextDecoder
* tests(util): add TextDecoder
* tests: seperate text-decoder
Co-authored-by: xHyroM <xHyroM@users.noreply.github.com >
2022-08-05 10:42:52 -07:00
Soney Mathew
9fad889f26
Fix for bearer tokens missing from request headers on bun install step ( #991 )
2022-08-05 03:15:26 -07:00
Jarred Sumner
7e3fe03fb0
[bun init] Add a test
2022-08-04 23:21:41 -07:00
Jarred Sumner
1bc8c92e2f
[misc] Add bun-types to repo
2022-08-04 22:16:05 -07:00
Jarred Sumner
f0d332e287
[bun:sqlite] Fix crash when > 64 columns
...
Fixes https://github.com/oven-sh/bun/issues/987
2022-08-04 22:16:05 -07:00
Jarred Sumner
b310d7c40d
[node.js compat] latin1 & ascii encoding for Buffer
2022-08-03 21:11:20 -07:00