summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
2022-10-16fix(ext/cache): illegal constructor (#16205)Marcos Casagrande
2022-10-16feat: support inlay hints (#16287)Kitson Kelly
Closes: #11853
2022-10-15feat(unstable/task): add `INIT_CWD` env var (#16110)David Sherret
2022-10-15fix(ext/crypto): correct HMAC get key length op (#16201)Filip Skokan
fixes #16180 `HMAC`'s `get key length` `op` uses the hash function's block size, not output size. refs https://github.com/cloudflare/workerd/issues/68#issuecomment-1271189657
2022-10-14fix(lsp): properly handle snippets on completions (#16274)Kitson Kelly
Fixes #15367
2022-10-13chore: Added onbeforeunload to window type definition (#16251)Matt Ezell
2022-10-10fix(ext/fetch): fix illegal header regex (#16236)Marcos Casagrande
This PR fixes invalid header parsing which is flaky because `g` flag is being used in the regex, which keeps track of `lastIndex` ```javascript try { new Headers([["x", "\u0000x"]]); // error } catch(e) {} new Headers([["x", "\u0000x"]]); // no error ``` This issue affects `Response` & `Request` constructors as well
2022-10-10fix sparse array inspection (#16204)sigmaSd
fix https://github.com/denoland/deno/issues/16202
2022-10-09feat(core): improve resource read & write traits (#16115)Luca Casonato
This commit introduces two new buffer wrapper types to `deno_core`. The main benefit of these new wrappers is that they can wrap a number of different underlying buffer types. This allows for a more flexible read and write API on resources that will require less copying of data between different buffer representations. - `BufView` is a read-only view onto a buffer. It can be backed by `ZeroCopyBuf`, `Vec<u8>`, and `bytes::Bytes`. - `BufViewMut` is a read-write view onto a buffer. It can be cheaply converted into a `BufView`. It can be backed by `ZeroCopyBuf` or `Vec<u8>`. Both new buffer views have a cursor. This means that the start point of the view can be constrained to write / read from just a slice of the view. Only the start point of the slice can be adjusted. The end point is fixed. To adjust the end point, the underlying buffer needs to be truncated. Readable resources have been changed to better cater to resources that do not support BYOB reads. The basic `read` method now returns a `BufView` instead of taking a `ZeroCopyBuf` to fill. This allows the operation to return buffers that the resource has already allocated, instead of forcing the caller to allocate the buffer. BYOB reads are still very useful for resources that support them, so a new `read_byob` method has been added that takes a `BufViewMut` to fill. `op_read` attempts to use `read_byob` if the resource supports it, which falls back to `read` and performs an additional copy if it does not. For Rust->JS reads this change should have no impact, but for Rust->Rust reads, this allows the caller to avoid an additional copy in many scenarios. This combined with the support for `BufView` to be backed by `bytes::Bytes` allows us to avoid one data copy when piping from a `fetch` response into an `ext/http` response. Writable resources have been changed to take a `BufView` instead of a `ZeroCopyBuf` as an argument. This allows for less copying of data in certain scenarios, as described above. Additionally a new `Resource::write_all` method has been added that takes a `BufView` and continually attempts to write the resource until the entire buffer has been written. Certain resources like files can override this method to provide a more efficient `write_all` implementation.
2022-10-05fix(ext/cache): prevent cache insert if body is not fully written (#16138)Marcos Casagrande
2022-10-05fix(ext/flash): Avoid sending Content-Length when status code is 204 (#15901)ayame113
Currently Content-Length is sent when the status code is 204. However, according to the spec, this should not be sent. Modify the if statement below to prevent the Content-Length from being sent.
2022-10-04perf(ext/fetch): consume body using ops (#16038)Marcos Casagrande
This commit adds a fast path to `Request` and `Response` that make consuming request bodies much faster when using `Body#text`, `Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream. Because the response bodies for `fetch` are FastStream, this speeds up consuming `fetch` response bodies significantly.
2022-10-04chore: remove 'fix_exotic_specifier' test (#16143)Bartek Iwańczuk
It's a test that's been flaky for a week, and after offline discussion, we're no longer sure what it's testing.
2022-10-04fix(ext/crypto): interoperable import/export (#16153)Filip Skokan
This PR updates RSA key import/export to a state which is interoperable with other implementations. For RSA the only OID in and out is `rsaEncryption`. For EC the only OID in and out is `id-ecpublickey` (fixed in #16152). see https://github.com/w3c/webcrypto/issues/307#issuecomment-995813032 see https://github.com/w3c/webcrypto/issues/307 see https://github.com/w3c/webcrypto/pull/305 see https://github.com/nodejs/node/pull/42816
2022-10-04fix(ext/crypto): ecdh spki key import/export roundtrip (#16152)Filip Skokan
2022-10-03fix(ext/crypto): deriveBits for ECDH not taking length into account (#16128)Aurélien Bertron
Fixes #16047
2022-10-03feat(unstable): add support for npm specifier cli arguments for 'deno cache' ↵Bartek Iwańczuk
(#16141) This commit adds support for npm specifier in "deno cache" subcommand. ``` $ deno cache --unstable npm:vite npm:chalk https://deno.land/std/http/file_server.ts ``` Besides downloading requested npm package(s), it will also download necessary code from "std/node/".
2022-10-03fix(npm): better error is version is specified after subpath (#16131)Bartek Iwańczuk
2022-10-03fix(npm): panic on invalid package name (#16123)Bartek Iwańczuk
2022-10-03fix(ext/cache): close resource on error (#16129)Marcos Casagrande
2022-10-03fix(ext/crypto): fix importKey error when leading zeroes (#16009)李瑞丰
Co-authored-by: Jason <m.jason.liu@outlook.com>
2022-10-02fix(ext/cache): acquire reader lock before async op (#16126)Marcos Casagrande
2022-10-01fix(npm): handle json files in require (#16125)Bartek Iwańczuk
2022-10-01lsp: use deno:/asset instead of deno:asset (#16023)sigmaSd
Make offering "virtual documents" via the lsp easier to parse. `deno:` can be ambiguous to parse by editors (can conflict with linux paths) Neovim recently landed a PR https://github.com/neovim/neovim/pull/19797 that allows it to parse `scheme:/` this PR should make deno lsp work correctly in neovim
2022-09-29fix(ext/fetch): `Body#bodyUsed` for static body (#16080)Marcos Casagrande
This fixes a bug where `Body#bodyUsed` incorrectly returns `false` for a body that has actually already been consumed, after `Body#body` is called.
2022-09-29chore(ext/flash): Enabling disabled windows tests (#16081)ayame113
2022-09-28chore: improve JSDoc for built-in APIs (#16048)Kitson Kelly
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28fix(ext/flash): reregister socket on partial read on Windows (#16076)Divy Srivastava
2022-09-28chore: fix flaky integration::lint::compact (#16075)David Sherret
2022-09-28feat(npm): functionality to support child_process.fork (#15891)David Sherret
2022-09-28feat(lint): add --compact flag for terse output (#15926)Brenley Dueck
2022-09-28feat(core): add Deno.core.setPromiseHooks (#15475)Guilherme Bernal
2022-09-28feat(unstable): Deno.setRaw -> Deno.stdin.setRaw (#15797)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28feat: add --allow-sys permission flag (#16028)Yoshiya Hinosawa
2022-09-28feat: implement Web Cache API (#15829)Satya Rohith
2022-09-27fix(ext/fetch): blob url (#16057)Satya Rohith
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-26perf(ext/fetch): use content-length in InnerBody.consume (#15925)Marcos Casagrande
This fast path prevents repeated allocations when receiving a fetch body with a known size. Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-26fix(ext/console): fix error when logging a proxied Date (#16018)李瑞丰
2022-09-26perf(ext/console): break on iterableLimit & better sparse array handling ↵Marcos Casagrande
(#15935)
2022-09-23perf: don't re-download package tarball to global cache if local ↵David Sherret
node_modules folder exists for package (#16005)
2022-09-23test(ext/fetch): enable null body status test on windows (#15995)Marcos Casagrande
2022-09-22chore: temporarily ignore websocketstream test (#15997)David Sherret
2022-09-22feat(npm): add flag for creating and resolving npm packages to a local ↵David Sherret
node_modules folder (#15971)
2022-09-22feat(npm): add support for --reload=npm: and --reload=npm:<package> (#15972)Bartek Iwańczuk
2022-09-22feat: allow exiting on two consecutive ctrl+c presses (#15981)Kayla Washburn
2022-09-21fix(runtime): better error message with Deno.env.get/set (#15966)Yoshiya Hinosawa
2022-09-20fix(flash): panic if response if undefined (#15964)Bartek Iwańczuk
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-09-20feat(cli): update to TypeScript 4.8 (#15064)Kitson Kelly
2022-09-19refactor: move out test files from root testdata directory into sub ↵David Sherret
directories (#15949)
2022-09-18fix(doc): deno doc should parse modules if they haven't been parsed before ↵David Sherret
(#15941)