summaryrefslogtreecommitdiff
path: root/runtime/js
AgeCommit message (Collapse)Author
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.
2022-01-27refactor: update runtime code for primordial checks for "instanceof" (#13497)Bartek Iwańczuk
2022-01-25feat(test): better errors for resource sanitizer (#13296)Luca Casonato
This commit makes the errors produced from the resource sanitizer much more human readable. It does this by using real words rather than our "resource names" when referring to resources, and by giving helpful hints on how to clean up each of the resources.
2022-01-24feat(ext/web): add CompressionStream API (#11728)Leo Kettmeir
Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-01-24feat(unstable): add Deno.networkInterfaces (#13475)Yoshiya Hinosawa
2022-01-18feat: stabilize test steps API (#13400)David Sherret
2022-01-17fix(ext/console): don't depend on globalThis present (#13387)Bartek Iwańczuk
2022-01-12feat(ext/ffi): UnsafeFnPointer API (#13340)DjDeveloper
2022-01-09fix: expose "Deno.memoryUsage()" in worker context (#13293)Rodney van den Velden
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-12-16feat: support abort reasons in Deno APIs and `WebSocketStream` (#13066)Andreu Botella
2021-12-15feat(ext/ffi): implement UnsafePointer and UnsafePointerView (#12828)Elias Sjögreen
2021-12-10fix(test): Make the op sanitizer delay macrotask into a queue (#12966)Andreu Botella
Fixes #12945.
2021-12-09feat(ext/timers): add refTimer, unrefTimer API (#12953)Yoshiya Hinosawa
2021-11-30fix(test): Improve reliability of `deno test`'s op sanitizer with timers ↵Andreu Botella
(#12934) Although not easy to replicate in the wild, the `deno test` op sanitizer can fail when there are intervals that started before a test runs, since the op sanitizer can end up running in the time between the timer op for an interval's run resolves and the op for the next run starts. This change fixes that by adding a new macrotask callback that will run after the timer macrotask queue has drained. This ensures that there is a timer op if there are any timers which are unresolved by the time the op sanitizer runs.
2021-11-29Revert "fix(test): Improve reliability of `deno test`'s op sanitizer with ↵Bartek Iwańczuk
timers (#12908)" (#12929) This reverts commit d335343a79afbcfe719109af510fe7a1dd0df2e8.
2021-11-28fix(test): Improve reliability of `deno test`'s op sanitizer with timers ↵Andreu Botella
(#12908) Although not easy to replicate in the wild, the `deno test` op sanitizer can fail when there are intervals that started before a test runs, since the op sanitizer can end up running in the time between the timer op for an interval's run resolves and the op for the next run starts. This change fixes that by adding a new macrotask callback that will run after the timer macrotask queue has drained. This ensures that there is a timer op if there are any timers which are unresolved by the time the op sanitizer runs.
2021-11-28feat(runtime): add op_set_exit_code (#12911)Ben Noordhuis
Set the exit code to use if none is provided to Deno.exit(), or when Deno exits naturally. Needed for process.exitCode Node compat. Paves the way for #12888.
2021-11-25feat(core): Add ability to "ref" and "unref" pending ops (#12889)Bartek Iwańczuk
This commit adds an ability to "ref" or "unref" pending ops. Up to this point Deno had a notion of "async ops" and "unref async ops"; the former keep event loop alive, while the latter do not block event loop from finishing. It was not possible to change between op types after dispatching, one had to decide which type to use before dispatch. Instead of storing ops in two separate "FuturesUnordered" collections, now ops are stored in a single collection, with supplemental "HashSet" storing ids of promises that were "unrefed". Two APIs were added to "Deno.core": "Deno.core.refOp(promiseId)" which allows to mark promise id to be "refed" and keep event loop alive (the default behavior) "Deno.core.unrefOp(promiseId)" which allows to mark promise id as "unrefed" which won't block event loop from exiting
2021-11-23feat(test): Add more overloads for "Deno.test" (#12749)Bartek Iwańczuk
This commit adds 4 more overloads to "Deno.test()" API. ``` // Deno.test(function testName() { }); export function test(fn: (t: TestContext) => void | Promise<void>): void; // Deno.test("test name", { only: true }, function() { }); export function test( name: string, options: Omit<TestDefinition, "name">, fn: (t: TestContext) => void | Promise<void>, ): void; // Deno.test({ name: "test name" }, function() { }); export function test( options: Omit<TestDefinition, "fn">, fn: (t: TestContext) => void | Promise<void>, ): void; // Deno.test({ only: true }, function testName() { }); export function test( options: Omit<TestDefinition, "fn" | "name">, fn: (t: TestContext) => void | Promise<void>, ): void; ```
2021-11-22fix(runtime): support reading /proc using readFile (#12839)Luca Casonato
2021-11-20fix(test): do not throw on error.errors.map (#12810)Yacine Hmito
In tests, the function to format errors would assume that any error with a property `errors` would be an `AggregateError`, and therefore the property `errors` would contain an error. This is not necessarily the case.
2021-11-09feat(core): streams (#12596)Aaron O'Mullan
This allows resources to be "streams" by implementing read/write/shutdown. These streams are implicit since their nature (read/write/duplex) isn't known until called, but we could easily add another method to explicitly tag resources as streams. `op_read/op_write/op_shutdown` are now builtin ops provided by `deno_core` Note: this current implementation is simple & straightforward but it results in an additional alloc per read/write call Closes #12556
2021-11-03feat(ext/web): BYOB support for ReadableStream (#12616)Leo Kettmeir
This commit introduces support for BYOB readers in the WHATWG Streams API implementation.
2021-10-29feat: stabilize Deno.startTls (#12581)Luca Casonato
This commit stabilizes `Deno.startTls` and removes `certFile` from the `StartTlsOptions`.
2021-10-26feat(runtime): add Deno.addSignalListener API (#12512)Yoshiya Hinosawa
2021-10-13fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297)Nayeem Rahman
2021-10-13chore: fix flaky steps_invalid_usage tests (#12422)David Sherret
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