summaryrefslogtreecommitdiff
path: root/cli/tests
AgeCommit message (Collapse)Author
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-18fix(cli): Enhanced errors for Jupyter (#20530)Kyle Kelley
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-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-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-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-14refactor: rewrite more ops to op2 macro (#20478)Bartek Iwańczuk
2023-09-14feat: explicit resource management in TypeScript (#20506)David Sherret
This adds support for `using` and `await using` declarations in TypeScript only. We need to wait for v8 to support it for this to work in JS.
2023-09-14refactor: remove `DENO_UNSTABLE_NPM_SYNC_DOWNLOAD` and custom sync ↵David Sherret
functionality (#20504) https://github.com/denoland/deno/pull/20488 enables us to remove this functionality. This is better because our test suite is now not testing a separate code path.
2023-09-14chore(tests): ability to pattern match unordered lines (#20488)David Sherret
This adds the ability to pattern match unordered lines. For example, the downloading messages may appear in any order ``` [UNORDERED_START] Download https://localhost:4546/a.ts Download https://localhost:4546/b.ts [UNORDERED_END] Hello! ``` Additionally, I've made the pattern matching slightly more strict and the output better.
2023-09-14fix: output traces for op sanitizer in more cases (#20494)Luca Casonato
This adds traces for the "started outside test, closed inside test" case.
2023-09-14feat(ext/web): Add name to Deno.customInspect of File objects (#20415)lionel-rowe
Fixes https://github.com/denoland/deno/issues/20414
2023-09-13feat(lsp): WorkspaceSettings::disablePaths (#20475)Nayeem Rahman
2023-09-12fix(init): skip existing files instead of erroring (#20434)Leigh McCulloch
### What Skip writing files from the template if the files already exist in the project directory. ### Why When I run deno init in a directory that already has a main.ts, or one of the other template files, I usually want to initialize a workspace around a file I've started working in. A hard error in this case seems counter productive. An informational message about what's being skipped seems sufficient. Close #20433
2023-09-12refactor: rewrite ext/io, ext/webstorage ops to op2 (#20461)Bartek Iwańczuk
2023-09-12fix(ext/http): create a graceful shutdown API (#20387)Matt Mastracci
This PR implements a graceful shutdown API for Deno.serve, allowing all current connections to drain from the server before shutting down, while preventing new connections from being started or new transactions on existing connections from being created. We split the cancellation handle into two parts: a listener handle, and a connection handle. A graceful shutdown cancels the listener only, while allowing the connections to drain. The connection handle aborts all futures. If the listener handle is cancelled, we put the connections into graceful shutdown mode, which disables keep-alive on http/1.1 and uses http/2 mechanisms for http/2 connections. In addition, we now guarantee that all connections are complete or cancelled, and all resources are cleaned up when the server `finished` promise resolves -- we use a Rust-side server refcount for this. Performance impact: does not appear to affect basic serving performance by more than 1% (~126k -> ~125k) --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-11fix: exclude internal JS files from coverage (#20448)Marvin Hagemeister
2023-09-10fix(lsp): always enable semantic tokens responses (#20440)Nayeem Rahman
2023-09-09feat: TypeScript 5.2 (#20425)David Sherret
Without `using` declarations or decorator metadata (waiting for that in v8).
2023-09-08feat: lockfile v3 (#20424)David Sherret
Details: https://github.com/denoland/deno_lockfile/pull/8
2023-09-08fix(ext/node/ops/zlib/brotli): Allow decompressing more than 4096 bytes (#20301)Curran McConnell
Fixes https://github.com/denoland/deno/issues/19816 In that issue, I suggest switching over the other brotli functionality to the Rust API provided by the `brotli` crate. Here, I only do that with the `brotli_decompress` function to fix the bug with buffers longer than 4096 bytes.
2023-09-07feat: support import attributes (#20342)David Sherret
2023-09-07chore(ext/kv): limit total key size in an atomic op to 80 KiB (#20395)Heyang Zhou
Keys are expensive metadata. We track it for various purposes, e.g. transaction conflict check, and key expiration. This patch limits the total key size in an atomic operation to 80 KiB (81920 bytes). This helps ensure efficiency in implementations.
2023-09-06fix(test): apply filter before checking for "only" (#20389)Nayeem Rahman
2023-09-06fix: don't show filtered test suites as running (#20385)Marvin Hagemeister
2023-09-06feat(test): Add Deno.test.ignore and Deno.test.only (#20365)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17106
2023-09-06fix(ext/node): implement AES GCM cipher (#20368)Divy Srivastava
Adds support for AES-GCM 128/256 bit keys in `node:crypto` and `setAAD()`, `setAuthTag()` and `getAuthTag()` Uses https://github.com/littledivy/aead-gcm-stream Fixes https://github.com/denoland/deno/issues/19836 https://github.com/denoland/deno/issues/20353
2023-09-05feat(lsp): provide the deno.cache command server-side (#20111)sigmaSd
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-09-05fix(node/child_process): don't crash on undefined/null value of an env var ↵zuisong
(#20378) Fixes #20373 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-04chore: disable 'test-http-content-length.js` test (#20344)Bartek Iwańczuk
2023-09-04Revert "refactor: rewrite ops that use 'deferred' to use 'op2(async(lazy))' ↵Bartek Iwańczuk
(#20303) (#20370) This reverts commit https://github.com/denoland/deno/commit/83426be6eead06c680ae527468aeaf8723543ff2. Includes a regression test.
2023-09-02fix(lsp): properly handle disabled configuration requests (#20358)Nayeem Rahman
Fixes #19802. Properly respect when clients do not have the `workspace/configuration` capability, a.k.a. when an editor cannot provide scoped settings on request from the LSP. - Fix one spot where we weren't checking for the capability before sending this request. - For `enablePaths`, fall back to the settings passed in the initialization options in more cases. - Respect the `workspace/configuration` capability in the test harness client. See: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration.
2023-08-30fix(runtime/permissions): Resolve executable specifiers in allowlists and ↵Nayeem Rahman
queries (#14130) Closes #14122. Adds two extensions to `--allow-run` behaviour: - When `--allow-run=foo` is specified and `foo` is found in the `PATH` at startup, `RunDescriptor::Path(which("foo"))` is added to the allowlist alongside `RunDescriptor::Name("foo")`. Currently only the latter is. - When run permission for `foo` is queried and `foo` is found in the `PATH` at runtime, either `RunDescriptor::Path(which("foo"))` or `RunDescriptor::Name("foo")` would qualify in the allowlist. Currently only the latter does.
2023-08-29refactor(init): simplify template (#20325)Ryan Dahl
- Don't include benchmark file - most people won't need this. - Use deno.json instead of deno.jsonc, because it's a more common file format.
2023-08-29chore(cli): use NPM_CONFIG_REGISTRY for all tests (#20320)Matt Mastracci
We never want tests to hit the real npm registry because this causes test flakes. In addition, we set a sentinal "unset" value for `NPM_CONFIG_REGISTRY` to ensure that all tests requiring npm go through the test server.
2023-08-29fix(ext/kv): don't panic if listening on queues and KV is not closed (#20317)Igor Zinkovsky
fixes #20312
2023-08-29feat(lockfile): add redirects to the lockfile (#20262)David Sherret
2023-08-29fix(node/http): don't leak resources on destroyed request (#20040)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19828
2023-08-29fix(lsp): delete test modules with all tests deleted (#20321)Nayeem Rahman
Fixes https://github.com/denoland/vscode_deno/issues/899.