summaryrefslogtreecommitdiff
path: root/runtime/js
AgeCommit message (Collapse)Author
2021-10-12chore: upgrade crates based on deno ast 0.3 (#12403)David Sherret
2021-10-11fix(runtime): Declare `Window.self` and `DedicatedWorkerGlobalScope.name` ↵Andreu Botella
with `util.writable()` (#12378) `Window`'s `self` property and `DedicatedWorkerGlobalScope`'s `name` property are defined as Web IDL read-only attributes with the `[Replaceable]` extended attribute, meaning that their setter will redefine the property as a data property with the set value, rather than changing some internal state. Deno currently defines them as read-only data properties instead. Given that Web IDL requires all attributes to be accessor properties rather than data properties, but Deno exposes almost all of those properties as either read-only or writable data properties, it makes sense to expose `[Replaceable]` properties as writable as well – as is already the case with `WindowOrWorkerGlobalScope`'s `performance` property.
2021-10-11feat: provide ops details for ops sanitizer failures (#12188)Casper Beyer
2021-10-11feat(unstable/test): imperative test steps API (#12190)David Sherret
2021-10-10refactor(metrics): move to core (#12386)Aaron O'Mullan
Avoids overhead of wrapping ops (and allocs when inspecting async-op futures)
2021-10-10feat: Stabilize Deno.kill and Deno.Process.kill (#12375)Ryan Dahl
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-10-10feat: stabilize Deno.resolveDns (#12368)Satya Rohith
2021-10-08refactor: deduplicate `defineEventHandler` util (#12367)Andreu Botella
2021-10-07fix(runtime): Getting `navigator.hardwareConcurrency` on workers shouldn't ↵Andreu Botella
throw (#12354)
2021-10-05chore: various op cleanup (#12329)Leo K
2021-10-01fix(runtime/js/workers): throw errors instead of using an op (#12249)Nayeem Rahman
2021-09-30fix(runtime/testing): format aggregate errors (#12183)Casper Beyer
2021-09-30fix: worker environment permissions should accept an array (#12250)David Sherret
2021-09-29feat: stabilize URLPattern API (#12256)Luca Casonato
2021-09-25cleanup(runtime): flatten op_kill's args (#12214)Aaron O'Mullan
2021-09-25fix(ext/webidl): correctly apply [SymbolToStringTag] to interfaces (#11851)李瑞丰
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2021-09-18fix(cli/fmt_errors): Abbreviate long data URLs in stack traces (#12127)Nayeem Rahman
Co-authored-by: Mike White <mike.white@auctane.com>
2021-09-16perf(runtime/fs): optimize readFile by using a single large buffer (#12057)Aaron O'Mullan
* perf(runtime/fs): optimize readFile by using a single large buffer * handle extended/truncated files during read Allocate an extra byte in our read buffer to detect "overflow" then fallback to unsized readAll for remainder of extended file, this is a slowpath that should rarely happen in practice
2021-09-16fix(ext/crypto): use DataError in importKey() (#12071)Divy Srivastava
2021-09-13feat(unstable): allow specifing gid and uid for subprocess (#11586)Leo K
2021-09-13feat: stabilise Deno.upgradeWebSocket (#12024)Bartek Iwańczuk
2021-09-12refactor(runtime): Use `util.nonEnumerable` to define `console` (#11982)Andreu Botella
A comment in `runtime.js` reads that `console` seems to be "the only one that should be writable and non-enumerable", which explains why it is declared with `util.writable` but then has its property descriptor's `enumerable` key changed to false. But it is not in fact true that `console` is the only global property for which this holds, and it wasn't even when this behavior was introduced in denoland#9013. All WebIDL interfaces are also writable and non-enumerable – the only difference here being that `console` is a namespace rather than an interface. Since WebIDL interfaces are defined with `util.nonEnumerable`, and `console` uses the same descriptor keys, this PR changes the definition of `console` to use `util.nonEnumerable` as well.
2021-09-08feat: add URLPattern API (#11941)Luca Casonato
This adds support for the URLPattern API. The API is added in --unstable only, as it has not yet shipped in any browser. It is targeted for shipping in Chrome 95. Spec: https://wicg.github.io/urlpattern/ Co-authored-by: crowlKats < crowlkats@toaxl.com >
2021-09-07chore: add better error message for signal API on Windows (#11935)Bartek Iwańczuk
2021-09-06BREAKING(unstable): Remove Deno.Signals enum, Deno.signals.* (#11909)Ryan Dahl
2021-09-06Don't drop messages from workers that have already been closed (#11913)Andreu Botella
When `worker.terminate()` is called, the spec requires that the corresponding port message queue is emptied, so no messages can be received after the call, even if they were sent from the worker before it was terminated. The spec doesn't require this of `self.close()`, and since Deno uses different channels to send messages and to notify that the worker was closed, messages might still arrive after the worker is known to be closed, which are currently being dropped. This change fixes that. The fix involves two parts: one on the JS side and one on the Rust side. The JS side was using the `#terminated` flag to keep track of whether the worker is known to be closed, without distinguishing whether further messages should be dropped or not. This PR changes that flag to an enum `#state`, which can be one of `"RUNNING"`, `"CLOSED"` or `"TERMINATED"`. The Rust side was removing the `WorkerThread` struct from the workers table when a close control was received, regardless of whether there were any messages left to read, which made any subsequent calls to `op_host_recv_message` to return `Ok(None)`, as if there were no more mesasges. This change instead waits for both a close control and for the message channel's sender to be closed before the worker thread is removed from the table.
2021-09-05refactor(testing): use discrete report functions (#11917)Casper Beyer
2021-09-04refactor(testing): redirect console output via reporter (#11911)Casper Beyer
This feeds console output to the reporter and handles silencing there instead of in the JavaScript code.
2021-09-02feat(fmt): add basic JS doc formatting (#11902)David Sherret
2021-08-31feat(workers): Make the `Deno` namespace configurable and unfrozen (#11888)Andreu Botella
This is the worker counterpart of PR #11062.
2021-08-25feat: ArrayBuffer in structured clone transfer (#11840)Luca Casonato
2021-08-24feat(unstable): Add file locking APIs (#11746)Tilman Roeder
This commit adds following unstable APIs: - Deno.flock() - Deno.flockSync() - Deno.funlock() - Deno.funlockSync()
2021-08-20chore: upgrade dlint and run `prefer-primordials` rule (#11777)Yusuke Tanaka
2021-08-16feat(runtime): support classic workers for internal testing (#11338)Andreu Botella
This commit implements classic workers, but only when the `--enable-testing-features-do-not-use` flag is provided. This change is not user facing. Classic workers are used extensively in WPT tests. The classic workers do not support loading from disk, and do not support TypeScript. Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-10feat: add experimental WebSocketStream API (#10365)Leo K
This commit adds the experimental WebSocketStream API when using the --unstable flag. The explainer for the API can be found here: https://github.com/ricea/websocketstream-explainer
2021-08-09feat(extensions/web): add structuredClone function (#11572)Leo K
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-06feat: ffi to replace plugins (#11152)Elias Sjögreen
This commit removes implementation of "native plugins" and replaces it with FFI API. Effectively "Deno.openPlugin" API was replaced with "Deno.dlopen" API.
2021-08-06revert: allow URL for permissions (#11600)Bartek Iwańczuk
Revert changes to "net" permissions in regards to handling URLs introduced in 15b0e61de.
2021-08-06feat: support AbortSignal in writeFile (#11568)Benjamin Gruenbaum
2021-08-06feat(runtime): allow URL for permissions (#11578)Leo K
2021-08-04feat(unstable): clean environmental variables for subprocess (#11571)Leo K
This commit adds "Deno.RunOptions.clearEnv" option, that allows to clear environmental variables from parent process before spawning a subprocess.
2021-08-02feat: stabilize Deno.serveHttp() (#11544)Bartek Iwańczuk
This commit moves "Deno.serveHttp()" and related types to stable namespace.
2021-07-29feat(runtime): implement navigator.hardwareConcurrency (#11448)Divy Srivastava
This commit implements "navigator.hardwareConcurrency" API, which supersedes "Deno.systemCpuInfo()" API (which was removed in this commit).
2021-07-26refactor: use `primordials` in runtime, extensions and core (#11500)Yusuke Tanaka
2021-07-23cleanup(runtime): remove last references to Deno.core.sharedQueue (#11503)Aaron O'Mullan
`Deno.core.sharedQueue` was killed in #9843
2021-07-14refactor(cli/tools/test_runner): split reporter into distinct stages (#11395)Casper Beyer
This splits up the reporter into smaller functions, one for each distinct event that happens during the testing process.
2021-07-14refactor(runtime): apply permissions as a hook during registration (#11347)Casper Beyer
2021-07-12refactor: deno_http op crate (#11335)Luca Casonato
2021-07-11Revert "Remove unstable native plugins (#10908)"Ryan Dahl
This reverts commit 7dd4090c2a3dc0222fd6ff611eeb2bd69cd28224.
2021-07-10fix: align DedicatedWorkerGlobalScope event handlers to spec (#11353)Andreu Botella