summaryrefslogtreecommitdiff
path: root/cli/tools
AgeCommit message (Collapse)Author
2022-05-09feat(test): repeat test name if there's user output (#14495)Bartek Iwańczuk
This commit changes test report output to repeat test name before printing result, but only if there's user output, denoted by markers.
2022-05-09feat(test): Represent uncaught errors (#14513)Nayeem Rahman
This commit adds better reporting of uncaught errors in top level scope of testing files. This change affects both console runner as well as LSP runner.
2022-05-09feat(test): change "failures:" headers in test report (#14490)Bartek Iwańczuk
2022-05-05feat(test): Show Deno.test() call locations for failures (#14484)Nayeem Rahman
2022-05-04chore: fix flaky `steps_output_within` test (#14479)David Sherret
2022-05-04fix(coverage): exclude .snap files (#14480)Geert-Jan Zwiers
2022-05-02fix(vendor): do not panic on relative specifier with scheme-like folder name ↵David Sherret
(#14453)
2022-05-01fix(test): actually capture stdout and stderr in workers (#14435)David Sherret
2022-04-27refactor: Remove PrettyJsError and js_error_create_fn (#14378)Nayeem Rahman
This commit: - removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn - removes "deno_core::JsError::create" and "deno_core::RuntimeOptions::js_error_create_fn" - adds new option to "deno_runtime::ops::worker_host::init"
2022-04-26fix(test): capture worker stdout and stderr in test output (#14410)David Sherret
2022-04-26chore: remove git.io link (#14402)Baoshuo Ren
All links on git.io will stop redirecting after April 29, 2022. - https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-26fix(test): capture inherited stdout and stderr for subprocesses in test ↵David Sherret
output (#14395)
2022-04-23fix(bench): report pending summary before clearing (#14369)evan
2022-04-22fix(bench): reset reporter context (#14360)evan
This commit fixes previous file benchmarks leaking into the next file benchmarks summary.
2022-04-20feat(repl): add global clear() function (#14332)Colin Ihrig
This commit adds a clear() function in the REPL which works similar to console.clear().
2022-04-20feat(bench): update API, new console reporter (#14305)evan
This commit changes "deno bench" subcommand, by updating the "Deno.bench" API as follows: - remove "Deno.BenchDefinition.n" - remove "Deno.BenchDefintion.warmup" - add "Deno.BenchDefinition.group" - add "Deno.BenchDefintion.baseline" This is done because bench cases are no longer run fixed amount of iterations, but instead they are run until there is difference between subsequent runs that is statistically insiginificant. Additionally, console reporter was rewritten completely, to looks similar to "hyperfine" reporter.
2022-04-20feat(repl): add "--eval-file" flag to execute a script file on startup (#14247)Naju Mancheril
This commit adds support for "--eval-file" in "deno repl" subcommand. This flag can be used to pass paths or URLs to files, that will be executed on REPL startup. All files will be executed in the same context as the REPL (ie. as "plain old scripts", not ES modules), sharing the global scope. This feature allows to implement custom REPLs on top of Deno's REPL.
2022-04-19perf(fmt/lint): incremental formatting and linting (#14314)David Sherret
2022-04-18feat(test): skip internal stack frames for errors (#14302)Bartek Iwańczuk
This commit changes "deno test" to filter out stack frames if it is beneficial to the user. This is the case when there are stack frames coming from "internal" code below frames coming from user code. Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-16fix(cli/tools/test): Prefix test module paths with "./" (#14301)Nayeem Rahman
2022-04-16feat(test): use structured data for JavaScript errors in tests (#14287)Bartek Iwańczuk
This commit rewrites test runner to send structured error data from JavaScript to Rust instead of passing strings. This will allow to customize display of errors in test report (which will be addressed in follow up commits).
2022-04-15refactor: Move source map lookups to core (#14274)Nayeem Rahman
The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place.
2022-04-15feat(test): format user code output (#14271)Bartek Iwańczuk
This commit changes "deno test" to better denote user output coming from test cases. This is done by printing "---- output ----" and "---- output end ----" markers if an output is produced. The output from "console" and "Deno.core.print" is captured, as well as direct writes to "Deno.stdout" and "Deno.stderr". To achieve that new APIs were added to "deno_core" crate, that allow to replace an existing resource with a different one (while keeping resource ids intact). Resources for stdout and stderr are replaced by pipes. Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-11feat(test): Improve testing report output (#14255)Bartek Iwańczuk
Following changes were done in this commit: - remove "test" prefix before each test - use gray color for "running N tests from ..." prompt - use relative path or remote URL instead of full URL in "running N tests from ..." prompt - in "failures" section, add file path/remote URL before the test name Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-04-11feat: Add "deno check" subcommand for type checking (#14072)Bartek Iwańczuk
This commit adds new "deno check" subcommand. Currently it is an alias for "deno cache" with the difference that remote modules don't emit TS diagnostics by default. Prints warning for "deno run" subcommand if "--check" flag is not present and there's no "--no-check" flag. Adds "DENO_FUTURE_CHECK" env variable that allows to opt into new behavior now.
2022-04-08fix: upgrade to swc_ecmascript 0.143 (#14238)David Sherret
2022-04-06fix(cli/install): preserve compat flag (#14223)Valentin Anger
2022-04-01chore(tests): use custom temp dir creation for the tests (#14153)David Sherret
2022-03-30feat(lsp): add experimental testing API (#13798)Kitson Kelly
Ref: denoland/vscode_deno#629
2022-03-29feat(cli/fmt): ignore .git folder when formatting files (#14138)TrickyPi
2022-03-29chore: upgrade dprint-core to 0.54.1 (#14146)David Sherret
2022-03-29refactor(flags): rename CheckFlag to TypecheckMode (#14111)Bartek Iwańczuk
2022-03-28chore: fix compile_windows_ext test (#14142)David Sherret
2022-03-23fix(bench): require --unstable flag in JavaScript (#14091)Bartek Iwańczuk
2022-03-23chore: remove all `pub(crate)`s from the cli crate (#14083)David Sherret
2022-03-22fix(tests): do not use global env vars in install tests (#14078)David Sherret
2022-03-18fix(cli): improve `deno compile` error messages (#13944)TrickyPi
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-18fix(cli): add support for DENO_CERT in upgrade command (#13862)Sylvain Cau
2022-03-16chore: fix build (#13997)Ryan Dahl
2022-03-15feat(task): add unstable warning to `deno task` (#13966)David Sherret
2022-03-12feat(task): log task script (#13922)Bartek Iwańczuk
Logs task name and associated script with additional args. This is disabled if "--quiet/-q" flag is present.
2022-03-11feat(task): allow colons in task name (#13918)Bartek Iwańczuk
2022-03-11feat: "deno bench" subcommand (#13713)Bartek Iwańczuk
This commit adds "deno bench" subcommand and "Deno.bench()" API that allows to register bench cases. The API is modelled after "Deno.test()" and "deno test" subcommand. Currently the output is rudimentary and bench cases and not subject to "ops" and "resource" sanitizers. Co-authored-by: evan <github@evan.lol>
2022-03-10feat: "deno task" subcommand (#13725)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-11fix(compat): cjs/esm interop for dynamic imports (#13792)Bartek Iwańczuk
This commit fixes CJS/ESM interop in compat mode for dynamically imported modules. "ProcState::prepare_module_load" was changed to accept a list of "graph roots" without associated "module kind". That module kind was always hardcoded to "ESM" which is not true for CJS/ESM interop - a CommonJs module might be imported using "import()" function. In such case the root of the graph should have "CommonJs" module kind instead of "ESM".
2022-03-11fix(test): skip typechecking for blocks inside HTML comments (#13889)Geert-Jan Zwiers
2022-03-09refactor(test): use tokio::sync::mpsc::unbounded_channel (#13881)Bartek Iwańczuk
This causes to block one less thread when running "deno test" subcommand.
2022-03-09refactor: add cli/display.rs module (#13879)Bartek Iwańczuk
2022-03-08refactor(test): don't spawn additional thread (#13877)Bartek Iwańczuk
2022-03-08fix(test): typecheck blocks annotated with long js/ts notations (#13785)Geert-Jan Zwiers