summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
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>
2020-12-05docs(core): Fix typo in load_module's docstring (#8564)Paco
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-27fix(cli): make output of deno info --json deterministic (#8483)William Perron
Fixes #8458
2020-11-27feat(core): Add FsModuleLoader that supports loading from filesystem (#8523)Yusuke Tanaka
This commit adds `FsModuleLoader` to `deno_core`, which implements `ModuleLoader` trait. It is used when creating a runtime that supports module loading from filesystem. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-11-28chore: clippy future cleanups (#8514)Kitson Kelly
2020-11-27fix: panic in worker when closing at top level (#8510)Bartek Iwańczuk
Fixes panic occurring in worker when "self.close()" is called at the top level, ie. worker shuts down while module evaluation promise hasn't yet resolved.
2020-11-25core: implement 'AsyncRefCell' and 'ResourceTable2' (#8273)Bert Belder
2020-11-23v1.5.4Bartek Iwańczuk
2020-11-22feat(unstable): Add deno test --no-run (#8093)Nayeem Rahman
This commit adds new flag to "deno test" subcommand called "--no-run" that allows to preload, cache an type check.
2020-11-21refactor(core): don't depend on get_identity_hash for modules (#8354)Bartek Iwańczuk
This commit refactors "deno_core::Modules" structure to not depend on "get_identity_hash" function to identify modules, but instead use default hash implementation.
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-21upgrade: rusty_v8 0.13.0, v8 8.8.278.2 (#8446)Bartek Iwańczuk
2020-11-21refactor(core): Improve code readability in core.js (#8345)De Rouck Antoine
2020-11-16v1.5.3Bartek Iwańczuk
2020-11-13refactor(cli+core): various cleanups in Rust (#8336)KNnut
2020-11-11refactor(core): don't depend on get_identity_hash for promises (#8352)Bartek Iwańczuk
This commit changes how pending promise exceptions are stored in JsRuntime by using global handle to promise instead of its identity hash.
2020-11-09v1.5.2 (#8301)Kitson Kelly
2020-11-06docs(core): document several concepts around JsRuntime and ops (#7897)Jan Haller
2020-11-03build: migrate to dlint (#8176)Bartek Iwańczuk
This commit migrates repository from using "eslint" to "dlint" for linting JavaScript code.
2020-11-03fix(prompt): fix display of non-ASCII characters on Windows (#8199)Yoshiya Hinosawa
2020-10-31fix(core/error): Remove extra newline from JsError::fmt() (#8145)Nayeem Rahman
2020-10-31v1.5.1Luca Casonato
2020-10-27v1.5.0Bartek Iwańczuk
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-26fix(core/runtime): Indicate exceptions in promises (#8124)Nayeem Rahman
Fixes #4879