summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-23refactor: rewrite ops using i64/usize to op2 (#20647)Bartek Iwańczuk
2023-09-23fix(node): supported arguments to `randomFillSync` (#20637)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20634
2023-09-22chore: bump deno_core + cargo update (#20636)Matt Mastracci
``` Updating aes-gcm v0.10.2 -> v0.10.3 Updating aho-corasick v1.1.0 -> v1.1.1 Updating curve25519-dalek v4.1.0 -> v4.1.1 Updating deno_core v0.214.0 -> v0.215.0 Updating deno_ops v0.90.0 -> v0.91.0 Updating deno_unsync v0.2.1 -> v0.3.0 Updating md-5 v0.10.5 -> v0.10.6 Updating rustix v0.38.13 -> v0.38.14 Updating rustls-webpki v0.101.5 -> v0.101.6 Updating serde_v8 v0.123.0 -> v0.124.0 Updating sha1 v0.10.5 -> v0.10.6 Updating smallvec v1.11.0 -> v1.11.1 Updating tokio-util v0.7.8 -> v0.7.9 Updating v8 v0.76.0 -> v0.77.0 Updating winapi-util v0.1.5 -> v0.1.6 ```
2023-09-22build(deps): bump aes-gcm from 0.10.2 to 0.10.3 (#20639)dependabot[bot]
Bumps [aes-gcm](https://github.com/RustCrypto/AEADs) from 0.10.2 to 0.10.3. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/RustCrypto/AEADs/commit/7e82b01cd4901f6a35b5153536f11b87f5e4e622"><code>7e82b01</code></a> aes-gcm v0.10.3 (<a href="https://redirect.github.com/RustCrypto/AEADs/issues/552">#552</a>)</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/b587b27270cc300d39c496a1ab06be80d72ac107"><code>b587b27</code></a> aes-gcm: avoid exposing plaintext on tag verification failure (<a href="https://redirect.github.com/RustCrypto/AEADs/issues/551">#551</a>)</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/2209bcaa9edc65e9a60498e7ece5b50e66f32ebf"><code>2209bca</code></a> build(deps): bump actions/checkout from 3 to 4 (<a href="https://redirect.github.com/RustCrypto/AEADs/issues/548">#548</a>)</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/035ec25362886735a0f44098f85ba0501a9b4038"><code>035ec25</code></a> build(deps): bump ascon from 0.3.1 to 0.4.0 (<a href="https://redirect.github.com/RustCrypto/AEADs/issues/545">#545</a>)</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/e94ba5ab9fb2c7f3a18c92fb9dc8df14ac36f06b"><code>e94ba5a</code></a> xsalsa20poly1305: remove source code (<a href="https://redirect.github.com/RustCrypto/AEADs/issues/543">#543</a>)</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/31240c1285144aeabef3e80eb9a1b4137dc2b43f"><code>31240c1</code></a> Update Cargo.lock</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/40240c4a852df21048830de4eed4782c0fbddaef"><code>40240c4</code></a> Update Cargo.lock</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/be4ea6fd3bcc1c8a5a23974a43e0fc35104d8cba"><code>be4ea6f</code></a> Update Cargo.lock</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/2aef39e90d39c247cc89ccc31628468c9a9f60de"><code>2aef39e</code></a> Update Clippy version (<a href="https://redirect.github.com/RustCrypto/AEADs/issues/534">#534</a>)</li> <li><a href="https://github.com/RustCrypto/AEADs/commit/50710da0cbd47a4614b6d37119877f206c207e95"><code>50710da</code></a> Update Cargo.lock</li> <li>Additional commits viewable in <a href="https://github.com/RustCrypto/AEADs/compare/aes-gcm-v0.10.2...aes-gcm-v0.10.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aes-gcm&package-manager=cargo&previous-version=0.10.2&new-version=0.10.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/denoland/deno/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-22feat(kv_queues): increase max queue delay to 30 days (#20626)Igor Zinkovsky
2023-09-22fix(node/package_json): Avoid panic when "exports" field is null (#20588)Alessandro Scandone
Fixes #20558 Implementation: when package.json `exports` field is `null`, treat it as if it was not set
2023-09-21perf(ext/fetch): use new instead of createBranded (#20624)Marcos Casagrande
This PR optimizes `fromInner*` methods of `Request` / `Header` / `Response` used by `Deno.serve` and `fetch` by using `new` instead of `ObjectCreate` from `createBranded`. The "brand" is created by passing `webidl.brand` to the constructor instead. https://github.com/denoland/deno/blob/142449ecab20006c5cfd15462814650596bc034d/ext/webidl/00_webidl.js#L1001-L1005 ### Benchmark ```js const createBranded = Symbol("create branded"); const brand = Symbol("brand"); class B { constructor(init) { if (init === createBranded) { this[brand] = brand; } } } Deno.bench("Object.create(protoype)", () => { Object.create(B.prototype); }); Deno.bench("new Class", () => { new B(createBranded); }); ``` ``` 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 ----------------------------------------------------------------------------- ----------------------------- Object.create(protoype) 8.74 ns/iter 114,363,610.3 (7.32 ns … 26.02 ns) 8.65 ns 13.39 ns 14.47 ns new Class 3.05 ns/iter 328,271,012.2 (2.78 ns … 9.1 ns) 3.06 ns 3.46 ns 3.5 ns ```
2023-09-21refactor: rewrite some ops to op2 macro (#20603)Bartek Iwańczuk
2023-09-21fix(node): point process.version to Node 18.18.0 LTS (#20597)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20590
2023-09-21refactor(lsp): store language sections in WorkspaceSettings (#20593)Nayeem Rahman
When sending configuration requests to the client, reads `javascript` and `typescript` sections in addition to `deno`. The LSP's initialization options now accepts `javascript` and `typescript` namespaces.
2023-09-20fix(ext/web): Aggregate small packets for Resource implementation of ↵Matt Mastracci
ReadableStream (#20570) Fixes: #20569 by introducing a custom replacement for the tokio mpsc channel that is byte-size backpressure-aware. Using the testcase in the linked bug, we see all the small writes aggregated into a single packet and HTTP frame. ``` 10:39 $ nc localhost 8000 GET / HTTP/1.1 HTTP/1.1 200 OK content-type: text/plain vary: Accept-Encoding transfer-encoding: chunked date: Tue, 19 Sep 2023 16:39:13 GMT A 0 1 2 3 4 ``` This patch: ``` Running 10s test @ http://localhost:8080/ 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 157.47us 194.89us 9.53ms 98.97% Req/Sec 31.37k 1.56k 34.73k 85.15% 630407 requests in 10.10s, 73.35MB read Requests/sec: 62428.12 Transfer/sec: 7.26MB ``` main: ``` Running 10s test @ http://localhost:8080/ 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 343.75us 200.48us 10.41ms 98.25% Req/Sec 14.64k 806.52 16.98k 84.65% 294018 requests in 10.10s, 39.82MB read Requests/sec: 29109.91 Transfer/sec: 3.94MB ``` --------- Co-authored-by: Bert Belder <bertbelder@gmail.com>
2023-09-19refactor: rewrite BC, cache exts to op2 (#20486)Bartek Iwańczuk
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-20chore: bump Rust to 1.72.1 and cargo update (#20572)Matt Mastracci
> 1.72.1 resolves a few regressions introduced in 1.72.0: > - [Partially revert codegen change, improving codegen](https://github.com/rust-lang/rust/pull/115236) > - [rustdoc: Fix self ty params in objects with lifetimes](https://github.com/rust-lang/rust/pull/115276) > - [Fix regression in compile times](https://github.com/rust-lang/rust/pull/114948) > - Resolve some ICEs in the compiler: > - [#115215](https://github.com/rust-lang/rust/pull/115215) > - [#115559](https://github.com/rust-lang/rust/pull/115559)
2023-09-20chore: update manual instructions for doing a release (#20578)David Sherret
2023-09-19ci: install protoc on cargo_publish (#20577)David Sherret
Closes https://github.com/denoland/deno/issues/20576
2023-09-191.37.0 (#20574)denobot
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-09-19fix(cli): ensure that an exception in ↵Matt Mastracci
getOwnPropertyDescriptor('constructor') doesn't break Deno.inspect (#20568) Fixes #20561
2023-09-19fix(lsp): force correct media type detection from tsc (#20562)Nayeem Rahman
2023-09-19fix(lsp): refresh npm completions on each character (#20565)Nayeem Rahman
2023-09-19perf: make `deno test` 10x faster (#20550)Luca Casonato
2023-09-19refactor(lsp): dedup import map lookup for auto-imports (#20538)Nayeem Rahman
2023-09-18fix(cli): Enhanced errors for Jupyter (#20530)Kyle Kelley
2023-09-18fix(npm): properly handle legacy shasum of package (#20557)David Sherret
Closes #20554
2023-09-18fix(cli): for main-module that exists in package.json, use the version ↵await-ovo
defined in package.json directly (#20328)
2023-09-18refactor(lsp): cleanup document preload (#20520)Nayeem Rahman
2023-09-18fix(lsp): pass quote preference to tsc (#20547)Nayeem Rahman
2023-09-18fix(lsp): prefer local auto-import specifiers (#20539)Nayeem Rahman
Give auto-import completion entries a sort-text suffix depending on if the specifier parses as a URL. This will favour relative and bare (likely import-mapped) specifiers.
2023-09-18fix: `Deno.Command` - improve error message when `cwd` is not a directory ↵Shreyas
(#20460)
2023-09-18fix(lsp): restore tsc's quick fix ordering (#20545)Nayeem Rahman
2023-09-18fix(jupyter-kernel): don't log errors from objects without a ↵Kyle Kelley
`Symbol.for("Jupyter.display")` (#20546) Fast follow up to #20537. Before: ![image](https://github.com/denoland/deno/assets/836375/8a12e83d-9008-419b-bd1f-24c0ac90afd3) After: <img width="235" alt="image" src="https://github.com/denoland/deno/assets/836375/467bf381-278e-4577-a980-7b0ddb08d2af"> --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-18fix(cli): fetch works in Jupyter (#20552)Matt Mastracci
An op2 needs to be overloaded by an op2, not an op1.
2023-09-18feat(unstable): package manager (#20517)David Sherret
Adds an experimental unstable built-in package manager to Deno, but it is currently not usable because the registry infrastructure hasn't been setup and it points to a non-existent url by default. The default registry url can be configured via the `DENO_REGISTRY_URL` environment variable.
2023-09-17fix(lsp): sort quickfix actions (#17221)Bartek Iwańczuk
This commit changes ordering of quickfix actions, by sorting them in following order: - TSC fixes - Deno fixes - deno_lint fixes Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-09-17feat(jupyter-kernel): accept nested objects from display calls (#20537)Kyle Kelley
Closes #20535. # Screenshots ## JSON <img width="779" alt="image" src="https://github.com/denoland/deno/assets/836375/668bb1a6-3f76-4b36-974e-cdc6c93f94c3"> ## Vegalite <img width="558" alt="image" src="https://github.com/denoland/deno/assets/836375/a5e70908-6b87-42d8-85c3-1323ad52a00f"> # Implementation Instead of going the route of recursively getting all the objects under `application/.*json` keys, I went with `JSON.stringify`ing in denospace then parsing it from rust. One of the key benefits of serializing and deserializing is that non-JSON-able entries will get stripped automatically. This also keeps the code pretty simple. In the future we should _only_ do this for `application/.*json` keys. cc @mmastrac
2023-09-17build: add an environment variable to skip cross build check (#20281) (#20533)第二扩展
2023-09-17perf(ext/streams): optimize async iterator (#20541)Marcos Casagrande
This PR optimizes `ReadableStream` async iterator ### Benchmarks ```js Deno.bench("Stream - iterator", async () => { const stream = new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array([97])); controller.enqueue(new Uint8Array([97])); controller.close(); }, }); for await (const chunk of stream) {} }); ``` **main** `2 chunks` ``` cpu: 13th Gen Intel(R) Core(TM) i9-13900H runtime: deno 1.36.4 (x86_64-unknown-linux-gnu) benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------- ----------------------------- Stream - iterator 12.45 µs/iter 80,295.5 (10.5 µs … 281.12 µs) 12.13 µs 26.71 µs 33.63 µs ``` `20 chunks` ``` benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------- ----------------------------- Stream - iterator 32.99 µs/iter 30,312.2 (28.13 µs … 1.21 ms) 31.8 µs 81.82 µs 179.93 µs ``` --- **this PR** `2 chunks` ``` cpu: 13th Gen Intel(R) Core(TM) i9-13900H runtime: deno 1.36.4 (x86_64-unknown-linux-gnu) benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------- ----------------------------- Stream - iterator 9.37 µs/iter 106,700.8 (8.35 µs … 730.71 µs) 9.15 µs 13.12 µs 18.17 µs ``` `20 chunks` ``` benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------------- ----------------------------- Stream - iterator 16.59 µs/iter 60,270.0 (12.08 µs … 1.37 ms) 15.06 µs 83.03 µs 123.52 µs ```
2023-09-17fix(lsp): include JSON modules in local import completions (#20536)Nayeem Rahman
2023-09-17set `evalue` to a one space string for truthiness on old jupyter (#20531)Kyle Kelley
"Fixes" the exception display issue of #20524 on older versions of Jupyter that required `evalue` to be truthy. For now, until we can do proper processing of the `ExceptionDetails` this will make Jupyter Notebook 6.5.1 and below happy. This is the alternative "just work now" PR to #20530
2023-09-16docs(contributing): Fix README link to contributing docs (#20526)Juan Gonzalez
Fixing a broken link to the contributing docs
2023-09-16perf(ext/http): optimize `set_response` for small responses (#20527)Marcos Casagrande
This PR introduces an optimization to `set_response` to reduce the overhead for responses with a payload size less than 64 bytes. Performance gains are more noticeable when `is_request_compressible` enters the slow path, ie: `-H 'Accept-Encoding: unknown'` ### Benchmarks ```js Deno.serve({ port: 3000 }, () => new Response("hello")); ``` ``` wrk -d 10s --latency -H 'Accept-Encoding: slow' http://127.0.0.1:3000 ``` --- **main** ``` Running 10s test @ http://127.0.0.1:3000 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 44.72us 28.12us 3.10ms 97.95% Req/Sec 112.73k 8.25k 123.66k 91.09% 2264092 requests in 10.10s, 308.77MB read Requests/sec: 224187.08 Transfer/sec: 30.57MB ``` **this PR** ``` Running 10s test @ http://127.0.0.1:3000 2 threads and 10 connections Thread Stats Avg Stdev Max +/- Stdev Latency 42.91us 20.57us 2.04ms 97.36% Req/Sec 116.61k 7.95k 204.81k 88.56% 2330970 requests in 10.10s, 317.89MB read Requests/sec: 230806.32 Transfer/sec: 31.48MB ```
2023-09-16feat(lsp): include source in auto import completion label (#20523)Nayeem Rahman
2023-09-16perf: improve async op santizer speed and accuracy (#20501)Luca Casonato
This commit improves async op sanitizer speed by only delaying metrics collection if there are pending ops. This results in a speedup of around 30% for small CPU bound unit tests. It performs this check and possible delay on every collection now, fixing an issue with parent test leaks into steps.
2023-09-16feat: Add "deno jupyter" subcommand (#20337)Bartek Iwańczuk
This commit adds "deno jupyter" subcommand which provides a Deno kernel for Jupyter notebooks. The implementation is mostly based on Deno's REPL and reuses large parts of it (though there's some clean up that needs to happen in follow up PRs). Not all functionality of Jupyter kernel is implemented and some message type are still not implemented (eg. "inspect_request") but the kernel is fully working and provides all the capatibilities that the Deno REPL has; including TypeScript transpilation and npm packages support. Closes https://github.com/denoland/deno/issues/13016 --------- Co-authored-by: Adam Powers <apowers@ato.ms> Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-15feat(ext/node): http2.connect() API (#19671)Bartek Iwańczuk
This commit improves compatibility of "node:http2" module by polyfilling "connect" method and "ClientHttp2Session" class. Basic operations like streaming, header and trailer handling are working correctly. Refing/unrefing is still a TODO and "npm:grpc-js/grpc" is not yet working correctly. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-15fix(test): share fail fast tracker between threads (#20515)Nayeem Rahman
2023-09-15chore(ext/http): fix a rejection test (#20514)Matt Mastracci
Use `assertRejects` to actually catch errors.
2023-09-15fix(ext/http): ensure aborted bodies throw (#20503)Matt Mastracci
Fixes #20502 -- ensure that Hyper errors make it through to JS.
2023-09-15fix: init v8 platform once on main thread (#20495)Luca Casonato
This is a mitigation for segfaults happening in V8 on CPU with MPK (memory protected keys). After much trail and error we found that unless V8 platform is initialized on main thread the segfaults start appears once JIT kicks in. "deno test" and "deno bench" were affected by this problem. Fixes https://github.com/denoland/deno/issues/19926 Fixes https://github.com/denoland/deno/issues/20243 Fixes https://github.com/denoland/deno/issues/20450 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-14refactor: rewrite more ops to op2 macro (#20478)Bartek Iwańczuk
2023-09-14chore(cli): update chrono to remove broken time dep (#20508)Matt Mastracci
Fixes the last dependabot security warning