summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2023-11-24feat(streams): ReadableStream.read min option (#20849)Leo Kettmeir
2023-11-24chore: forward v1.38.3 release commit to main (#21320)denobot
2023-11-23fix(ext/http): avoid lockup in graceful shutdown (#21253)Matt Mastracci
Follow-up to #20822. cc @lrowe The `httpServerExplicitResourceManagement` tests were randomly failing on CI because of a race. The `drain` waker was missing wakeup events if the listeners shut down after the last HTTP response finished. If we lost the race (rare), the server Rc would be dropped and we wouldn't poll it again. This replaces the drain waker system with a signalling Rc that always resolves when the refcount is about to become 1. Fix verified by running serve tests in a loop: ``` for i in {0..100}; do cargo run --features=__http_tracing -- test -A --unstable '/Users/matt/Documents/github/deno/deno/cli/tests/unit/ser ve_test.ts' --filter httpServerExplicitResourceManagement; done; ```
2023-11-23fix(ext/node): fix node:stream.Writable (#21297)Yoshiya Hinosawa
This change applies the same fix as https://github.com/nodejs/node/pull/46818, and the original example given in #20456 works as expected. closes #20456
2023-11-22refactor: replace `deferred()` from `std/async` with ↵Asher Gomez
`Promise.withResolvers()` (#21234) Closes #21041 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-20fix(ext/node): handle closing process.stdin more than once (#21267)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21112 Aligns more towards what Node.js does. Closing stdin more than once is a nop.
2023-11-20fix(ext/url): add deno_console dependency for bench (#21266)Kenta Moriuchi
Should fix the benchmarks. Signed-off-by: Kenta Moriuchi <moriken@kimamass.com>
2023-11-19fix(ext,runtime): add missing custom inspections (#21219)Kenta Moriuchi
2023-11-18chore(ext/http): bump version for re-release (#21254)Matt Mastracci
Syncs the changes to main for a deno_http version bump we needed to do. `deno_http` v1.20 was released from the v1.38 branch.
2023-11-18fix(ext/http): fix crash in dropped Deno.serve requests (#21252)Matt Mastracci
Fixes #21250 We were attempting to recycle dropped resource responses too early.
2023-11-17chore: forward v1.38.2 release commit to main (#21236)denobot
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-11-16fix(doc): issue discovering re-exports of re-exports sometimes (#21223)David Sherret
2023-11-16feat(ext/cron) modify Deno.cron API to make handler arg last (#21225)Igor Zinkovsky
This PR changes the `Deno.cron` API: * Marks the existing function as deprecated * Introduces 2 new overloads, where the handler arg is always last: ```ts Deno.cron( name: string, schedule: string, handler: () => Promise<void> | void, ) Deno.cron( name: string, schedule: string, options?: { backoffSchedule?: number[]; signal?: AbortSignal }, handler: () => Promise<void> | void, ) ``` This PR also fixes a bug, when other crons continue execution after one of the crons was closed using `signal`.
2023-11-15feat(ext/net): use rustls_tokio_stream (#21205)Matt Mastracci
Fixes #21121 and #19498 Migrates fully to rustls_tokio_stream. We no longer need to maintain our own TlsStream implementation to properly support duplex. This should fix a number of errors with TLS and websockets, HTTP and "other" places where it's failing.
2023-11-14fix(ext/node): add APIs perf_hook.performance (#21192)Bartek Iwańczuk
Required for Next.js.
2023-11-14fix(ext/web): webstorage has trap for symbol (#21090)Kenta Moriuchi
2023-11-13Revert "fix(ext/console): fix inspecting iterators error. (#20720)" (#21191)Bartek Iwańczuk
This reverts commit 0209f7b46954d1b7bf923b4191e5a356ec09622c. Reverting because it causes failures on `main`: https://github.com/denoland/deno/pull/20720#issuecomment-1809166755
2023-11-13refactor(ext/http): Use HttpRecord as response body to track until body ↵Laurence Rowe
completion (#20822) Use HttpRecord as response body so requests can be tracked all the way to response body completion. This allows Request properties to be accessed while the response body is streaming. Graceful shutdown now awaits a future instead of async spinning waiting for requests to finish. On the minimal benchmark this refactor improves performance an additional 2% over pooling alone for a net 3% increase over the previous deno main branch. Builds upon https://github.com/denoland/deno/pull/20809 and https://github.com/denoland/deno/pull/20770. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-13fix(ext/console): fix inspecting iterators error. (#20720)Chen Su
Fixes #19776 and #20676.
2023-11-13perf(ext/http): Object pooling for HttpRecord and HeaderMap (#20809)Laurence Rowe
Reuse existing existing allocations for HttpRecord and response HeaderMap where possible. At request end used allocations are returned to the pool and the pool and the pool sized to 1/8th the current number of inflight requests. For http1 hyper will reuse the response HeaderMap for the following request on the connection. Builds upon https://github.com/denoland/deno/pull/20770 --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-13refactor(ext/http): refer to HttpRecord directly using v8::External (#20770)Laurence Rowe
Makes the JavaScript Request use a v8:External opaque pointer to directly refer to the Rust HttpRecord. The HttpRecord is now reference counted. To avoid leaks the strong count is checked at request completion. Performance seems unchanged on the minimal benchmark. 118614 req/s this branch vs 118564 req/s on main, but variance between runs on my laptop is pretty high. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-13perf: lazy bootstrap options - first pass (#21164)Divy Srivastava
Move most runtime options to be lazily loaded. Constant options will be covered in a different PR. Towards https://github.com/denoland/deno/issues/21133
2023-11-13feat(ext/web): add `AbortSignal.any()` (#21087)Kenta Moriuchi
Fixes #18944
2023-11-12fix(ext/web): Prevent TextDecoderStream resource leak on stream cancellation ↵Florian Schwalm
(#21074) This PR uses the new `cancel` method of `TransformStream` to properly clean up the internal `TextDecoder` used in `TextDecoderStream` if the stream is cancelled. Fixes #13142 Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-11perf: snapshot runtime ops (#21127)Divy Srivastava
Closes https://github.com/denoland/deno/issues/21135 ~1ms startup time improvement --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-11-11chore(ext/node): use libz-sys w/`zlib-ng` feature in node (#21158)Matt Mastracci
We only want one zlib dependency. Zlib dependencies are reorganized so they use a hidden `__vendored_zlib_ng` flag in cli that enables zlib-ng for both libz-sys (used by ext/node) and flate2 (used by deno_web).
2023-11-11fix(node/http): export globalAgent (#21081)Jacob Hummer
Fixes #21080 Fixes #18312 --------- Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-10fix(ext/node): implement process.geteuid (#21151)Divy Srivastava
Fixes #21097
2023-11-10chore: use pure rust secp256k1 crate (#21154)Divy Srivastava
Saves ~40s in fresh debug build
2023-11-10chore: forward v1.38.1 release commit to main (#21144)denobot
This is the release commit being forwarded back to main for 1.38.1 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-11-10fix(node/child_process): properly normalize stdio for 'spawnSync' (#21103)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20782
2023-11-09perf: remove knowledge of promise IDs from deno (#21132)Matt Mastracci
We can move all promise ID knowledge to deno_core, allowing us to better experiment with promise implementation in deno_core. `{un,}refOpPromise(promise)` is equivalent to `{un,}refOp(promise[promiseIdSymbol])`
2023-11-09fix(node): implement createPrivateKey (#20981)Divy Srivastava
Towards #18455
2023-11-09chore(ext/crypto): bump signature to 2.1 (#21125)Divy Srivastava
2023-11-08chore(ext/web): migrate to deno_core typed externals (#21114)Matt Mastracci
Use our safer typed externals for the external required for resource streams.
2023-11-07fix(ext/http): Throwing Error if the return value of Deno.serve handler is ↵Aravind
not a Response class (#21099) --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-07fix(node): cjs export analysis should probe for json files (#21113)David Sherret
Closes #21064
2023-11-07fix(node): inspect ancestor directories when resolving cjs re-exports during ↵David Sherret
analysis (#21104) If a CJS re-export can't be resolved, it will check the ancestor directories, which is more similar to what `require` does at runtime.
2023-11-07fix(node/http): socket.setTimeout (#20930)Gasman
Fixes #20923
2023-11-06fix(ext): use `String#toWellFormed` in ext/webidl and ext/node (#21054)Kenta Moriuchi
Fixes #18802 This PR adds `util.toUSVString` to node:util: ```js import util from "node:util"; util.toUSVString("string\ud801"); // => "string\ufffd" ```
2023-11-06fix(ext/fetch): re-align return type in op_fetch docstring (#21098)Luca Bruno
This adds a missing `cancelHandleRid` field in `op_fetch` return type, see Rust side: https://github.com/denoland/deno/blob/fdb4953ea460d5c09ac73f3f37dd570d44893155/ext/fetch/lib.rs#L183-L189
2023-11-05fixDivy Srivastava
2023-11-05fix lintDivy Srivastava
2023-11-05chore(ext/crypto): upgrade ec cratesDivy Srivastava
2023-11-05chore(ext/ffi): use dlopen2 crate (#21093)Divy Srivastava
Closes #21046
2023-11-05chore: bump deno_native_certs to 0.2 (#21092)Divy Srivastava
Towards #21046
2023-11-04fix(node): use closest package.json to resolve package.json imports (#21075)David Sherret
2023-11-03chore(ext/crypto): bump curve25519-dalek to 4.1Divy Srivastava
2023-11-02feat(ext/kv): increase checks limit (#21055)Igor Zinkovsky
2023-11-021.38.0 (#21051)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>