summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2021-02-13refactor(core): Strongly typed deserialization of JSON ops (#9423)Jared Beller
This PR makes json_op_sync/async generic to all Deserialize/Serialize types instead of the loosely-typed serde_json::Value. Since serde_json::Value implements Deserialize/Serialize, very little existing code needs to be updated, however as json_op_sync/async are now generic, type inference is broken in some cases (see cli/build.rs:146). I've found this reduces a good bit of boilerplate, as seen in the updated deno_core examples. This change may also reduce serialization and deserialization overhead as serde has a better idea of what types it is working with. I am currently working on benchmarks to confirm this and I will update this PR with my findings.
2021-02-12chore: release crates (#9481)Bartek Iwańczuk
2021-02-09chore: update dependencies (#9455)Luca Casonato
2021-02-09chore: add flag to v8 (#9456)Bartek Iwańczuk
2021-02-07chore: fix typo in lib.deno_core.d.ts (#9416)Ikko Ashimine
2021-02-05upgrade: rusty_v8 0.17.0, v8 9.0.123 (#9413)Bartek Iwańczuk
2021-02-05chore: release crates (#9410)Bartek Iwańczuk
2021-02-04chore: use strict mode for internal runtime, core, and op_crates js (#9391)Developing
2021-02-01chore: make all tests annotated with `#[cfg(test)]` (#9347)Yusuke Tanaka
2021-02-01feat(lsp): add references code lens (#9316)Kitson Kelly
2021-01-29chore: upgrade tokio to 1.1.1 (#9327)Yusuke Tanaka
2021-01-29v1.7.1Ryan Dahl
2021-01-28chore: add jsdoc to 26_fetch.js and enable some fetch tests (#9305)Luca Casonato
2021-01-26chore: update crates (#9251)Luca Casonato
Updates SWC, dprint, deno_lint, deno_doc, serde, and Tokio (to 1.1.0). Co-authored-by: Kitson Kelly <me@kitsonkelly.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-21fix(core): Handle prepareStackTrace() throws (#9211)Nayeem Rahman
Fixes #9206
2021-01-19v1.7.0Ryan Dahl
2021-01-19upgrade: rusty_v8 0.16.0, v8 8.9.255.3 (#9180)Ryan Dahl
2021-01-13release cratesRyan Dahl
2021-01-11upgrade: tokio 1.0 (#8779)Bartek Iwańczuk
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-01-11chore: Move comment to correct place (#9086)Ryan Dahl
2021-01-10update copyright to 2021 (#9081)Ryan Dahl
2021-01-07 ignore "use asm" (#9019)Anonymous
Preventing V8 from logging erroneous line numbers. Use wasm.
2021-01-05refactor(core): simplify Deno.core initialisation, remove stale TODO (#8847)Bartek Iwańczuk
This commit rewrites initialisation of the "shared queue" and in effect prevents from double execution of "core/core.js" and "core/error.js". Previously both of these files were executed every time a "JsRuntime" was created. That lead to a situation where one copy of each script was included in the snapshot and then another copy would be executed after loading the snapshot. Effectively "JsRuntime::shared_init" was removed; instead execution of those scripts and actual initialisation of shared queue was split into two helper functions: "JsRuntime::js_init" and "JsRuntime::share_queue_init". Additionally stale TODO comments were removed.
2021-01-05fix: align encoding APIs to spec using WPT (#9004)Luca Casonato
2021-01-02upgrade: Rust 1.49.0 (#8955)Bartek Iwańczuk
2020-12-30chore: release crates (#8931)Bartek Iwańczuk
2020-12-29fix(core): Fix incorrect index in Promise.all error reporting (#8913)Deepanshu Utkarsh
2020-12-28upgrade: rusty_v8 0.15.0, v8 8.8.294 (#8898)Bartek Iwańczuk
2020-12-26fix: fetch bad URL will not panic (#8884)Yosi Pramajaya
2020-12-22core: fix http_bench_json_ops, register Error (#8860)Ben Noordhuis
Fixes the following runtime error for me when benchmarking: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error: Unregistered error class: "Error" Connection reset by peer (os error 104) Classes of errors returned from ops should be registered via Deno.core.registerErrorClass(). at processResponse (deno:core/core.js:219:13) at Object.jsonOpAsync (deno:core/core.js:240:12) at async read (http_bench_json_ops.js:29:21) at async serve (http_bench_json_ops.js:45:19)', core/examples/http_bench_json_ops.rs:260:28
2020-12-22chore: release crates (#8854)Bartek Iwańczuk
2020-12-20Revert "fix: TLA in web worker (#8809)" (#8839)Bartek Iwańczuk
This reverts commit e924bbdf3606e83ff9eef3a8ed640c4ecc34444f.
2020-12-20fix: TLA in web worker (#8809)Bartek Iwańczuk
Implementors of `deno_core::JsRuntime` might want to do additional actions during each turn of event loop, eg. `deno_runtime::Worker` polls inspector, `deno_runtime::WebWorker` receives/dispatches messages from/to worker host. Previously `JsRuntime::mod_evaluate` was implemented in such fashion that it only polled `JsRuntime`'s event loop. This behavior turned out to be wrong in the example of `WebWorker` which couldn't receive/dispatch messages because its implementation of event loop was never called. This commit rewrites "mod_evaluate" to return a handle to receiver that resolves when module's promise resolves. It is now implementors responsibility to poll event loop after calling `mod_evaluate`.
2020-12-16refactor: rewrite ops to use ResourceTable2 (#8512)Bartek Iwańczuk
This commit migrates all ops to use new resource table and "AsyncRefCell". Old implementation of resource table was completely removed and all code referencing it was updated to use new system.
2020-12-15fix(cli): make dynamic import errors catchable (#8750)Kitson Kelly
Fixes #6259
2020-12-14chore: release crates (#8765)Bartek Iwańczuk
2020-12-14Revert "build: Factor out common code into core/build_util.rs (#8756)" (#8763)Bartek Iwańczuk
This reverts commit 502c77aad969fe8557aaf6d56432f94450c26a2a.
2020-12-14chore: release crates (#8760)Bartek Iwańczuk
2020-12-14build: Factor out common code into core/build_util.rs (#8756)Ryan Dahl
2020-12-13chore: release crates (#8744)Bartek Iwańczuk
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-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-11chore: fixed various misspellings and other typos (#8691)Anh Hong
2020-12-10refactor(core): stack trace mapping (#8660)Bartek Iwańczuk
This commit adds "Deno.core.createPrepareStackTrace". This function was moved from "cli/rt/40_error_stack.js" to unify handling of stack frames in core (before this PR there was implicit dependency on logic in "core/error.rs::JsError"). Unfortunately formatting logic must still be duplicated in "cli/error.js::PrettyJsError" to provide coloring, but currently there's no solution to this problem. "createPrepareStackTrace" can accept a single argument; a function that takes a location and provides source mapped location back.
2020-12-09build: fix doctests, run cargo publish --dry-run (#8689)Ryan Dahl
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-12-09core: add plumbing for canceling ops when closing a resource (#8661)Bert Belder
2020-12-09test(core): type aliases in OpState (#8653)Bartek Iwańczuk
This commit adds a test case to core/gotham_state.rs that shows that type aliases can't be used reliably. Instead wrapper types should be used.
2020-12-08chore: release crates (#8662)Bartek Iwańczuk
2020-12-08upgrade rusty_v8 to 0.14.0 (#8663)Ryan Dahl
2020-12-08refactor(core): change script name for core.js (#8650)Bartek Iwańczuk
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>