summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2021-10-29feat: stabilize Deno.startTls (#12581)Luca Casonato
This commit stabilizes `Deno.startTls` and removes `certFile` from the `StartTlsOptions`.
2021-10-29fix(ext/fetch): Replace redundant local variable with inline return ↵Malted
statement (#12583)
2021-10-29fix(encoding): support additional encoding labels (#12586)Andreu Botella
2021-10-28fix(webidl): Don't throw when converting a detached buffer source (#12585)Andreu Botella
The Web IDL conversion to `BufferSource` and similar types shouldn't check whether the buffer is detached. In the case of `TextDecoder`, our implementation would still throw after the Web IDL conversions because we're creating a new `Uint8Array` from the buffer source's buffer, which throws if it's detached. This change also fixes this bug.
2021-10-29perf(encoding): avoid copying the input data in `TextDecoder` (#12573)Andreu Botella
The implementation of `TextDecoder` had a bug where it was copying the input data in every case. This change removes that copy in non-`SharedArrayBuffer` cases. Since passing a shared buffer source to Rust would fail, this copy of the input data was making `TextDecoder` work in cases where the input is shared. In order to avoid a breaking change, the copy is retained in those cases.
2021-10-27feat(ext/webstorage): use implied origin when --location not set (#12548)Kitson Kelly
Closes #11882 BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
2021-10-26fix(ext/http): allow multiple values in upgrade header for websocket (#12551)Leo K
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2021-10-26Use libffi-rs instead of deno-libffi (#12555)Ryan Dahl
Fork is no longer necessary since https://github.com/tov/libffi-rs/pull/33 landed.
2021-10-26feat(ext/net): add TlsConn.handshake() (#12467)Bert Belder
A `handshake()` method was added that returns when the TLS handshake is complete. The `TlsListener` and `TlsConn` interfaces were added to accomodate this new method. Closes: #11759.
2021-10-26perf(http): encode string bodies in op-layer (#12451)Aaron O'Mullan
Using serde_v8's StringOrBuffer
2021-10-25fix(tls): Make TLS clients support HTTP/2 (#12530)Andreu Botella
`fetch()` and client-side websocket used to support HTTP/2, but this regressed in #11491. This patch reenables it by explicitly adding `h2` and `http/1.1` to the list of ALPN protocols on the HTTP and websocket clients.
2021-10-25chore: bump crate version for 1.15.3 (#12531)Yoshiya Hinosawa
2021-10-21fix: declare web types as global (#12497)Bartek Iwańczuk
Co-authored-by: Feng Yu <F3n67u@outlook.com>
2021-10-20fix(ext/net): fix TLS bugs and add 'op_tls_handshake' (#12501)Bert Belder
A bug was fixed that could cause a hang when a method was called on a TlsConn object that had thrown an exception earlier. Additionally, a bug was fixed that caused TlsConn.write() to not completely flush large buffers (>64kB) to the socket. The public `TlsConn.handshake()` API is scheduled for inclusion in the next minor release. See https://github.com/denoland/deno/pull/12467.
2021-10-19fix(ext/websocket): prevent 'closed normally' panic (#12437)Leo K
2021-10-18chore: release crates for v1.15.2 (#12478)Bartek Iwańczuk
2021-10-18docs(ext/url): typo in URLPatternResult (#12470)Satya Rohith
2021-10-17fix(core): poll async ops eagerly (#12385)Bert Belder
Currently all async ops are polled lazily, which means that op initialization code is postponed until control is yielded to the event loop. This has some weird consequences, e.g. ```js let listener = Deno.listen(...); let conn_promise = listener.accept(); listener.close(); // `BadResource` is thrown. A reasonable error would be `Interrupted`. let conn = await conn_promise; ``` JavaScript promises are expected to be eagerly evaluated. This patch makes ops actually do that.
2021-10-17docs(ext/http): fix typo in http/lib.rs (#12466)Ikko Ashimine
2021-10-15fix(docs): correct `pattern.match()` to `pattern.exec()` (#12450)Libing Chen
2021-10-14fix(console): fix display of primitive wrapper objects (#12425)Kenta Moriuchi
2021-10-13fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297)Nayeem Rahman
2021-10-12chore: bump crate version for 1.15.0 (#12406)Satya Rohith
2021-10-12chore: upgrade crates based on deno ast 0.3 (#12403)David Sherret
2021-10-12feat(ext/crypto): support importing/exporting raw AES keys (#12392)Divy Srivastava
2021-10-12feat(ext/crypto): implement deriveKey (#12117)Divy Srivastava
2021-10-11perf(webidl): inline ResponseInit converter (#12285)Aaron O'Mullan
2021-10-11fix(http): don't expose body on GET/HEAD requests (#12260)Luca Casonato
GET/HEAD requests can't have bodies according to `fetch` spec. This commit changes the HTTP server to hide request bodies for requests with GET or HEAD methods.
2021-10-11feat(ext/crypto): support importing raw ECDSA keys (#11871)Divy Srivastava
2021-10-11feat(ext/crypto): implement AES-CBC encryption & decryption (#12123)Divy Srivastava
* initial stuff * stuff * merge stuff * cleanup * fmt * length * update lockfile * decrypt * fixy * clippy hello? * hmm * fixs * fix lint * add AesCbcParams * fixes * fixy * lockfile fixy * fix dumb assertions * re run CI * rerun CI * rerun CI
2021-10-10feat: Show the URL of streaming WASM modules in stack traces (#12268)Andreu Botella
WebAssembly modules compiled through `WebAssembly.compile()` and similar non-streaming APIs don't have a URL associated to them, because they have been compiled from a buffer source. In stack traces, V8 will use a URL such as `wasm://wasm/d1c677ea`, with a hash of the module. However, wasm modules compiled through streaming APIs, like `WebAssembly.compileStreaming()`, do have a known URL, which can be obtained from the `Response` object passed into the streaming APIs. And as per the developer-facing display conventions in the WebAssembly Web API spec, this URL should be used in stack traces. This change implements that.
2021-10-10feat: stabilize Deno.resolveDns (#12368)Satya Rohith
2021-10-10feat(ext/net): relevant errors for resolveDns (#12370)Satya Rohith
2021-10-08feat(ext/crypto): implement deriveBits for ECDH (p256) (#11873)Divy Srivastava
2021-10-08fix(ext/web): Format DOMException stack property (#12333)Kenta Moriuchi
2021-10-08refactor: deduplicate `defineEventHandler` util (#12367)Andreu Botella
2021-10-07perf(fetch): fast path Uint8Array in extractBody() (#12351)Aaron O'Mullan
2021-10-07fix(ext/ffi): don't panic in dlopen (#12344)Divy Srivastava
2021-10-06fix(ext/crypto): key generation based on AES key length (#12146)Divy Srivastava
2021-10-06feat(ext/crypto): export spki for RSA (#12114)Divy Srivastava
2021-10-06fix(ext/ffi): formatting dlopen errors on Windows (#12301)Divy Srivastava
2021-10-06feat(ext/ffi): add support for buffer arguments (#12335)Bartek Iwańczuk
This commit adds support for passing buffer arguments across FFI boundary. Co-authored-by: eliassjogreen <eliassjogreen1@gmail.com> Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-10-05perf(webidl): fix typo from #12286 (#12336)Aaron O'Mullan
In a tweak commit of #12286 I accidentally eliminated the else branch ... running the slow & the fast path providing a worst of both worlds path
2021-10-05chore: various op cleanup (#12329)Leo K
2021-10-05chore: merge v1.14.3 into main (#12327)Bartek Iwańczuk
2021-10-05feat(ext/ffi): Non-blocking FFI (#12274)Divy Srivastava
2021-10-04chore: remove No*Permissions structs (#12316)Luca Casonato
These are confusing. They say they are "for users that don't care about permissions", but that isn't correct. `NoTimersPermissions` disables permissions instead of enabling them. I would argue that implementors should decide what permissions they want themselves, and not take our opinionated permissions struct.
2021-10-04perf(webidl): optimize createRecordConverter() (#12286)Aaron O'Mullan
Cuts self-time by ~6x, 172ns/iter => 22ns/iter benched on 1M Response builds / HeadersInit calls
2021-10-03feat(web): Implement `DOMException`'s `stack` property. (#12294)Andreu Botella
As per WebIDL (https://heycam.github.io/webidl/#es-DOMException-specialness), if `Error` objects have a `stack` property, so should `DOMException` instances.
2021-10-03fix(ext/crypto): missing Aes key typings (#12307)Divy Srivastava