summaryrefslogtreecommitdiff
path: root/cli/tools
AgeCommit message (Collapse)Author
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
2022-02-25feat: deno test --trace-ops (#13770)Bartek Iwańczuk
This commit adds "--trace-ops" flag to "deno test" subcommand. This flag enables saving of stack traces for async ops, that before were always saved. While the feature proved to be very useful it comes with a significant performance hit, it's caused by excessive source mapping of stack frames.
2022-02-24chore: upgrade to Rust 1.59 (#13767)David Sherret
2022-02-24fix(compile): Support import maps (#13756)Divy Srivastava
2022-02-23fix(upgrade): move the file permission check to the beginning of the upgrade ↵mlemesle
process (#13726)
2022-02-18fix(vendor): do not add absolute specifiers to scopes (#13710)David Sherret
2022-02-16feat(test): improved op sanitizer errors + traces (#13676)Luca Casonato
This commit improves the error messages for the `deno test` async op sanitizer. It does this in two ways: - it uses handwritten error messages for each op that could be leaking - it includes traces showing where each op was started This "async op tracing" functionality is a new feature in deno_core. It likely has a significant performance impact, which is why it is only enabled in tests.
2022-02-16feat: deno vendor (#13670)David Sherret
2022-02-15feat(coverage): add "--output" flag (#13289)VishnuJin
This commit adds "--output" to "deno coverage" subcommand. It can be used instead of piping output to a file. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-02-15feat(cli): Replace bundling with eszip in deno compile (#13563)William Tetlow
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-02-12feat: permission prompt by default (#13650)Ryan Dahl
2022-02-11refactor: use `Arc` instead of making copies of `Flags` struct (#13610)Maxim
2022-02-07refactor: factor out CDP message types (#13551)Leo Kettmeir