0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

286 commits

Author SHA1 Message Date
Marcos Casagrande
927f4e2e83
fix(ext/fetch): Body#bodyUsed for static body (#16080)
This fixes a bug where `Body#bodyUsed` incorrectly returns `false`
for a body that has actually already been consumed, after `Body#body`
is called.
2022-09-29 17:38:04 +02:00
denobot
d8827514ff
1.26.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-29 00:10:44 +02:00
David Sherret
1b04ff0782
chore: forward v1.25.4 release commit to main (#16001) 2022-09-22 15:58:43 -04:00
Aapo Alasuutari
707e9e3580
feat(ops): Automatic fast ops creation (#15527) 2022-09-22 10:05:24 +05:30
Divy Srivastava
5fe660ecd7
perf(web): optimize encodeInto() (#15922) 2022-09-17 16:48:15 +05:30
Ryan Dahl
684841a18c
upgrade deps (#15914) 2022-09-16 19:11:30 -04:00
Colin Ihrig
ee208c1b20
chore: forward v1.25.3 release commit to main (#15919)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-09-15 16:24:06 -04:00
denobot
3bce2af0eb
chore: forward v1.25.2 release commit to main (#15831)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-09-09 20:31:43 +09:00
Divy Srivastava
027d4d433d
perf(ops): inline &[u8] arguments and enable fast API (#15731) 2022-09-07 16:21:47 +05:30
Divy Srivastava
d2a408f452
perf(runtime): short-circuit queue_async_op for Poll::Ready (#15773) 2022-09-06 23:08:37 +05:30
Garcia
4ec213b0aa
fix(ext/timers): create primordial eval (#15110) 2022-09-02 17:55:44 +02:00
Nayeem Rahman
a74b2ecf37
fix(repl): don't terminate on unhandled error events (#15548) 2022-09-02 12:43:39 +02:00
denobot
658d2cdff2
chore: forward v1.25.1 release commit to main (#15735)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-09-02 07:42:47 +02:00
Divy Srivastava
0abf5a412b
perf(ext/web): flatten op arguments for text_encoding (#15723) 2022-09-01 16:21:13 +05:30
Leo Kettmeir
f3a0e48d4e
fix(docs): add missing categories (#15684) 2022-08-30 13:16:56 +02:00
Divy Srivastava
d8396225c4
perf: use fast api for op_now (#15643) 2022-08-28 12:21:49 +05:30
Bartek Iwańczuk
8986e2ced4
v1.25.0 2022-08-25 00:20:07 +02:00
Divy Srivastava
9e576dff7c
perf(runtime): optimize Deno.file open & stream (#15496) 2022-08-19 15:54:40 +05:30
Divy Srivastava
cd21cff299
feat(ext/flash): An optimized http/1.1 server (#15405)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-18 17:35:02 +05:30
Kitson Kelly
a2ab5eee01
docs: add category tag for built-in APIs (#15480) 2022-08-17 13:12:24 +10:00
Ryan Dahl
0b70c81f97
perf: improve performance.now (#15481) 2022-08-16 21:00:16 +05:30
denobot
e4a5f9952f
chore: forward v1.24.3 release commit to main (#15462)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11 16:47:03 -04:00
Aapo Alasuutari
2164f6b1eb
perf(ops): Monomorphic sync op calls (#15337)
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params).

Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple:

```
opSync("op_foo", param1, param2);
// -> turns to
ops.op_foo(param1, param2);
```

This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path.

Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11 15:56:56 +02:00
denobot
cf33720a85
chore: forward v1.24.2 release commit to main (#15410) 2022-08-05 00:10:47 +02:00
Colin Ihrig
088bc52db0
Forward 1.24.1 to main (#15333) (#15336)
1.24.1 (#15333)

Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-29 08:44:46 -04:00
Aapo Alasuutari
b4b4e5980b
chore(ops): Remove unused arguments from ops (#15315) 2022-07-26 19:34:08 +02:00
Divy Srivastava
4db650ddd5
Revert "feat(ops): V8 Fast Calls (#15122)" (#15276)
This reverts commit 03dc3b8972.
2022-07-22 19:06:32 +05:30
Divy Srivastava
03dc3b8972
feat(ops): V8 Fast Calls (#15122)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-22 17:54:22 +05:30
denobot
f0e01682cc
1.24.0 (#15262)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-21 01:28:00 +02:00
Bartek Iwańczuk
d53936eb7d
Reland "feat: add "unhandledrejection" event support" (#15211) 2022-07-20 20:28:19 +02:00
Phosra
b8e1250500
fix(ext/web): align DOMException better with spec (#15097) 2022-07-20 10:12:18 +02:00
Leo Kettmeir
2bebdc9116
feat(unstable): Ability to ref/unref "Child" in "Deno.spawnChild()" API (#15151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-18 22:24:35 +02:00
Bartek Iwańczuk
f9b692e68e
Revert "feat: add "unhandledrejection" event support (#12994) (#15080)" (#15210)
This reverts commit 1a7259b04b.
2022-07-15 01:06:20 +02:00
Bartek Iwańczuk
1a7259b04b
feat: add "unhandledrejection" event support (#12994) (#15080)
Relanding #12994 

This commit adds support for "unhandledrejection" event.

This event will trigger event listeners registered using:

"globalThis.addEventListener("unhandledrejection")
"globalThis.onunhandledrejection"
This is done by registering a default handler using
"Deno.core.setPromiseRejectCallback" that allows to
handle rejected promises in JavaScript instead of Rust.

This commit will make it possible to polyfill
"process.on("unhandledRejection")" in the Node compat
layer.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-14 22:39:20 +02:00
Colin Ihrig
7610764980
chore: forward v1.23.4 release commit to main (#15172)
1.23.4 (#15168)

Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-12 17:08:36 -04:00
Andreu Botella
018ad9b3a4
chore(web, worker): Use DetachedBuffer for postMessage ops (#15133)
This commit uses `DetachedBuffer` instead of `ZeroCopyBuf` in the ops
that back `Worker.prototype.postMessage` and
`MessagePort.prototype.postMessage`. This is done because the
serialized buffer is then copied to the destination isolate, even
though it is internal to runtime code and not used for anything else,
so detaching it and transferring it instead saves an unnecessary copy.
2022-07-11 17:27:33 +02:00
denobot
ef312e0050 1.23.3 (#15081)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-07-05 14:24:40 -04:00
Bartek Iwańczuk
06934db883
Revert "feat: add "unhandledrejection" event support (#12994)" (#15075)
This reverts commit f7af0b01a5.
2022-07-04 23:34:39 +02:00
Bartek Iwańczuk
f7af0b01a5
feat: add "unhandledrejection" event support (#12994)
This commit adds support for "unhandledrejection" event.

This event will trigger event listeners registered using:

"globalThis.addEventListener("unhandledrejection")
"globalThis.onunhandledrejection"
This is done by registering a default handler using
"Deno.core.setPromiseRejectCallback" that allows to
handle rejected promises in JavaScript instead of Rust.

This commit will make it possible to polyfill
"process.on("unhandledRejection")" in the Node compat
layer.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-04 21:14:58 +02:00
David Sherret
3d8ba30ea0
chore: forward 1.23.2 to main (#15027)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-30 18:01:08 -04:00
Divy Srivastava
4e92f38d2c
perf(ext/web): avoid reallocations in op_base64_atob (#15018) 2022-06-30 14:18:06 +05:30
Nugine
1328a56230
perf(ext/web): use base64-simd for atob/btoa (#14992) 2022-06-29 21:12:39 +05:30
Mark Ladyshau
6743b3227b
fix(ext/web): remove ErrorEventInit's error default (#14809) 2022-06-29 14:29:08 +02:00
Kayla Washburn
215f3d4c8e
v1.23.1 (#14954)
1.23.1 (#14952)

Co-authored-by: aslilac <aslilac@users.noreply.github.com>
Co-authored-by: Kayla Washburn <mckayla@hey.com>

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: aslilac <aslilac@users.noreply.github.com>
2022-06-23 15:27:41 -06:00
Colin Ihrig
367e006e06
fix(ext/web): add EventTarget brand checking (#14637)
This commit adds brand checking to EventTarget. It also fixes a
bug where deno would crash if an abort signal was aborted on the
global addEventListener().
2022-06-17 11:05:02 -04:00
Luca Casonato
870d200716
fix(ext/web): handle rid=0 in TextDecoder#decode (#14894) 2022-06-17 12:49:57 +02:00
cjihrig
95312ab53a fix: make Performance global an EventTarget
This commit updates the Performance global to extend
EventTarget.
2022-06-16 12:05:33 -04:00
denobot
e7ea4edc8a
1.23.0 (#14878)
* 1.23.0

* docs(Releases.md): update a few items for 1.23

* docs(Releases.md): revert bad formatting

Co-authored-by: aslilac <aslilac@users.noreply.github.com>
Co-authored-by: McKayla Washburn <mckayla@hey.com>
2022-06-15 17:02:18 -06:00
Kayla Washburn
e1d488ab88
feature(web): enable deflate-raw compression format (#14863) 2022-06-14 10:10:28 -06:00
Ryan Dahl
21dfeea3c4
Remove unstable Deno.sleepSync (#14719)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-13 21:28:00 +02:00
Colin Ihrig
cf866c5ad3
chore: Forward v1.22.3 to main (#14835)
* 1.22.3 (#14832)
* chore: pin swc versions to fix cargo publish

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-09 16:57:16 -04:00
Nayeem Rahman
9385a91312
refactor(core): Move Deno.core bindings to ops (#14793) 2022-06-07 11:25:10 +02:00
Bartek Iwańczuk
de562b0215
chore: Forward v1.22.2 to main (#14785) 2022-06-02 22:29:41 +02:00
Kitson Kelly
7eee521199
feat: update to TypeScript 4.7 (#14242) 2022-06-01 10:19:18 +10:00
Kitson Kelly
1c44f4060e
1.22.1
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2022-05-27 17:36:43 +10:00
Mark Ladyshau
402b497299
fix(core): rethrow exception during structured cloning serialization (#14671)
- Introduced optional callback for Deno.core.serialize API, that returns
cloning error if there is one.
- Removed try/catch in seralize structured clone function and throw error from
callback.
- Removed "Object with a getter that throws" assertion from WPT.
2022-05-26 17:14:38 +02:00
David Sherret
b4fabedd79
fix(fmt): prevent infinite loop when formatting certain binary expressions (#14725) 2022-05-25 19:55:31 -04:00
denobot
5ad8919d64
1.22.0 (#14657)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-05-18 20:35:16 +05:30
Bartek Iwańczuk
b2ba0c54af
chore: fix failing bench (#14644) 2022-05-17 16:28:03 +02:00
randomicon00
e58f77e431
perf(ext/web): Add fast path for non-streaming TextDecoder (#14217)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-05-17 19:22:48 +05:30
Colin Ihrig
1fa75f75c9
fix(ext/web): throw if listener and signal are null (#14601)
This commit fixes a failing WPT test by making EventTarget's
addEventListener() method throw if both the listener and the
signal option are null.

Fixes: https://github.com/denoland/deno/issues/14593
2022-05-16 10:46:39 -04:00
Aaron O'Mullan
f5c31b56e3
Revert "core: don't include_str extension js code (#10786)" (#14614)
This reverts commit 10e50a1207

Alternative to #13217, IMO the tradeoffs made by #10786 aren't worth it.

It breaks abstractions (crates being self-contained, deno_core without snapshotting etc...) and causes pain points / gotchas for both embedders & devs for a relatively minimal gain in incremental build time ...

Closes #11030
2022-05-15 13:27:56 +02:00
Geert-Jan Zwiers
0568be863b
feat(ext/web): add performance.toJSON (#14548) 2022-05-13 18:36:00 +02:00
Luca Casonato
a5b50d0915
feat(ext/web): implement static Response.json (#14566)
This commit adds support for the static `Response.json` method.
2022-05-13 14:28:05 +02:00
Andreu Botella
3e7afb8918
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-13 10:36:31 +02:00
Bert Belder
89b428234c
1.21.3 (#14584) 2022-05-12 18:43:00 +02:00
Luca Casonato
2f7f41533b
fix(ext/web): brand check in performance.timeOrigin (#14550) 2022-05-10 02:31:35 +02:00
Geert-Jan Zwiers
dd1d6a0f67
feat(web): add performance.timeOrigin (#14489)
Add support for the `performance.timeOrigin` web API.

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
2022-05-06 19:37:18 +02:00
Colin Ihrig
23c77df664
1.21.2 (#14508)
1.21.2
2022-05-05 19:37:27 -04:00
Luca Casonato
242273e69b
chore: update deps (#14416) 2022-05-05 12:41:59 +02:00
Leo Kettmeir
de2004dec5
Forward 1.21.1 (#14428) 2022-04-28 23:32:42 +02:00
Luca Casonato
1ad8c11bc9
chore: bump crates (#14365) 2022-04-22 16:54:42 +02:00
Divy Srivastava
57f7e07c13
Reland "perf(http): optimize ReadableStreams backed by a resource" (#14346) 2022-04-22 16:19:08 +05:30
denobot
29c8cd8aae
1.21.0 (#14336)
Co-authored-by: ry <ry@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-20 21:50:16 -04:00
Bartek Iwańczuk
03019e7781
Revert various PRs related to "ext/http" (#14339)
* 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-21 02:22:55 +02:00
Leo Kettmeir
8a7539cab3
feat(runtime): two-tier subprocess API (#11618) 2022-04-21 00:20:33 +02:00
Divy Srivastava
57a8fc37fc
perf(http): optimize ReadableStreams backed by a resource (#14284) 2022-04-20 18:16:44 +05:30
Nayeem Rahman
c30d95f2e3
feat(ext/web): add globalThis.reportError() (#13799) 2022-04-19 10:59:51 +02:00
David Sherret
a64e63c361
perf: move Deno.writeTextFile and like functions to Rust (#14221)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-04-18 18:00:14 -04:00
Bartek Iwańczuk
0bb96cde72
refactor: update runtime code for primordial check x in y (#13642)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-04-16 14:09:07 +02:00
David Sherret
0e4574b2e3
chore: forward v1.20.6 release commit to main (#14288) 2022-04-14 15:50:48 -04:00
Nayeem Rahman
7d50a5fd43
refactor(core/error): Clarify JsError message fields (#14269) 2022-04-13 16:41:39 +02:00
Nayeem Rahman
4d18f558e4
feat(ext/web): Add error events for event listener and timer errors (#14159)
- 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-13 11:50:57 +02:00
David Sherret
b2aaf708ab
chore: forward v1.20.5 release commit to main (#14232) 2022-04-07 14:40:20 -04:00
Bartek Iwańczuk
6c25b5135d
chore: update tokio, tokio-util and libc dependencies (#14174) 2022-04-02 19:54:40 +02:00
Aaron O'Mullan
94885bc293
experiment(serde_v8): derive_more enabled opaque wrappers (#14096) 2022-04-02 14:37:11 +02:00
David Sherret
7fec7c834c
1.20.4 (#14168) 2022-03-31 15:48:35 -04:00
Luca Casonato
37b0ec454c
chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
Kitson Kelly
cff1e92ecf 1.20.2 2022-03-24 14:47:06 +11:00
Andreu Botella
593801e265
cleanup(web, fetch): dedupe minesniff / "extract a MIME type" algorithm (#14044)
Closes #14002
2022-03-20 14:31:12 +01:00
Leo Kettmeir
e55dee7fd8
refactor: cleanup assert() & AssertionError definitions (#13859) 2022-03-19 13:57:37 +01:00
Ryan Dahl
fce60f2cc2
v1.20.1 2022-03-16 21:40:31 -04:00
Ryan Dahl
f7ab41583e
fix: cargo publish fails without absolute paths (#13993)
This reverts commit 4e3ed37037.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-17 01:25:44 +01:00
Ryan Dahl
418c1eb4b3
v1.20.0 2022-03-16 16:07:35 -04:00
Divy Srivastava
7044bf523b
perf(web): optimize Blob.text and Blob.arrayBuffer (#13981) 2022-03-16 19:16:52 +05:30
Divy Srivastava
697b60a335
perf(web): use DOMString for BlobParts (#13979) 2022-03-16 12:58:38 +05:30
Aaron O'Mullan
bd481bf095
feat(ops): optional OpState (#13954) 2022-03-16 00:33:46 +01:00
Andreu Botella
672f66dde1
perf(web): Optimize TextDecoder by adding a new U16String type (#13923) 2022-03-16 00:22:00 +01:00
Aaron O'Mullan
88d0f01948
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
2022-03-14 23:38:53 +01:00
Andreu Botella
9f494dc405
feat(ext/web): Add AbortSignal.timeout() (#13687) 2022-03-14 20:19:22 +01:00
Andreu Botella
c6bf07ec6d
fix(core): Don't override structured clone error messages from V8 (#13942)
In the implementation of structured serialization in
`Deno.core.serialize`, whenever there is a serialization error, an
exception will be thrown with the message "Failed to serialize
response", even though V8 provides a message to use in such cases.
This change instead throws an exception with the V8-provided message,
if there is one.
2022-03-14 19:35:15 +01:00
Divy Srivastava
b4e42953e1
feat(core): codegen ops (#13861)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-03-14 18:44:15 +01:00
Divy Srivastava
4e3ed37037
chore: improve build times for ext/ changes (#13927) 2022-03-14 09:08:54 +05:30
Yoshiya Hinosawa
3c11768aab
v1.19.3 2022-03-10 23:29:14 +09:00
Aaron O'Mullan
72d593fc5c
perf(ext/web): optimize atob/btoa (#13841)
Follow up to #13839, optimizing `base64_roundtrip` ~20x (~125ms => ~6.5ms)
2022-03-05 20:12:30 +01:00
Satya Rohith
95459e60f6 chore: bump crate version for 1.19.2 (#13824) 2022-03-03 15:05:18 -05:00
David Sherret
4deefafdd1 chore: bump crate versions for 1.19.1 (#13760) 2022-02-24 17:45:39 -05:00
Geert-Jan Zwiers
6613a312b1
docs: code example to structuredClone, CompressionStream, DecompressionStream (#13719)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-02-22 20:41:59 +01:00
Bartek Iwańczuk
e17ab6322e
chore: release crates for v1.19.0 (#13698) 2022-02-17 00:57:40 +01:00
Luca Casonato
19c8d7702f
chore: improve error messages in CompressionStream (#13585)
This commit makes the error messages that one sees when passing
something other than a BufferSource to a (De)CompressionStream. The
WPT tests already pass, because they just check for error type
(TypeError), and not error message. A TypeError was already thrown for
invalid values via serde_v8.
2022-02-16 12:21:46 +01:00
Andreu Botella
760f4c9e24
chore(ext/timers): move ext/timers to ext/web (#13665) 2022-02-15 12:17:30 +01:00
Bartek Iwańczuk
bf22f114a6
refactor: update runtime code for primordial check for iterators (#13510) 2022-02-07 13:54:32 +01:00
Bartek Iwańczuk
82284d8052
chore: forward v1.18.2 to main (#13595) 2022-02-04 21:44:38 +01:00
Bartek Iwańczuk
8176a4d166
refactor: primordials for instanceof (#13527) 2022-02-01 18:06:11 +01:00
Bartek Iwańczuk
5cf23176dc
chore: forward v1.18.1 to main (#13514) 2022-01-27 18:52:34 +01:00
Bartek Iwańczuk
f248e6f177
Revert "refactor: update runtime code for primordial checks for "instanceof" (#13497)" (#13511)
This reverts commit 884143218f.
2022-01-27 16:27:22 +01:00
Bartek Iwańczuk
884143218f
refactor: update runtime code for primordial checks for "instanceof" (#13497) 2022-01-27 13:36:36 +01:00
Leo Kettmeir
30ddf436d0
feat(ext/web): add CompressionStream API (#11728)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-01-24 18:03:06 +01:00
Divy Srivastava
16776c9ade
chore: bump crate version for 0.18.0 (#13441) 2022-01-20 20:50:39 +05:30
Yoshiya Hinosawa
4c1053ad33
chore: update copyright year (#13434) 2022-01-20 16:10:16 +09:00
Bartek Iwańczuk
b10563cb20
fix(runtime): don't crash when window is deleted (#13392)
This commit fixes an error when user deletes "window" global JS
variable. Instead of relying on "window" or "globalThis" to dispatch
"load" and "unload" events, we are default to global scope of the
worker.
2022-01-18 00:13:14 +01:00
Leo Kettmeir
cf2d2b7280
fix(streams): update TypeError message for pending reads when releasing reader (#13376) 2022-01-14 18:47:16 +01:00
Leo Kettmeir
659bbd731c
feat(streams): reject pending reads when releasing reader (#13375) 2022-01-14 17:34:54 +01:00
Bartek Iwańczuk
9975ede773
chore: forward v1.17.3 to main (#13364) 2022-01-13 20:47:42 +01:00
Luca Casonato
f3ece7457a
fix(ext/web): handle no arguments in atob (#13341) 2022-01-11 17:31:13 +01:00
Ryan Dahl
1fb5858009
chore: update copyright to 2022 (#13306)
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2022-01-07 22:09:52 -05:00
Bartek Iwańczuk
46f2ff1205
chore: forward 1.17.2 to main (#13295) 2022-01-06 13:20:42 +01:00
Andreu Botella
22d140ffb1
refactor(ext/web): Don't rely on NaN comparisons in TextEncoderStream (#13151)
In the `transform` function to `TextEncoderStream`'s internal
`TransformStream`, if `chunk` is the empty string and
`this.#pendingHighSurrogate` is null, then `lastCodeUnit` will be NaN.
As it turns out, this does not cause a bug because the comparison to
check for lone surrogates turns out to be false for NaN, but to rely on
it makes the code brittle.
2022-01-05 00:42:30 +01:00
Bartek Iwańczuk
9391ba1098
chore: merge v1.17.1 into main (#13184) 2021-12-22 22:20:17 +01:00
Bartek Iwańczuk
e0cba6b19b
chore: release crates for v1.17.0 (#13112) 2021-12-16 18:51:23 +01:00
Yoshiya Hinosawa
308813ae29
fix(ext/web): set location undefined when --location is not specified (#13046) 2021-12-14 00:35:59 +09:00
Andreu Botella
0f0dd5b7ec
feat(ext/web): implement AbortSignal.prototype.throwIfAborted() (#13044)
See whatwg/dom#1034.
2021-12-10 15:12:38 +01:00
Kitson Kelly
345f0fbe5c
feat(cli): update to TypeScript 4.5 (#12410)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-12-10 09:12:21 +11:00
Andreu Botella
318f48f9ad
feat(streams): support abort reasons in streams (#12991) 2021-12-08 23:31:22 +01:00
Luca Casonato
72e9720e91
chore: merge v1.16.4 into main (#12984) 2021-12-04 01:26:54 +01:00
Bert Belder
c6f3493f18
chore: merge v1.16.3 into main (#12892) 2021-11-24 15:56:18 -08:00
David Sherret
cd61cedd19
chore: bump crates for 1.16.2 (#12792) 2021-11-17 10:14:23 -05:00
Luca Casonato
3250ffe020
chore: bump crate versions for 1.16.1 (#12729) 2021-11-11 11:16:05 +01:00
Luca Casonato
08067b5e12
fix: add typings for AbortSignal.reason (#12730) 2021-11-11 10:28:06 +01:00
Luca Casonato
4f64acd4e4
chore: bump crate versions for 1.16.0 (#12706) 2021-11-09 13:03:17 +01:00
Leo Kettmeir
ccd730a8b7
feat(ext/web): add AbortSignal.reason (#12697) 2021-11-08 23:37:06 +01:00
Leo Kettmeir
c91da1222b
feat(ext/web): WritableStreamDefaultController.signal (#12654) 2021-11-08 12:54:24 +01:00
Leo Kettmeir
ed761bf83f
BREAKING chore(ext/web): remove ReadableStream.getIterator (#12652) 2021-11-05 22:21:25 +01:00
Leo Kettmeir
26a5471302
fix: typings for BYOB stream readers (#12651) 2021-11-05 12:56:28 +01:00
Ryan Dahl
7c2abb9d57
fix: Deno.emit crashes with BorrowMutError (#12627)
Warn on await_holding_refcell_ref clippy rule to avoid this in the future.

Fixes #12453
2021-11-03 09:27:36 -04:00
Leo Kettmeir
95b2955712
feat(ext/web): BYOB support for ReadableStream (#12616)
This commit introduces support for BYOB readers in the WHATWG Streams API implementation.
2021-11-03 10:47:40 +01:00
Bartek Iwańczuk
8e31bbbe55
chore: update to Rust edition 2021 (#12578) 2021-11-02 10:03:37 -04:00
Andreu Botella
bc8e94155a
fix(encoding): support additional encoding labels (#12586) 2021-10-29 10:31:42 +05:30
Andreu Botella
74a93fdf63
fix(webidl): Don't throw when converting a detached buffer source (#12585)
The Web IDL conversion to `BufferSource` and similar types shouldn't
check whether the buffer is detached.

In the case of `TextDecoder`, our implementation would still throw after
the Web IDL conversions because we're creating a new `Uint8Array` from
the buffer source's buffer, which throws if it's detached. This change
also fixes this bug.
2021-10-28 23:17:27 +02:00
Andreu Botella
507ab50e0f
perf(encoding): avoid copying the input data in TextDecoder (#12573)
The implementation of `TextDecoder` had a bug where it was copying the
input data in every case. This change removes that copy in
non-`SharedArrayBuffer` cases.

Since passing a shared buffer source to Rust would fail, this copy of
the input data was making `TextDecoder` work in cases where the input
is shared. In order to avoid a breaking change, the copy is retained in
those cases.
2021-10-29 07:32:58 +11:00