summaryrefslogtreecommitdiff
path: root/cli/main.rs
AgeCommit message (Collapse)Author
2022-09-02refactor: move JsError formatting to deno_runtime (#15345)Christian Dürr
This takes the existing `fmt_error` module from cli and puts it as a public module into `deno_runtime`.
2022-09-02refactor: extract out check code from emit (#15729)David Sherret
Closes #15535
2022-08-29fix(compile): panic when running with a populated dep analysis cache (#15672)David Sherret
Closes #15612
2022-08-29refactor(cli): Remove cli/node dependency on cli/compat (#15654)Bartek Iwańczuk
2022-08-24fix: resolve `jsxImportSource` relative to module (#15561)Luca Casonato
Previously `jsxImportSource` was resolved relative to the config file during graph building, and relative to the emitted module during runtime. This is now fixed so that the JSX import source is resolved relative to the module both during graph building and at runtime.
2022-08-23feat: binary npm commands (#15542)David Sherret
2022-08-22perf: cache swc dependency analysis and don't hold onto `ParsedSource`s in ↵David Sherret
memory (#15502)
2022-08-21chore: use Rust 1.63.0 (#15464)Mathias Lafeldt
2022-08-20feat(unstable): initial support for npm specifiers (#15484)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20feat: add "deno init" subcommand (#15469)Leo Kettmeir
This adds an init subcommand to that creates a project starter similar to cargo init. ``` $ deno init my_project Project initialized Run these commands to get started: cd my_project deno run main.ts deno run main_test.ts $ deno run main.ts Add 2 + 3 5 $ cat main.ts export function add(a: number, b: number): number { return a + b; } if (import.meta.main) { console.log("Add 2 + 3", add(2, 3)); } $ cat main_test.ts import { assertEquals } from "https://deno.land/std@0.151.0/testing/asserts.ts"; import { add } from "./main.ts"; Deno.test(function addTest() { assertEquals(add(2, 3), 5); }); ``` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-12fix(coverage): ensure coverage is only collected in certain situations (#15467)David Sherret
2022-08-11refactor(cli): consolidate most MainWorker related code to the same place ↵David Sherret
(#15459)
2022-08-10refactor(runtime): split up `MainWorker` and `WebWorker`'s `preload_module` ↵David Sherret
method into two separate methods (#15451)
2022-08-10feat: add initial internal npm client and dependency resolver (#15446)David Sherret
2022-08-10fix(permissions): ignore empty values (#15447)Leo Kettmeir
2022-07-19feat: emit files on demand and fix racy emit (#15220)David Sherret
2022-07-15refactor: remove redundant qualification of symbols in Rust (#15201)orvit
2022-07-13chore(cli): remove dead code related to previous tsc emit (#15196)Nayeem Rahman
2022-07-12fix: fallback to no type checking cache when db file can't be created (#15180)David Sherret
2022-07-12perf: use emit from swc instead of tsc (#15118)David Sherret
2022-07-11refactor: rename run_basic to run_local (#15068)cuobiezi
2022-07-05Revert "refactor(snapshots): to their own crate (#14794)" (#15076)Bartek Iwańczuk
This reverts commit fd5a12d7e25dc53238e2bbcffe970e646c1035f3.
2022-07-01refactor: extract `deno_graph::create_graph` use to common function (#15009)David Sherret
2022-06-29fix(vendor): ignore import map in output directory instead of erroring (#14998)David Sherret
2022-06-29refactor: rename `RootConfig` to `CliOptions` (#15007)David Sherret
2022-06-28refactor: add `RootConfig` (#14985)David Sherret
2022-06-28feat(web): add beforeunload event (#14830)Colin Ihrig
This commit adds the 'beforeunload' event. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-06-27refactor: create `args` folder (#14982)David Sherret
2022-06-25fix(core): don't panic on non-existent cwd (#14957)Divy Srivastava
Co-authored-by: cjihrig <cjihrig@gmail.com>
2022-06-24refactor(snapshots): to their own crate (#14794)Aaron O'Mullan
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-06-20refactor: add `EmitCache` trait (#14925)David Sherret
2022-06-13Deno.exit() is an alias to self.close() in worker contexts (#14826)Bartek Iwańczuk
This commit changes Deno.exit() to be an alias to self.close() in worker contexts, and the provided exit code becomes is ignored.
2022-06-13feat: no type-check by default (#14691)Bartek Iwańczuk
This commit changes default default behavior of type checking for several subcommands. Instead of type checking and reporting type errors only for local files, the type checking is skipped entirely. Type checking can still be enabled using the "--check" flag. Following subcomands are affected: - deno cache - deno install - deno eval - deno run
2022-06-08refactor: ensure exit code reference is passed to all workers (#14814)Bartek Iwańczuk
2022-06-08fix: watch dynamic imports in --watch (#14775)Bartek Iwańczuk
Fix dynamic imports being watched in the watcher when using `--watch`.
2022-05-30refactor: use deno_emit (#14737)David Sherret
2022-05-20refactor: upgrade to deno_ast 0.15 (#14680)David Sherret
2022-05-17feat: subcommands type-check only local files by default (#14623)Bartek Iwańczuk
This commit changes default mode of type-checking to "local" and adds "--check" flag to following subcommands: - deno bench - deno bundle - deno cache - deno compile - deno eval - deno install - deno test
2022-05-17BREAKING(unstable): Enable Deno namespace in workers by default (#14581)Nayeem Rahman
This commit removes "WorkerOptions.deno" option as a boolean, as well as "WorkerOptions.deno.namespace" settings. Starting with this commit all workers have access to "Deno" namespace by default.
2022-05-17BREAKING: Remove unstable Deno.emit and Deno.formatDiagnostics APIs (#14463)Bartek Iwańczuk
2022-05-14feat: add userAgent property to Navigator's prototype (#14415)randomicon00
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-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-19Remove the DENO_FUTURE_CHECK warning (#14320)Luca Casonato
It has good intentions, but it is a really terrible user experience. As such we shouldn't print this warning.
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-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-28chore: fix compile_windows_ext test (#14142)David Sherret