aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-02-22wiptest -> test (#2131)Gravatar Dylan Conway 1-4/+2
* +/- for object diff, quote more strings * wiptest -> test * quote strings fix
2023-02-21`isRegExp()` without cppGravatar Dylan Conway 1-1/+7
2023-02-21Update test runner output with colors and diffs (#2122)Gravatar Dylan Conway 5-41/+113
* add zig-diff * move diff functions * toHaveProperty diff for objects * use formatter * format labels * move work to format, diff when it makes sense * remove comptime, dim equal slices * order before diff * line diffs * add diffz * switch to diffz * add `diffLines()` function * small `prettyFmt()` bug fix * test runner color output * update `toBe()` error output * fix test * diff method, fix crash * fix link test * remove `isRegex`
2023-02-18fix: Print URL as object in (#2104)Gravatar Micha Reiser 1-4/+0
2023-02-17Fix #1602 (#2066)Gravatar Justin Whear 7-72/+136
* initial test case * fix segfault from JSObjectMakeDeferredPromise * pass exceptions through from FetchHeader.createFromJS * not resolved, but getting close * implement review suggestions * fix exception check, tests * Change how header filtering is accomplished Previously the FetchHeaders implementation relied on converting names and values to IDLByteString to catch non-ASCII data, though not always reliably. This resulted in message-less TypeErrors when headers contained invalid characters. This commit shifts everything to IDLDOMString for the conversion and relies on the actual error checking in FetchHeaders.canWriteHeader, resulting in nicer error messages. To ensure that all headers are written as ASCII/UTF8 rather than UTF16, the copyTo bindings function checks the encoding and converts if necessary. * wrapping up FetchHeader fixes * since utf8 allocates only do so when needed * Update src/bun.js/bindings/bindings.cpp Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * WebCore__FetchHeaders__has should return on exception path * strip out log calls from test --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-02-15feat(fetch) AbortSignal (#2019)Gravatar Ciro Spaciari 9-10/+220
* add fetch abort signal * get aborted (still segfaults) * bidings.zig u0 error * still GC/memory error * fix start crash * fix AbortSignal fromJS * change fromJS to obj.as * addAbortSignalEventListenner * handle abort types, and add tests * fix tests * add custom reason test * merge 2 substring methods, use MAKE_STATIC_STRING_IMPL * fix create AbortError and TimeoutError, move globalThis and exception creation to main thread * fix tests and rebuild headers * no need to check with substring reason is already an exception * no need to check with substring reason is already an exception * fix dumb error inverting conditions for check reason * fix custom reason behavior
2023-02-15fix(webcrypto): fix ed25519 CryptoKey.algorithm (#2082)Gravatar Derrick Farris 1-9/+11
2023-02-15don't return an error thereGravatar Jarred Sumner 1-1/+0
2023-02-15ensure we allocate for > 6 argumentsGravatar Jarred Sumner 1-6/+13
2023-02-15ED25519 WebCrypto (#1971)Gravatar Jarred Sumner 12-11/+1167
* ed25519 * Register the algorithm * try this? * fix(webcrypto): fix ed25519 keypair gen (#1985) * fix: import and export ed25519 (#2004) * fix(webcrypto): allow import and export ed25519 * fix(webcrypto): copy exportkey * fix(webcrypto): fix use after stack free --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Derrick Farris <mr.dcfarris@gmail.com>
2023-02-14Add workaround for `tls` and `worker_threads`Gravatar Jarred Sumner 1-0/+14
2023-02-13fix(FormData): make String explicit, thanks @dylan-conway (#2065)Gravatar Derrick Farris 1-1/+1
2023-02-13fix(FormData): add string literal operator (#2064)Gravatar Derrick Farris 1-2/+2
2023-02-13Add pretty printer for FormDataGravatar Jarred Sumner 3-1/+91
2023-02-13feat(napi): add `napi_get_value_bigint_words` (#2061)Gravatar Derrick Farris 1-0/+42
* feat(napi): add `napi_get_value_bigint_words` * fix(napi): handle `napi_get_value_bigint_words` arr too small
2023-02-13Fixes https://github.com/oven-sh/bun/issues/1456Gravatar Jarred Sumner 2-0/+64
2023-02-13Implement `FormData` (#2051)Gravatar Jarred Sumner 18-12/+1447
* Backport std::forward change * Implement `FormData` * Fix io_darwin headers issue * Implement `Blob` support in FormData * Add test for file upload * Fix bug with Blob not reading Content-Type * Finish implementing FormData * Add FormData to types --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-11[WIP] feat(napi): add `napi-fatal-exception` (#2054)Gravatar Derrick Farris 1-0/+15
* feat(napi): add `napi-fatal-exception` * fix(napi): fatal_exception - add symbol to list, don't optimize away
2023-02-11Fixes https://github.com/oven-sh/bun/issues/2052Gravatar Jarred Sumner 2-44/+9
2023-02-11Backport std::forward changeGravatar Jarred Sumner 48-212/+256
2023-02-10update to simdutf 3.2.0Gravatar Jarred Sumner 2-341/+859
thanks @lemire
2023-02-10Enable https://github.com/tc39/proposal-set-methodsGravatar Jarred Sumner 1-0/+1
2023-02-08handle more cases with util.isErrorbun-v0.5.6Gravatar Jarred Sumner 1-1/+1
2023-02-06set the typeGravatar Jarred Sumner 1-1/+1
2023-02-06Mark things as DontDeleteGravatar Jarred Sumner 1-153/+153
2023-02-06Throw on process.bindingGravatar Jarred Sumner 1-0/+12
2023-02-06Make `Stat` functions fastGravatar Jarred Sumner 2-7/+175
2023-02-06Mark some things as not configurableGravatar Jarred Sumner 2-184/+1006
2023-02-06Use new bindings for StatGravatar Jarred Sumner 6-2/+246
Fixes #1999
2023-02-06Fix buildGravatar Jarred Sumner 1-3/+4
2023-02-06Backport https://github.com/WebKit/WebKit/pull/9713Gravatar Jarred Sumner 2-2/+2
2023-02-06Expose Dirent and Stats (#1998)Gravatar Michał Warda 2-0/+20
* Expose dirent and stats * Expose Dirent and Stats inside fs * Add tests for Dirent and Stats exposing * Automatically generate bindings
2023-02-06mark bindingGravatar Dylan Conway 1-0/+1
2023-02-05speed it up a little moreGravatar Jarred Sumner 1-50/+91
2023-02-05`substringSharingImpl` allocates, do not useGravatar Jarred Sumner 2-57/+27
2023-02-03Support passing `Date` to `Bun.sleep`Gravatar Jarred Sumner 1-0/+8
2023-02-03Add test for propagating exceptionGravatar Jarred Sumner 1-4/+4
2023-02-03Introduce `await Bun.sleep(ms)`Gravatar Jarred Sumner 2-2/+50
2023-02-03allow other ArrayBufferView in Buffer functionsGravatar Jarred Sumner 1-6/+6
2023-01-31Re-run prettier after changesGravatar Jarred Sumner 1-53/+17
2023-01-30fix utf16le fill and utf8 partial write of utf16 (#1943)Gravatar Ciro Spaciari 1-1/+1
2023-01-29[breaking] Add `binaryType` option to Bun.connect & Bun.listenGravatar Jarred Sumner 3-4/+8
This is a breaking change because the default is `Buffer`, but previously the default was `Uint8Array`. While `Buffer` is a subclass of `Uint8Array`, it still technically is a breaking change because `slice` in `Uint8Array` is not semantically identical to `slice` in `Buffer` cc @colinhacks, the .d.ts changes I made here aren't great.
2023-01-29[buffer] More passing Node.js testsGravatar Jarred Sumner 1-103/+145
2023-01-29cleanupGravatar Jarred Sumner 1-6/+6
2023-01-29[buffer] Buffer.byteLength passes Node.js testsGravatar Jarred Sumner 2-37/+92
2023-01-28[buffer] Use jsDynamicCastGravatar Jarred Sumner 1-1/+1
2023-01-28use wrapperGravatar Jarred Sumner 1-2/+2
2023-01-28[buffer] Use `length` instead of `byteLength` for non-uint8array and ↵Gravatar Jarred Sumner 1-4/+30
non-arraybuffer
2023-01-28[buffer] Add missing `offset` propertyGravatar Jarred Sumner 1-0/+1
2023-01-28Fixes #1913Gravatar Jarred Sumner 1-12/+104