summaryrefslogtreecommitdiff
path: root/cli/worker.rs
AgeCommit message (Collapse)Author
2022-10-18feat: introduce navigator.language (#12322)Luca Matei Pintilie
Link to the spec: https://html.spec.whatwg.org/multipage/system-state.html#dom-navigator-language-dev Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28feat(npm): functionality to support child_process.fork (#15891)David Sherret
2022-09-28feat: implement Web Cache API (#15829)Satya Rohith
2022-09-26chore: use Rust 1.64.0 (#16035)Mathias Lafeldt
2022-09-17perf(ext/console): avoid `wrapConsole` when not inspecting (#15931)Divy Srivastava
2022-09-13refactor(npm): create general use `NpmPackageResolver` (#15882)David Sherret
2022-09-06fix(watch): ignore unload errors on drop (#15782)Nayeem Rahman
2022-09-06refactor(npm): reorganize remapping built-in Node modules to remote URLs ↵Bartek Iwańczuk
(#15755) Changes how built-in Node modules are mapped to polyfills from "deno_std". Instead of intertwining this logic into Node resolution logic, we map them to "NodeResolution::BuiltIn" which are remapped to "deno_std" URLs in ProcState.
2022-09-03BREAKING(unstable): remove --compat mode (#15678)Bartek Iwańczuk
This commit removes "compat" mode. We shipped support for "npm:" specifier support in v1.25 and that is preferred way to interact with Node code that we will iterate and improve upon.
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(test): grab runTests() and runBenchmarks() from __bootstrap (#15420)Nayeem Rahman
2022-08-23feat(npm): support packages with multiple command names (#15565)David Sherret
2022-08-23feat: binary npm commands (#15542)David Sherret
2022-08-20feat(unstable): initial support for npm specifiers (#15484)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-16feat(runtime): add pre_execute_module_cb (#15485)David Sherret
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)
2020-12-13refactor: deno_runtime crate (#8640)Bartek Iwańczuk
This commit moves Deno JS runtime, ops, permissions and inspector implementation to new "deno_runtime" crate located in "runtime/" directory. Details in "runtime/README.md". Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-12-12refactor(cli): more options on Worker (#8724)Bartek Iwańczuk
2020-12-11refactor(cli): decouple ops from ProgramState and Flags (#8659)Bartek Iwańczuk
This commit does major refactor of "Worker" and "WebWorker", in order to decouple them from "ProgramState" and "Flags". The main points of interest are "create_main_worker()" and "create_web_worker_callback()" functions which are responsible for creating "Worker" and "WebWorker" in CLI context. As a result it is now possible to factor out common "runtime" functionality into a separate crate.
2020-12-07refactor(cli): Simplify choosing type lib in CliModuleLoader (#8637)Bartek Iwańczuk
2020-12-07refactor(cli): Reorganize worker code, use stronger memory ordering (#8638)Bartek Iwańczuk
2020-12-01fix(compile): disable source mapping of errors (#8581)Bartek Iwańczuk
This commit disables source mapping of errors for standalone binaries. Since applying source maps relies on using file fetcher infrastructure it's not feasible to use it for standalone binaries that are not supposed to use that infrastructure.
2020-11-30feat: deno compile (#8539)Luca Casonato
2020-11-26refactor(cli): reorganize main.rs and split workers (#8495)Bartek Iwańczuk
Factored out "init_v8_flags", "init_logger" and "get_subcommand" from "main" function. Also "Worker" was removed in favor of moving logic to "MainWorker" and "WebWorker" respectively.
2020-11-21refactor(corr): accept get_error_class_fn in RuntimeOptions (#8444)Bartek Iwańczuk
This commit adds "get_error_class_fn" field to "RuntimeOptions" struct in order to unify configuration of "JsRuntime".
2020-11-19refactor(cli): rename fmt_errors::JsError to PrettyJsError (#8435)Bartek Iwańczuk
This commit renames "fmt_errors::JsError" to "PrettyJsError" to avoid confusion with "deno_core::JsError". Consequently "CoreJsError" aliases to "deno_core::JsError" were removed. Additionally source mapping step has been removed from "PrettyJsError::create" to better separate domains.
2020-11-13refactor: deno_crypto op crate (#7956)Divy Srivastava
This commit factors out "deno_crypto" op crate. "rand" crate dependency was consequently moved to "deno_crypto" crate and reexported.
2020-11-02refactor(cli): remove ProgramState::permissions (#8228)Bartek Iwańczuk
This commit removes ProgramState::permissions field. Having permissions parsed from CLI flags stored on globally accessible state object made it easy to mistakenly use these permissions in situations which required "runtime" permissions.
2020-10-23refactor(cli): migrate run and cache to new infrastructure (#7996)Kitson Kelly
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-20fix(cli/worker): Print error stacks from the origin Worker (#7987)Nayeem Rahman
Fixes #4728
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(core): JsRuntime is not a Future (#7855)Bartek Iwańczuk
This commit rewrites deno_core::JsRuntime to not implement Future trait. Instead there are two separate methods: - JsRuntime::poll_event_loop() - does single tick of event loop - JsRuntime::run_event_loop() - runs event loop to completion
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-07refactor(core): JsRuntime doesn't defer to OwnedIsolate (#7853)Bartek Iwańczuk
Remove Deref and DeferMut implementations for JsRuntime.
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-28fix(cli/test): do not start inspector server when collecting coverage (#7718)Casper Beyer
2020-09-28refactor: move op state registration to workers (#7696)Bartek Iwańczuk
2020-09-26refactor: combine MainWorker::new and MainWorker::create (#7693)Bartek Iwańczuk
* combine MainWorker::new and MainWorker::create * remove compiler_starts fields * make op_state types explicit for readability
2020-09-25refactor(cli/inspector): make server optional (#7656)Casper Beyer
This makes inspector registration with the server with optional and explicit to allow for inspectors to exist without spinning up the server. As a side effect of the server being explicitly passed around it also makes it possible to bind multiple servers.
2020-09-21refactor: use futures and serde_json from deno_core (#7614)Bartek Iwańczuk
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-17refactor: Move URL to op_crates/web (#7544)Bartek Iwańczuk