summaryrefslogtreecommitdiff
path: root/cli/ops
AgeCommit message (Collapse)Author
2022-04-17fix: panic when trying to pledge permissions before restoring previous ↵Bartek Iwańczuk
pledge (#14306) This commit fixes and edge case, where testing/benching code could pledge new permission set before restoring the previous pledge. Appropriate panics were added and tests that assert that process is killed in case of "recursive pledge".
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: 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-03-29refactor(flags): rename CheckFlag to TypecheckMode (#14111)Bartek Iwańczuk
2022-03-23fix(bench): require --unstable flag in JavaScript (#14091)Bartek Iwańczuk
2022-03-16feat(ops): optional OpState (#13954)Aaron O'Mullan
2022-03-14feat(ops): custom arity (#13949)Aaron O'Mullan
Also cleanup & drop ignored wildcard op-args
2022-03-14feat(core): codegen ops (#13861)Divy Srivastava
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
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-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-02-01refactor: integrate deno_graph breaking changes (#13495)Kitson Kelly
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-01-13refactor: upgrade to import_map v0.6 (#13368)David Sherret
2022-01-13refactor: move transpiling to deno_ast (#13332)David Sherret
2022-01-12feat(cli): add ignore directives to bundled code (#13309)juju
This commit adds lint and fmt ignore directives to bundled code as well as a comment stating that the code was bundled and shouldn't be edited manually.
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-29cleanup(cli): use op Extensions (#13223)Aaron O'Mullan
Enabling op-middleware for overrides in lieu of imperative .replace_op() etc... Impacts #13219, #12938, #13122
2021-12-22chore: update deno_graph and deno_doc (#13173)Kitson Kelly
2021-12-16refactor(cli): use GraphData for check and emit (#12960)Nayeem Rahman
2021-12-09fix(watch): mitigate race condition between file write by other process and ↵David Sherret
watch read (#13038)
2021-11-30feat: add `--no-check=remote` flag (#12766)Kitson Kelly
Closes #11970
2021-11-24fix(cli): don't cache .tsbuildinfo unless emitting (#12830)Nayeem Rahman
Fixes #12755 Fixes #12807 Fixes #12832
2021-11-16refactor: re-export anyhow from deno_core (#12777)Ryan Dahl
2021-11-09feat(cli): support React 17 JSX transforms (#12631)Kitson Kelly
Closes #8440
2021-11-03fix: Deno.emit crashes with BorrowMutError (#12627)Ryan Dahl
Warn on await_holding_refcell_ref clippy rule to avoid this in the future. Fixes #12453
2021-10-31feat: Stabilize Deno.TestDefinition.permissions (#12078)Bartek Iwańczuk
2021-10-13fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297)Nayeem Rahman
2021-10-11refactor: integrate deno_graph into CLI (#12369)Kitson Kelly
2021-10-05chore: various op cleanup (#12329)Leo K
2021-09-24refactor: Rename ProgramState to ProcState (#12204)Ryan Dahl
Move Arc into struct
2021-09-18fix(cli/fmt_errors): Abbreviate long data URLs in stack traces (#12127)Nayeem Rahman
Co-authored-by: Mike White <mike.white@auctane.com>
2021-09-11refactor: use import_map crate (#11974)Bartek Iwańczuk
Removes ImportMap implementation from "cli/" and instead uses "import_map" crate
2021-09-07refactor(lsp): use deno_ast and cache swc ASTs (#11780)David Sherret
2021-08-26refactor(cli): introduce module specifier test modes (#11769)Casper Beyer
This commit merges the two vectors of specifiers into a single one introducing the concept of a "TestMode" which is a tri-state enum specifying how a specifier is to be tested (as documentation, as an executable module or as both). This is determined during the collection phase and determines how a specifier will be executed based on how the specifier was collected (directly or not) and if it has an eligible media_type when fetched. For example "deno test README.md" is marked as documentation because, while it is a direct inclusion it is not an executable media type therefore will only have the fenced code blocks that can be parsed from it tested.
2021-07-14refactor(cli/tools/test_runner): split reporter into distinct stages (#11395)Casper Beyer
This splits up the reporter into smaller functions, one for each distinct event that happens during the testing process.
2021-07-06chore: use parking_lot for synchronization primitives to align with tokio ↵David Sherret
(#11289) parking_lot is already transitively used in tokio via the "full" cargo feature
2021-06-22fix(#10761): graph errors reported as diagnostics for `Deno.emit()` (#10767)Kitson Kelly
Fixes #10761
2021-06-22feat(cli): support "types" when type checking (#10999)Kitson Kelly
Fixes #10677
2021-05-17fix: static import permissions in dynamic importsLuca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-05-14refactor(cli/ops): don't pass ops through json (#10629)Casper Beyer
2021-05-08cleanup(ops): remove unused ZeroCopyBuf arg-types (#10530)Aaron O'Mullan
2021-05-04fix(cli): give context when failed to load import map (#10478)Satya Rohith
2021-04-30fix(cli/tools/test): print module tests originate from (#10428)Casper Beyer
2021-04-28feat(test): run test modules in parallel (#9815)Casper Beyer
This commit adds support for running test in parallel. Entire test runner functionality has been rewritten from JavaScript to Rust and a set of ops was added to support reporting in Rust. A new "--jobs" flag was added to "deno test" that allows to configure how many threads will be used. When given no value it defaults to 2.
2021-04-25feat(cli): add test permissions to Deno.test (#10188)Casper Beyer
This commits adds adds "permissions" option to the test definitions which allows tests to run with different permission sets than the process's permission. The change will only be in effect within the test function, once the test has completed the original process permission set is restored. Test permissions cannot exceed the process's permission. You can only narrow or drop permissions, failure to acquire a permission results in an error being thrown and the test case will fail.
2021-04-26refactor(cli): rename Deno.emit() bundle options to "module" and "classic" ↵Nayeem Rahman
(#10332)
2021-04-18cleanup(cli): use runtime's reg_sync() and reg_async() (#10241)Aaron O'Mullan
2021-04-12refactor(deno): remove concept of bin & json ops (#10145)Aaron O'Mullan
2021-04-12feat(runtime/permissions): prompt fallback (#9376)crowlKats
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-04-02refactor(ops): remove variadic buffers (#9944)Aaron O'Mullan