summaryrefslogtreecommitdiff
path: root/cli/ops
AgeCommit message (Collapse)Author
2020-11-03refactor(cli): cleanup compiler snapshot and tsc/module_graph (#8220)Kitson Kelly
2020-11-02refactor(cli): migrate runtime compile/bundle to new infrastructure (#8192)Kitson Kelly
Fixes #8060
2020-10-30fix(cli/fmt): Strip "\\?\" prefix when displaying Windows paths (#8135)Nayeem Rahman
2020-10-26feat(unstable): add Deno.systemCpuInfo() (#7774)Elias Sjögreen
2020-10-26refactor(cli): rewrite Deno.transpileOnly() to use SWC (#8090)Bartek Iwańczuk
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-10-23refactor(cli): migrate run and cache to new infrastructure (#7996)Kitson Kelly
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-22fix(cli/rt/websockets): Only add Sec-WebSocket-Protocol if it's not empty ↵nerix
(#7936)
2020-10-20feat: stabilize Deno.fsync and Deno.fdatasync (#8038)Casper Beyer
2020-10-20fix(cli/worker): Print error stacks from the origin Worker (#7987)Nayeem Rahman
Fixes #4728
2020-10-15feat(cli/ops): add the sleep_sync op (#7974)William Perron
2020-10-14fix: top-level-await module execution (#7946)Bartek Iwańczuk
This commit changes implementation of top-level-await in "deno_core". Previously promise returned from module evaluation was not awaited, leading to out-of-order execution of modules that have TLA. It's been fixed by changing "JsRuntime::mod_evaluate" to be an async function that resolves when the promise returned from module evaluation also resolves. When waiting for promise resolution event loop is polled repeatedly, until there are no more dynamic imports or pending ops.
2020-10-13refactor(cli): rename GlobalState to ProgramState (#7914)Bartek Iwańczuk
2020-10-12chore(cli): remove dead code (#7941)Kitson Kelly
2020-10-11reland JsRuntime/Worker is not a Future (#7924)Bartek Iwańczuk
2020-10-10Fix 100% CPU idling problem by reverting #7672 (#7911)Ryan Dahl
* Revert "refactor: Worker is not a Future (#7895)" This reverts commit f4357f0ff9d39411f22504fcc20db6bd5dec6ddb. * Revert "refactor(core): JsRuntime is not a Future (#7855)" This reverts commit d8879feb8c832dbb38649551b1cb0730874f7be6. * Revert "fix(core): module execution with top level await (#7672)" This reverts commit c7c767782538243ded64742dca9b34d6af74d62d.
2020-10-09refactor: Worker is not a Future (#7895)Bartek Iwańczuk
This commit rewrites deno::Worker to not implement Future trait. Instead there are two separate methods: - Worker::poll_event_loop() - does single tick of event loop - Worker::run_event_loop() - runs event loop to completion Additionally some cleanup to Worker's field visibility was done.
2020-10-07refactor: rename isolate to js_runtime (#7858)Bartek Iwańczuk
This commit renames occurrences of "isolate" variable name to "js_runtime". This was outstanding debt after renaming deno_core::CoreIsolate to JsRuntime.
2020-10-07fix(cli/ops/fs): Don't force Windows paths separate paths with forward slash ↵Nayeem Rahman
(#7833)
2020-10-06fix(core): module execution with top level await (#7672)Bartek Iwańczuk
This commit fixes implementation of top level await in "deno_core". Previously promise returned from module execution was ignored causing to execute modules out-of-order. With this commit promise returned from module execution is stored on "JsRuntime" and event loop is polled until the promise resolves.
2020-10-02refactor(repl): use an inspector session (#7763)Casper Beyer
This ports the REPL over to Rust and makes use of an inspector session to run a REPL on top of any isolate which lets make full use of rustylines various things like validators and completors without having to introduce a bunch of hard to test internal ops and glue code. An accidental but good side effect of this is that the multiple line input we previously had is now an editable multi-line input prompt that is correctly stored in the history as a single entry.
2020-09-28refactor: move op state registration to workers (#7696)Bartek Iwańczuk
2020-09-26refactor: factor out check_unstable op helper (#7695)Bartek Iwańczuk
2020-09-26refactor: use JsRuntime to implement TSC (#7691)Bartek Iwańczuk
This commits removes "CompilerWorker" in favor of using "JsRuntime". "cli/ops/compiler.rs" has been removed in favor of inline registration of ops in "cli/tsc.rs"
2020-09-22fix: clearing timers race condition (#7617)Bartek Iwańczuk
2020-09-21refactor: use futures and serde_json from deno_core (#7614)Bartek Iwańczuk
2020-09-21chore: add copyright (#7593)tokiedokie
2020-09-20refactor: remove CliState, use OpState, add CliModuleLoader (#7588)Bartek Iwańczuk
- remove "CliState.workers" and "CliState.next_worker_id", instead store them on "OpState" using type aliases. - remove "CliState.global_timer" and "CliState.start_time", instead store them on "OpState" using type aliases. - remove "CliState.is_internal", instead pass it to Worker::new - move "CliState::permissions" to "OpState" - move "CliState::main_module" to "OpState" - move "CliState::global_state" to "OpState" - move "CliState::check_unstable()" to "GlobalState" - change "cli_state()" to "global_state()" - change "deno_core::ModuleLoader" trait to pass "OpState" to callbacks - rename "CliState" to "CliModuleLoader"
2020-09-18refactor: move fields from CliState to OpState (#7558)Bartek Iwańczuk
- move rng to OpState - move GlobalTimer to OpState - move Metrics to OpState
2020-09-18refactor: deno_fetch op crate (#7524)Bartek Iwańczuk
2020-09-17refactor: Move URL to op_crates/web (#7544)Bartek Iwańczuk
2020-09-17refactor: move op_resources and op_close to deno_core (#7539)Bartek Iwańczuk
Moves op_close and op_resources to deno_core::ops and exports them. Adds serde dependency to deno_core and reexports it. Moves JS implementation of those ops to Deno.core and reexports them in Deno.
2020-09-17refactor: make fetch use op_fetch_read instead of op_read (#7529)Ryan Dahl
2020-09-16Re-export deno_core::url (#7525)Ryan Dahl
Also re-exports deno_core::futures and deno_core::serde_json but these are not yet used in the CLI.
2020-09-16Remove unnecessary extern statementsRyan Dahl
2020-09-16Remove unnecessary serde_derive dependencyRyan Dahl
2020-09-15Remove http_client from CliState, store in OpState directly (#7497)Ryan Dahl
2020-09-14Rename deno::state::State to deno::state::CliState (#7480)Ryan Dahl
2020-09-15refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)Bert Belder
2020-09-13fix(WebSocket): no panic on failed connect + handle promise rejection via ↵Luca Casonato
error event (#7437)
2020-09-12refactor: improve tsc diagnostics (#7420)Kitson Kelly
2020-09-11refactor(core): JsRuntime initialization (#7415)Bartek Iwańczuk
Removes: - "deno_core::StartupData" - "deno_core::Script" - "deno_core::OwnedScript" Changes to "JsRuntime": - remove "new_with_loader()" - remove "with_heap_limits()" - rename "IsolateOptions" to "RuntimeOptions" and make public - "JsRuntime::new()" takes "RuntimeOptions" as a single param
2020-09-10Use gotham-like state for ops (#7385)Ryan Dahl
Provides a concrete state type that can be dynamically added. This is necessary for op crates. * renames BasicState to OpState * async ops take `Rc<RefCell<OpState>>` * sync ops take `&mut OpState` * removes `OpRegistry`, `OpRouter` traits * `get_error_class_fn` moved to OpState * ResourceTable moved to OpState
2020-09-10feat(unstable): Add Deno.systemMemoryInfo() (#7350)Akshat Agarwal
Co-authored-by: marcopacini <pacinim88@gmail.com> Co-authored-by: Casper Beyer <caspervonb@pm.me>
2020-09-06refactor(core): rename CoreIsolate to JsRuntime (#7373)Bartek Iwańczuk
deno_core/ - rename core_isolate.rs to runtime.rs - rename CoreIsolate to JsRuntime - rename JSError to JsError - rename JSStackFrame to JsStackFrame cli/ - update references from deno_core::CoreIsolate to deno_core::JsRuntime - rename deno_core::JSError to deno_core::JsError - rename fmt_errors::JSError to fmt_errors::JsError
2020-09-06Move JSON ops to deno_core (#7336)Bert Belder
2020-09-05feat: Implement WebSocket API (#7051)crowlKats
2020-09-01fix: use millisecond precision for Deno.futime and Deno.utime (#7299)Casper Beyer
2020-08-31replace utime crate with filetime (#7268)Casper Beyer
2020-08-31feat(unstable): add Deno.futime and Deno.futimeSync (#7266)Casper Beyer
2020-08-28refactor: migrate ops to new dispatch wrapper (#7118)Bartek Iwańczuk