summaryrefslogtreecommitdiff
path: root/runtime/js
AgeCommit message (Collapse)Author
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.
2022-02-25feat(cli): support data url (#13667)Simon Lecoq
Closes #11141
2022-02-16feat(test): improved op sanitizer errors + traces (#13676)Luca Casonato
This commit improves the error messages for the `deno test` async op sanitizer. It does this in two ways: - it uses handwritten error messages for each op that could be leaking - it includes traces showing where each op was started This "async op tracing" functionality is a new feature in deno_core. It likely has a significant performance impact, which is why it is only enabled in tests.
2022-02-15feat: Add Deno.FsFile, deprecate Deno.File (#13660)Bartek Iwańczuk
2022-02-15feat(runtime): web streams in fs & net APIs (#13615)Luca Casonato
This commit adds `readable` and `writable` properties to `Deno.File` and `Deno.Conn`. This makes it very simple to use files and network sockets with fetch or the native HTTP server.
2022-02-11compat: support --compat in web workers (#13629)Bartek Iwańczuk
Adds another callback to WebWorkerOptions that allows to execute some modules before actual worker code executes. This allows to set up Node global using std/node.
2022-02-07refactor: update runtime code for primordial check for iterators (#13510)Bartek Iwańczuk
2022-02-01refactor: primordials for instanceof (#13527)Bartek Iwańczuk
2022-01-31feat(unstable): add Deno.getUid (#13496)Yoshiya Hinosawa
2022-01-31feat(runtime): stabilize addSignalListener API (#13438)Yoshiya Hinosawa
2022-01-27Revert "refactor: update runtime code for primordial checks for "instanceof" ↵Bartek Iwańczuk
(#13497)" (#13511) This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.