summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2023-10-17feat(lsp): respect "typescript.preferences.quoteStyle" when deno.json is ↵Nayeem Rahman
absent (#20891)
2023-10-16fix(lsp): show diagnostics for untitled files (#20916)Nayeem Rahman
2023-10-17fix(node): resolve file.d specifiers in npm packages (#20918)David Sherret
Makes type checking octokit work. Closes #20854
2023-10-13fix(lsp): don't commit registry completions on "/" (#20902)Nayeem Rahman
2023-10-13perf(ext/streams): optimize streams (#20649)Marcos Casagrande
This PR introduces several optimizations to streams ### Highlights: - `ReadableStream` constructor: +20% iter/s. - `WritableStream` constructor: +50% iter/s. - `TransformStream` constructor: +30% iter/s. - `ReadableStream` iterator (both 2 and 20 chunks): +42% and +25% iter/s. - `ReadableByteStream` iterator (both 2 and 20 chunks): +39% and +20% iter/s. ### Benchmarks **main** ``` cpu: 13th Gen Intel(R) Core(TM) i9-13900H runtime: deno 1.37.0 (x86_64-unknown-linux-gnu) benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------------------------------- ----------------------------- ReadableStream constructor 294.52 ns/iter 3,395,392.9 (277.92 ns … 618.26 ns) 292.66 ns 353.87 ns 618.26 ns WritableStream constructor 235.51 ns/iter 4,246,065.3 (213.04 ns … 306.35 ns) 236.77 ns 279.08 ns 281.32 ns TransformStream constructor 672.52 ns/iter 1,486,938.7 (652.15 ns … 880.74 ns) 670.11 ns 880.74 ns 880.74 ns ReadableStream - iterator (2 chunks) 10.44 µs/iter 95,757.9 (8.97 µs … 830.91 µs) 10.22 µs 14.74 µs 18.93 µs ReadableStream - iterator (20 chunks) 21.93 µs/iter 45,593.4 (18.8 µs … 864.97 µs) 20.57 µs 57.15 µs 137.16 µs ReadableStream - reader (2 chunks) 7.09 µs/iter 140,987.2 (7.03 µs … 7.18 µs) 7.13 µs 7.18 µs 7.18 µs ReadableStream - reader (20 chunks) 18.41 µs/iter 54,324.2 (15.7 µs … 252.7 µs) 17.14 µs 68.88 µs 94.08 µs ReadableByteStream - iterator (2 chunks) 11.06 µs/iter 90,375.1 (9.75 µs … 404.69 µs) 10.88 µs 16.6 µs 29.69 µs ReadableByteStream - iterator (20 chunks) 26.71 µs/iter 37,435.0 (22.98 µs … 508.34 µs) 25.25 µs 85.28 µs 155.65 µs ReadableByteStream - reader (2 chunks) 7.99 µs/iter 125,131.1 (7.92 µs … 8.13 µs) 8.01 µs 8.13 µs 8.13 µs ReadableByteStream - reader (20 chunks) 23.46 µs/iter 42,618.5 (20.28 µs … 414.66 µs) 21.94 µs 90.52 µs 147.38 µs ``` **this PR** ``` cpu: 13th Gen Intel(R) Core(TM) i9-13900H runtime: deno 1.37.0 (x86_64-unknown-linux-gnu) benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------------------------------- ----------------------------- ReadableStream constructor 235.48 ns/iter 4,246,584.3 (223.12 ns … 504.65 ns) 234.3 ns 290.84 ns 311.12 ns WritableStream constructor 156.31 ns/iter 6,397,537.3 (148.54 ns … 211.13 ns) 157.49 ns 199.82 ns 208.23 ns TransformStream constructor 471.29 ns/iter 2,121,815.3 (452.53 ns … 791.41 ns) 468.62 ns 540.36 ns 791.41 ns ReadableStream - iterator (2 chunks) 7.32 µs/iter 136,705.4 (6.35 µs … 639.97 µs) 7.1 µs 12.12 µs 20.98 µs ReadableStream - iterator (20 chunks) 17.48 µs/iter 57,195.1 (14.48 µs … 289.06 µs) 16.06 µs 76.98 µs 114.61 µs ReadableStream - reader (2 chunks) 6.86 µs/iter 145,847.9 (6.8 µs … 6.97 µs) 6.88 µs 6.97 µs 6.97 µs ReadableStream - reader (20 chunks) 16.88 µs/iter 59,227.7 (14.04 µs … 311.29 µs) 15.39 µs 74.95 µs 97.45 µs ReadableByteStream - iterator (2 chunks) 7.94 µs/iter 125,881.2 (6.86 µs … 811.16 µs) 7.69 µs 11.43 µs 16.6 µs ReadableByteStream - iterator (20 chunks) 22.23 µs/iter 44,978.2 (18.98 µs … 590.11 µs) 20.73 µs 45.13 µs 159.8 µs ReadableByteStream - reader (2 chunks) 7.4 µs/iter 135,206.9 (7.36 µs … 7.42 µs) 7.4 µs 7.42 µs 7.42 µs ReadableByteStream - reader (20 chunks) 21.03 µs/iter 47,555.6 (17.75 µs … 357.66 µs) 19.52 µs 98.69 µs 146.5 µs ``` --------- Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-10-12feat(unstable): add Deno.jupyter.display API (#20819)Kyle Kelley
This brings in [`display`](https://github.com/rgbkrk/display.js) as part of the `Deno.jupyter` namespace. Additionally these APIs were added: - "Deno.jupyter.md" - "Deno.jupyter.html" - "Deno.jupyter.svg" - "Deno.jupyter.format" These APIs greatly extend capabilities of rendering output in Jupyter notebooks. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-12feat(lsp): send "deno/didChangeDenoConfiguration" notifications (#20827)Nayeem Rahman
2023-10-12fix(node/http2): fixes to support grpc (#20712)Bartek Iwańczuk
This commit improves "node:http2" module implementation, by enabling to use "options.createConnection" callback when starting an HTTP2 session. This change enables to pass basic client-side test with "grpc-js/grpc" package. Smaller fixes like "Http2Session.unref()" and "Http2Session.setTimeout()" were handled as well. Fixes #16647
2023-10-12chore(task): remove warning for npm "scripts" (#20880)Nayeem Rahman
2023-10-11feat(WebSocketStream): rename connection to opened (#20878)Leo Kettmeir
2023-10-10chore: disable another flaky Node compat test (#20872)Bartek Iwańczuk
2023-10-10fix(bench): use total time when measuring wavg (#20862)Nayeem Rahman
2023-10-10refactor(lsp): add "deno.reloadImportRegistries" as a command (#20823)Nayeem Rahman
2023-10-09fix(lsp): allow formatting vendor files (#20844)Nayeem Rahman
2023-10-09chore: disable another flaky Node compat test (#20846)Bartek Iwańczuk
2023-10-09chore: disable flaky Node compat test (#20832)Bartek Iwańczuk
2023-10-09fix(ext/http): Deno.Server should not be thenable (#20723)Luca Casonato
Otherwise you can not return `Deno.Server` from async functions. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-08fix: define window.name (#20804)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20750 This matches what browsers do: https://developer.mozilla.org/en-US/docs/Web/API/Window/name In the future we might want to change the behavior to actually update the process name, but that needs a bit of discussion regarding if it needs a permission flag (that would make polyfiling `process.title` setter really easy too).
2023-10-08fix(ext/ffi): use anybuffer for op_ffi_ptr_of (#20820)Matt Mastracci
Fixes #20817
2023-10-08fix(node/buffer): utf8ToBytes should return a Uint8Array (#20769)Aapo Alasuutari
2023-10-06fix(cli): Support using both `--watch` and `--inspect` at the same time (#20660)Jesper van den Ende
Fixes #20525
2023-10-06feat(unstable): Await return from `Jupyter.display` (#20807)Trevor Manz
Allows `Jupyter.display` to return a promise. Example: ```javascript class WikiPage { constructor(public name) {} async [Symbol.for("Jupyter.display")]() { let response = await fetch("https://en.wikipedia.org/wiki/" + this.name); return { "text/html": await response.text() } } } new WikiPage("Deno_(software)") ```
2023-10-05feat(jupyter): support Deno.test() (#20778)Nayeem Rahman
2023-10-05fix(ext/node): implement uv.errname (#20785)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20617
2023-10-05fix(ext/formdata): support multiple headers in FormData (#20801)Marcos Casagrande
Fixes https://github.com/denoland/deno/issues/20793
2023-10-05refactor: rewrite several extension ops to op2 (#20457)Bartek Iwańczuk
Rewrites following extensions: - `ext/web` - `ext/url` - `ext/webstorage` - `ext/io` --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-10-05fix(lsp): show diagnostics for type imports from untyped deps (#20780)Nayeem Rahman
2023-10-04fix(jupyter): keep `this` around (#20789)Kyle Kelley
This fixes #20767. We were losing `this` and then when an exception was happening, it didn't show up in the output because we weren't bubbling up exceptions from within a user defined function for displaying. I thought about doing a `.call(object)` but didn't want to get in the way of a bound `this` that a user or library was already putting on the function.
2023-10-04feat(jupyter): send binary data with `Deno.jupyter.broadcast` (#20755)Trevor Manz
Adds `buffers` to the `Deno.jupyter.broadcast` API to send binary data via comms. This affords the ability to send binary data via websockets to the jupyter widget frontend.
2023-10-04feat(unstable): add unix domain socket support to Deno.serve (#20759)Yoshiya Hinosawa
2023-10-03fix(npm): upgrade to deno_npm 0.15.2 (#20772)David Sherret
* fix: handle optional deps not found in dependencies map (https://github.com/denoland/deno_npm/pull/38) * fix: resolve a version requirement to the latest dist tag if it matches (https://github.com/denoland/deno_npm/pull/37) Closes #20771
2023-10-02fix(ext/node): don't call undefined nextTick fn (#20724)Luca Casonato
The `process` global is not defined in this file. Fixes #20441 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-30feat(node/os): Add `availableParallelism` (#20745)Rui He
2023-09-30test(node_compat): add `test-http-url.parse*` (#20458)Hirotaka Tagawa / wafuwafu13
Add `test-http-url.parse*` tests for Node compat.
2023-09-29feat(lsp): jupyter notebook analysis (#20719)Nayeem Rahman
2023-09-29fix(ext/kv): send queue wake messages accross different kv instances (#20465)Igor Zinkovsky
fixes #20454 Current KV queues implementation assumes that `enqueue` and `listenQueue` are called on the same instance of `Deno.Kv`. It's possible that the same Deno process opens multiple KV instances pointing to the same fs path, and in that case `listenQueue` should still get notified of messages enqueued through a different KV instance.
2023-09-28refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)David Sherret
This is required from BYONM (bring your own node_modules). Part of #18967
2023-09-28fix(jupyter): more robust Deno.jupyter namespace (#20710)Bartek Iwańczuk
2023-09-26fix(kv_queues): graceful shutdown (#20627)Igor Zinkovsky
This fixes the `TypeError: Database closed` error during shutdown.
2023-09-27fix(lsp): allow query strings for "deno:/status.md" (#20697)Nayeem Rahman
2023-09-27feat(unstable): add `Deno.jupyter.broadcast` API (#20656)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20591 --------- Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-26chore(lsp): bump tower-lsp to 0.20.0 (#20693)Nayeem Rahman
2023-09-26fix(cli/test): clear connection pool after tests (#20680)Luca Casonato
This helps reduce flakes where a test starts an HTTP server and makes a request using fetch, then shuts down the server, then starting a new test with a new server, but the connection pool still has a "not quite closed yet" connection to the old server, and a new request to the new server gets sent on the closed connection, which obviously errors out.
2023-09-26test: unflake serve_test/httpServerTcpCancellation (#20672)Luca Casonato
Previously could flake on the op sanitizer because the `await makeTempFile()` promise could leak out of the test. Now we ensure the request is fully handled before returning.
2023-09-25fix(ext/http): ensure that resources are closed when request is cancelled ↵Matt Mastracci
(#20641) Builds on top of #20622 to fix #10854
2023-09-24feat(lsp): cache all dependencies quick fix (#20665)Nayeem Rahman
2023-09-24fix(lsp): resolve remote import maps (#20651)Nayeem Rahman
2023-09-24refactor(lsp): implement "deno.cacheOnSave" server-side (#20632)Nayeem Rahman
2023-09-24fix(lsp): show related information for tsc diagnostics (#20654)Nayeem Rahman
2023-09-23fix(kv): unflake kv unit tests (#20640)Igor Zinkovsky
fixes #20635