Age | Commit message (Collapse) | Author |
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(#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.
|
|
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.
|
|
This takes the existing `fmt_error` module from cli and puts it as a
public module into `deno_runtime`.
|
|
|
|
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
|
|
(#15459)
|
|
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>
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
This commit adds "get_error_class_fn" field to "RuntimeOptions"
struct in order to unify configuration of "JsRuntime".
|
|
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.
|
|
This commit factors out "deno_crypto" op crate.
"rand" crate dependency was consequently moved to
"deno_crypto" crate and reexported.
|
|
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.
|
|
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
|
|
Fixes #4728
|
|
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.
|
|
|
|
|
|
|
|
* 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.
|
|
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.
|
|
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
|
|
This commit renames occurrences of "isolate" variable name
to "js_runtime". This was outstanding debt after renaming
deno_core::CoreIsolate to JsRuntime.
|
|
Remove Deref and DeferMut implementations for JsRuntime.
|
|
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.
|
|
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.
|
|
|
|
|
|
* combine MainWorker::new and MainWorker::create
* remove compiler_starts fields
* make op_state types explicit for readability
|
|
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.
|
|
|
|
- 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"
|
|
- move rng to OpState
- move GlobalTimer to OpState
- move Metrics to OpState
|
|
|