summaryrefslogtreecommitdiff
path: root/cli/tests/unit
AgeCommit message (Collapse)Author
2023-04-14fix(ext/websocket): Avoid write deadlock that requires read_frame to ↵Divy Srivastava
complete (#18705) Fixes https://github.com/denoland/deno/issues/18700 Timeline of the events that lead to the bug. 1. WebSocket handshake complete 2. Server on `read_frame` holding an AsyncRefCell borrow of the WebSocket stream. 3. Client sends a TXT frame after a some time 4. Server recieves the frame and goes back to `read_frame`. 5. After some time, Server starts a `write_frame` but `read_frame` is still holding a borrow! ^--- Locked. read_frame needs to complete so we can resume the write. This commit changes all writes to directly borrow the `fastwebsocket::WebSocket` resource under the assumption that it won't affect ongoing reads.
2023-04-12fix(ext/cache): cache.put overwrites previous call (#18649)Satya Rohith
2023-04-11fix(ext/kv): keys must be arrays (#18655)Luca Casonato
There was some leftover code from previous iterations, where keys could be single parts instead of arrays also. This didn't match the types.
2023-04-04refactor(ext/http): bring back 'reusePort' option for 'Deno.serve()' (#18590)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/18582
2023-04-03refactor: "Deno.serve()" API uses "Deno.serveHttp()" internally (#18568)Bartek Iwańczuk
This commit changes implementation of "Deno.serve()" API to use "Deno.serveHttp()" under the hood. This change will allow us to remove the "flash" server implementation, bringing stability to the "Deno.serve()" API. "cli/tests/unit/flash_test.ts" was renamed to "serve_test.ts". Closes https://github.com/denoland/deno/issues/15574 Closes https://github.com/denoland/deno/issues/15504 Closes https://github.com/denoland/deno/issues/15646 Closes https://github.com/denoland/deno/issues/15909 Closes https://github.com/denoland/deno/issues/15911 Closes https://github.com/denoland/deno/issues/16828 Closes https://github.com/denoland/deno/issues/18046 Closes https://github.com/denoland/deno/issues/15869
2023-03-31fix: upgrade to TypeScript 5.0.3 (#18532)David Sherret
2023-03-30fix(dts): improve types for the Deno.KV API (#18510)Luca Casonato
2023-03-30feat(ext/kv): return versionstamp from set/commit (#18512)Luca Casonato
This commit updates the `Deno.Kv` API to return the new commited versionstamp for the mutated data from `db.set` and `ao.commit`. This is returned in the form of a `Deno.KvCommitResult` object that has a `versionstamp` property.
2023-03-25chore(ext/kv): add limits (#18415)Heyang Zhou
2023-03-24fix(ext/kv): add missing `getMany` method (#18410)Heyang Zhou
The `getMany` method was missing from the implementation of the `Deno.Kv` class. This patch fixes it.
2023-03-22fix(ext/kv): reverse mapping between `AnyValue::Bool` and `KeyPart::Bool` ↵Heyang Zhou
(#18365) Previously the mapping between `AnyValue::Bool` and `KeyPart::Bool` was inverted. This patch also allows using the empty key `[]` as range start/end to `snapshot_read`.
2023-03-22chore(ext/kv): disable ci tests on darwin (#18364)Heyang Zhou
https://github.com/denoland/deno/issues/18363
2023-03-22Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362)Ryan Dahl
This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74.
2023-03-22chore(cli): measure performance against wall-clock (#18357)Matt Mastracci
Fixes test flake by requiring perf to be <150% of wall-clock time rather than <500ms.
2023-03-22test: ignore fetchWithInvalidContentLength and fetchConnectionError on ↵Bartek Iwańczuk
Windows (#18351) https://github.com/denoland/deno/issues/18350
2023-03-22feat(cli): --ext parameter for run, compile, and bundle (#17172)Cre3per
Adds `--ext` to `deno run`, closes #5088 Additionally - Adds `--ext` to `deno compile` and `deno bundle`
2023-03-22refactor: rename Deno.openKv() to Deno.kv() (#18349)Ryan Dahl
2023-03-22test: mark two unit tests as flaky (#18344)Bartek Iwańczuk
Temporarily marking two "fetch" tests as flaky, since they've been failing on CI for the past 24h.
2023-03-22fix(ext/kv): don't request permissions for ":memory:" (#18346)Nayeem Rahman
Currently `Deno.openKv(":memory:")` requests read+write permissions for `./:memory:` even though no file is read or written. Also added some guards for special sqlite paths that were unintentionally opted into.
2023-03-22feat(ext/kv): key-value store (#18232)Heyang Zhou
This commit adds unstable "Deno.openKv()" API that allows to open a key-value database at a specified path. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-21feat: TypeScript 5.0.2 (except decorators) (#18294)David Sherret
This upgrades TypeScript to 5.0.2, but does not have ES decorator support because swc does not support that yet.
2023-03-21chore(ext/console): inspect anonymous function as `[Function (anonymous)]` ↵Yoshiya Hinosawa
(#18283) This PR changes the inspect result of anonymous functions from `[Function]` to `[Function (anonymous)]`. This behavior is aligned to `util.inspect` of Node.js.
2023-03-20feat(ext/net): Add multicasting APIs to DatagramConn (#10706) (#17811)Sam Gwilym
2023-03-19fix(runtime): Extract error code for all OS error variants (#17958)Kamil Ogórek
2023-03-17chore(ext/console): add 'quotes' internal option to Deno.inspect (#18183)Yoshiya Hinosawa
2023-03-17BREAKING(unstable): remove WebGPU (#18094)Leo Kettmeir
This PR _**temporarily**_ removes WebGPU (which has behind the `--unstable` flag in Deno), due to performance complications due to its presence. It will be brought back in the future; as a point of reference, Chrome will ship WebGPU to stable on 26/04/2023. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17BREAKING(ext/fs): FileInfo.dev is defined on Windows (#18237)Bartek Iwańczuk
Addresses feedback from https://github.com/denoland/deno/pull/18073#issuecomment-1471480385. Reverts changes to `FileInfo` fields that are not available on Windows making them `null`. Only `FileInfo.dev` is non-null.
2023-03-16feat(fs): support FileInfo.dev on Windows (#18073)Bartek Iwańczuk
This commit adds support for retrieving `dev` information when stating files on Windows. Additionally `Deno.FileInfo` interfaces was changed to always return 0 for fields that we don't retrieve information for on Windows. Closes https://github.com/denoland/deno/issues/18053 --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-03-15fix(ext/http): abort request signal when response errors (#17822)Timo Wilhelm
2023-03-15chore: add test for ws ping/pong (#18204)Divy Srivastava
This commit adds test for https://github.com/denoland/deno/issues/17761 which was fixed by https://github.com/denoland/deno/pull/17762. Verified that test fails on Deno 1.30.1
2023-03-14refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)Bartek Iwańczuk
This commit changes current "deno_core::resolve_url_or_path" API to "resolve_url_or_path_deprecated" and adds new "resolve_url_or_path" API that requires to explicitly pass the directory from which paths should be resolved to. Some of the call sites were updated to use the new API, the reminder of them will be updated in a follow up PR. Towards landing https://github.com/denoland/deno/pull/15454
2023-03-13refactor: Remove call sites of "deno_core::resolve_url_or_path" (#18169)Bartek Iwańczuk
These call sites didn't need to use "resolve_url_or_path". Towards landing https://github.com/denoland/deno/pull/15454
2023-03-13fix(core): `SafePromiseAll` to be unaffected by `Array#@@iterator` (#17542)Kenta Moriuchi
2023-03-09fix(ext/webstorage): check size of inputs before insert (#18087)Divy Srivastava
2023-03-08refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme ↵Bartek Iwańczuk
for snapshotted modules (#18041) This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020
2023-03-05fix(ext/crypto): correctly limit ECDSA and hash algorithms (#18030)Filip Skokan
Closes #18029
2023-03-01fix(core): introduce `SafeRegExp` to primordials (#17592)Kenta Moriuchi
2023-02-24refactor(flash): move remoteAddr to options bag (#17913)Leo Kettmeir
Applies suggestion from #17912
2023-02-23fix(webgpu): don't default to 0 for setVertexBuffer.size & properly use ↵Leo Kettmeir
webidl.setlike (#17800)
2023-02-22feat(ext/ffi): Replace pointer integers with v8::External objects (#16889)Aapo Alasuutari
2023-02-22fix(lint): revert no-deprecated-api for Deno.run (#17880)David Sherret
2023-02-15feat(flash): add 2nd param to handler to get remote address (#17633)Leo Kettmeir
Closes #17583
2023-02-12fix: add WouldBlock error (#17339)Leo Kettmeir
2023-02-12perf(http): remove allocations checking upgrade and connection header values ↵David Sherret
(#17727)
2023-02-12fix(ext/flash): Always send correct number of bytes when handling HEAD ↵Kamil Ogórek
requests (#17740) This was not caught in the previous test case, as the response body was smaller than the size of `HEAD` response. This made `nwritten < responseLen` check in `writeFixedResponse` to fail, and not trigger `op_flash_respond_async` as a result. When the response body is larger than the `HEAD` though, as in the updated test case (`HEAD` i 120 bytes, where our response is 300 bytes), it would think that we still have something to send, and effectively panic, as `op_flash_respond` already removed the request from the pool. This change, makes the `handleResponse` function always calculate the number of bytes to transmit when `HEAD` request is encountered. Effectively ignoring `Content-Length` of the body, but still setting it correctly in the request header itself. Fixes https://github.com/denoland/deno/issues/17737
2023-02-11fix(ops): Always close cancel handles for read_async/write_async (#17736)Kamil Ogórek
Fixes https://github.com/denoland/deno/issues/17734
2023-02-09refactor: deno_graph 0.43 upgrade (#17692)David Sherret
2023-02-08fix(ext/console): Only right-align integers in console.table() (#17389)Waldir Pimenta
2023-02-05 refactor: rename `deno` specifiers to `internal` (#17655)Leo Kettmeir
2023-02-05fix(ext/console): log class for class constructor (#17615)Gasman
Co-authored-by: tannal <tannal.cn@gmail.com>