summaryrefslogtreecommitdiff
path: root/runtime/js
AgeCommit message (Collapse)Author
2022-06-20feat(ext/ffi): Callbacks (#14663)Aapo Alasuutari
This commit adds support for unstable FFI callbacks. A callback is registered using the `Deno.UnsafeCallback` API. The backing memory for the callback can be disposed of using `Deno.UnsafeCallback#close`. It is not safe to pass the callback after calling close. Callbacks from other than the isolate thread are not supported. Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-06-15chore(cli/cache): Remove CacheType::Declaration (#14873)Nayeem Rahman
2022-06-15BREAKING: remove `Intl.v8BreakIterator` (#14864)Luca Casonato
This is a non-standard API that is mostly replaced by `Intl.Segmenter`.
2022-06-13Deno.exit() is an alias to self.close() in worker contexts (#14826)Bartek Iwańczuk
This commit changes Deno.exit() to be an alias to self.close() in worker contexts, and the provided exit code becomes is ignored.
2022-06-13Remove unstable Deno.sleepSync (#14719)Ryan Dahl
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-07refactor(core): Move Deno.core bindings to ops (#14793)Nayeem Rahman
2022-06-06fix: Format non-error exceptions (#14604)Nayeem Rahman
This commit adds "Deno.core.setFormatExceptionCallback" which can be used to provide custom formatting for errors. It is useful in cases when user throws something that is non-Error (eg. a string, plain object, etc).
2022-05-31feat(unstable): add Deno.getGid (#14528)James Bradlee
2022-05-30refactor(bench): Allocate IDs for benches (#14757)Nayeem Rahman
2022-05-20fix: prevent Deno.exit to fail when dispatchEvent tampered (#14665)Yoshiya Hinosawa
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-05-19fix(runtime): improve permission descriptor validation (#14676)Colin Ihrig
This commit improves the permission descriptor validation by explicitly checking for object types and using optional chaining when creating error messages in case the descriptor is not an object. Fixes: https://github.com/denoland/deno/issues/14675
2022-05-19feat: make Child.kill argument optional (#14669)Leo Kettmeir
2022-05-18refactor: use spawn API across codebase (#14414)Leo Kettmeir
2022-05-17BREAKING(unstable): Enable Deno namespace in workers by default (#14581)Nayeem Rahman
This commit removes "WorkerOptions.deno" option as a boolean, as well as "WorkerOptions.deno.namespace" settings. Starting with this commit all workers have access to "Deno" namespace by default.
2022-05-17BREAKING: Remove unstable Deno.emit and Deno.formatDiagnostics APIs (#14463)Bartek Iwańczuk
2022-05-14feat: add userAgent property to Navigator's prototype (#14415)randomicon00
2022-05-11feat(runtime/spawn): add `AbortSignal` support (#14538)Leo Kettmeir
2022-05-06feat(web): add `performance.timeOrigin` (#14489)Geert-Jan Zwiers
Add support for the `performance.timeOrigin` web API. Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
2022-05-05feat(test): Show Deno.test() call locations for failures (#14484)Nayeem Rahman
2022-05-03refactor: add core.formatLocationFilename, remove op_format_filename (#14474)Bartek Iwańczuk
This commit moves "op_format_location" to "core/ops_builtin.rs" and removes "Deno.core.createPrepareStackTrace" in favor of "Deno.core.prepareStackTrace". Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-03BREAKING: Remove unstable Deno.applySourceMap API (#14473)Bartek Iwańczuk
2022-04-27perf(runtime): read entire files in single ops (#14261)Aaron O'Mullan
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-04-27refactor: Remove PrettyJsError and js_error_create_fn (#14378)Nayeem Rahman
This commit: - removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn - removes "deno_core::JsError::create" and "deno_core::RuntimeOptions::js_error_create_fn" - adds new option to "deno_runtime::ops::worker_host::init"
2022-04-26refactor(ops/process): add `StdioOrRid` enum (#14393)David Sherret
2022-04-24fix(runtime/js/spawn): Pass stdio options for spawn() and spawnSync() (#14358)Nayeem Rahman
2022-04-23fix(bench): eliminate sanitizeExit overhead (#14361)evan
2022-04-22Reland "perf(http): optimize ReadableStreams backed by a resource" (#14346)Divy Srivastava
2022-04-21Revert various PRs related to "ext/http" (#14339)Bartek Iwańczuk
* Revert "feat(ext/http): stream auto resp body compression (#14325)" * Revert "core: introduce `resource.read_return` (#14331)" * Revert "perf(http): optimize `ReadableStream`s backed by a resource (#14284)"
2022-04-21feat(runtime): two-tier subprocess API (#11618)Leo Kettmeir
2022-04-20feat(bench): update API, new console reporter (#14305)evan
This commit changes "deno bench" subcommand, by updating the "Deno.bench" API as follows: - remove "Deno.BenchDefinition.n" - remove "Deno.BenchDefintion.warmup" - add "Deno.BenchDefinition.group" - add "Deno.BenchDefintion.baseline" This is done because bench cases are no longer run fixed amount of iterations, but instead they are run until there is difference between subsequent runs that is statistically insiginificant. Additionally, console reporter was rewritten completely, to looks similar to "hyperfine" reporter.
2022-04-20perf(http): optimize `ReadableStream`s backed by a resource (#14284)Divy Srivastava
2022-04-19perf(runtime): bypass tokio file and bump op buffer size to 64K (#14319)Divy Srivastava
2022-04-18perf: move Deno.writeTextFile and like functions to Rust (#14221)David Sherret
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-04-16feat(test): use structured data for JavaScript errors in tests (#14287)Bartek Iwańczuk
This commit rewrites test runner to send structured error data from JavaScript to Rust instead of passing strings. This will allow to customize display of errors in test report (which will be addressed in follow up commits).
2022-04-16refactor: update runtime code for primordial check x in y (#13642)Bartek Iwańczuk
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-04-15refactor: Move source map lookups to core (#14274)Nayeem Rahman
The following transformations gradually faced by "JsError" have all been moved up front to "JsError::from_v8_exception()": - finding the first non-"deno:" source line; - moving "JsError::script_resource_name" etc. into the first error stack in case of syntax errors; - source mapping "JsError::script_resource_name" etc. when wrapping the error even though the frame locations are source mapped earlier; - removing "JsError::{script_resource_name,line_number,start_column,end_column}" entirely in favour of "js_error.frames.get(0)". We also no longer pass a js-side callback to "core/02_error.js" from cli. I avoided doing this on previous occasions because the source map lookups were in an awkward place.
2022-04-15feat(test): format user code output (#14271)Bartek Iwańczuk
This commit changes "deno test" to better denote user output coming from test cases. This is done by printing "---- output ----" and "---- output end ----" markers if an output is produced. The output from "console" and "Deno.core.print" is captured, as well as direct writes to "Deno.stdout" and "Deno.stderr". To achieve that new APIs were added to "deno_core" crate, that allow to replace an existing resource with a different one (while keeping resource ids intact). Resources for stdout and stderr are replaced by pipes. Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-13fix(test): Don't error on missing op details (#14184)AEtheve
2022-04-13feat(ext/web): Add error events for event listener and timer errors (#14159)Nayeem Rahman
- feat: Add handleable error event for even listener errors - feat: Add handleable error event for setTimeout()/setInterval() errors - feat: Add Deno.core.destructureError() - feat: Add Deno.core.terminate() - fix: Don't throw listener errors from dispatchEvent() - fix: Use biased mode when selecting between mod_evaluate() and run_event_loop() results
2022-04-06feat(test): Add "name", "origin" and "parent" to "Deno.TestContext" (#14007)Yongwook Choi
This commit adds following fields to "Deno.TestContext" interface: - name - origin - parent These are prerequisites for supporting snapshot functionality in "std/testing".
2022-03-30feat(lsp): add experimental testing API (#13798)Kitson Kelly
Ref: denoland/vscode_deno#629
2022-03-25fix: `Deno.run` - do not modify user provided `cmd` array (#14109)David Sherret
2022-03-23fix(bench): require --unstable flag in JavaScript (#14091)Bartek Iwańczuk
2022-03-23feat(unstable): add ref/unref to Listener (#13961)Yoshiya Hinosawa
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-23fix(test): don't error on missing op details (#14074)Bartek Iwańczuk
2022-03-19refactor: cleanup assert() & AssertionError definitions (#13859)Leo Kettmeir
2022-03-16feat(unstable): Add Deno.upgradeHttp API (#13618)Bert Belder
This commit adds "Deno.upgradeHttp" API, which allows to "hijack" connection and switch protocols, to eg. implement WebSocket required for Node compat. Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-11feat: "deno bench" subcommand (#13713)Bartek Iwańczuk
This commit adds "deno bench" subcommand and "Deno.bench()" API that allows to register bench cases. The API is modelled after "Deno.test()" and "deno test" subcommand. Currently the output is rudimentary and bench cases and not subject to "ops" and "resource" sanitizers. Co-authored-by: evan <github@evan.lol>
2022-03-01fix(runtime): disable console color for non tty stdout (#13782)Antonio Musolino
2022-02-25feat: deno test --trace-ops (#13770)Bartek Iwańczuk
This commit adds "--trace-ops" flag to "deno test" subcommand. This flag enables saving of stack traces for async ops, that before were always saved. While the feature proved to be very useful it comes with a significant performance hit, it's caused by excessive source mapping of stack frames.