Bartek Iwańczuk
e92d7add38
fix(ext/node): add missing primordial ( #15595 )
2022-08-25 15:34:47 +02:00
Bartek Iwańczuk
8986e2ced4
v1.25.0
2022-08-25 00:20:07 +02:00
Bartek Iwańczuk
fb1c7b7dea
fix(unstable): finish HTTP response for 205 and 304 responses ( #15584 )
...
This commit fixes "Deno.serve()" API by making sure that
205 and 304 responses end with "\r\n\r\n".
2022-08-24 21:26:57 +02:00
Bartek Iwańczuk
6bb72a8086
feat(unstable): add more permission checks for ext/node/ ( #15581 )
2022-08-24 18:07:49 +02:00
Bartek Iwańczuk
a4cc09447e
fix(unstable): Deno.serve() can parse hostnames ( #15579 )
2022-08-24 16:38:51 +02:00
Bartek Iwańczuk
5268fa0e0f
fix(unstable): various resolution bugs for npm: specifiers ( #15546 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-24 14:54:20 +02:00
Luca Casonato
f3bde1d53b
feat(ext/flash): split upgradeHttp into two APIs ( #15557 )
...
This commit splits `Deno.upgradeHttp` into two different APIs, because
the same API is currently overloaded with two different functions. Flash
requests upgrade immediately, with no need to return a `Response`
object. Instead you have to manually write the response to the socket.
Hyper requests only upgrade once a `Response` object has been sent.
These two behaviours are now split into `Deno.upgradeHttp` and
`Deno.upgradeHttpRaw`. The latter is flash only. The former only
supports hyper requests at the moment, but can be updated to support
flash in the future.
Additionally this removes `void | Promise<void>` as valid return types
for the handler function. If one wants to use `Deno.upgradeHttpRaw`,
they will have to type cast the handler signature - the signature is
meant for the 99.99%, and should not be complicated for the 0.01% that
use `Deno.upgradeHttpRaw()`.
2022-08-24 17:40:57 +05:30
Luca Casonato
4ef08a58df
feat: update Deno.serve
function signature ( #15563 )
...
This commit changes the `Deno.serve` function signature to be more
versatile and easier to use. It is now a drop in replacement for
std/http's `serve`.
The input validation has also been reworked.
2022-08-24 00:08:56 +02:00
David Sherret
e7367044d9
feat: binary npm commands ( #15542 )
2022-08-23 10:39:19 -04:00
Luca Casonato
24f7f3fda9
fix(ext/fetch): ignore user content-length header ( #15555 )
...
Previously if a user specified a content-length header for an POST
request without a body, the request would contain two `content-length`
headers. One added by us, and one added by the user.
This commit ignores all content-length headers coming from the user,
because we need to have the sole authority on the content-length because
we transmit the body.
2022-08-23 12:43:04 +02:00
Divy Srivastava
e34260c5b0
BREAKING(ext/ffi): specialized buffer
type ( #15518 )
2022-08-23 09:16:43 +05:30
Kitson Kelly
d0c5477731
docs: add permission tags to JSDocs ( #15541 )
...
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-08-23 10:57:01 +10:00
Yoshiya Hinosawa
57d48134d1
fix(ext/flash): fix default onListen callback ( #15533 )
2022-08-22 17:01:43 +09:00
Bartek Iwańczuk
301f6c46ba
fix(unstable): better error for invalid hostname in Deno.serve() ( #15529 )
2022-08-21 21:15:52 +02:00
Mathias Lafeldt
e96933bc16
chore: use Rust 1.63.0 ( #15464 )
2022-08-21 19:31:14 +02:00
Yoshiya Hinosawa
fb2aeb79a1
fix(ext/flash): fix listening port ( #15519 )
2022-08-21 21:27:14 +09:00
Divy Srivastava
906aa78af3
feat(ops): V8 Fast Calls ( #15291 )
2022-08-21 17:37:53 +05:30
David Sherret
87f80ff6be
feat(unstable): initial support for npm specifiers ( #15484 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 11:31:33 -04:00
Bartek Iwańczuk
5beec3f106
feat(unstable): change Deno.serve() API ( #15498 )
...
- Merge "Deno.serve()" and "Deno.serveTls()" API
- Remove first argument and use "fetch" field options instead
- Update type declarations
- Add more documentation
2022-08-19 14:36:01 +02:00
Mathias Lafeldt
1848c7e361
Fix: Honor linter rules in CI and locally ( #15492 )
...
RUSTFLAGS take precedence over `target.<triple>.rustflags`. Therefore,
setting the env var globally in CI would always override whatever linter
rules are allowed or denied in .cargo/config.toml.
With this change, we ensure that problems are detected both in CI and
locally, using either cargo clippy or lint.js.
2022-08-19 08:17:18 -04:00
Divy Srivastava
9e576dff7c
perf(runtime): optimize Deno.file open & stream ( #15496 )
2022-08-19 15:54:40 +05:30
Divy Srivastava
8bdcec1c84
fix(ext/flash): concurrent response streams ( #15493 )
2022-08-19 10:14:56 +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
Leo Kettmeir
0b0843e4a5
refactor(fetch/request): use callback for url and method ( #15483 )
2022-08-17 16:29:26 +02:00
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
David Sherret
39fb32df46
chore(ext/node): correct publishing for ext/node ( #15461 )
2022-08-11 17:25:41 -04:00
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
Bartek Iwańczuk
10ce2e9e80
refactor(ext/node): remove several TODOs ( #15452 )
2022-08-11 16:44:01 +02: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
Luca Casonato
bdd8ddbe4c
fix(ext/ffi): unstable op_ffi_unsafe_callback_ref ( #15439 )
2022-08-10 08:39:45 +05:30
David Sherret
04d402116c
chore: temporarily disable ext/node
and use unstable ops ( #15438 )
2022-08-09 22:09:51 -04:00
David Sherret
d6f789eb05
chore: temporarily disable op_require_read_file
( #15433 )
2022-08-09 17:28:13 -04:00
Bartek Iwańczuk
1f54d87789
feat: add ext/node for require support ( #15362 )
...
This commit adds "ext/node" extension that implementes CommonJS module system.
In the future this extension might be extended to actually contain implementation of
Node compatibility layer in favor of "deno_std/node".
Currently this functionality is not publicly exposed, it is available via "Deno[Deno.internal].require"
namespace and is meant to be used by other functionality to be landed soon.
This is a minimal first pass, things that still don't work:
support for dynamic imports in CJS
conditional exports
2022-08-09 21:06:01 +02:00
Divy Srivastava
daaa509ee5
chore(ext/ffi): remove flaky test ( #15426 )
2022-08-08 22:45:24 +05:30
Aapo Alasuutari
9c594de0ff
feat(ext/ffi): Add static method variants to Deno.UnsafePointerView ( #15146 )
2022-08-05 21:57:12 +05:30
Aapo Alasuutari
569910856e
fix(ext/ffi): Check CStr for UTF-8 validity on read ( #15318 )
...
Co-authored-by: Phosra <phosra@tutanota.com>
2022-08-05 21:56:54 +05:30
SahAssar
6e6912489c
feat(ext/fetch): Add socks proxy support ( #15372 )
2022-08-05 12:49:25 +02:00
denobot
cf33720a85
chore: forward v1.24.2 release commit to main ( #15410 )
2022-08-05 00:10:47 +02:00
Leo Kettmeir
e1297b1a28
fix: increase websocket message size ( #15406 )
2022-08-04 18:29:04 +02:00
Leo Kettmeir
864af52a1b
fix(ext/webgpu): use correct IDL key name ( #15278 )
2022-08-04 01:00:51 +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
Divy Srivastava
ef7bc2e6cc
perf(ext/ffi): use fast api calls for 64bit return types ( #15313 )
2022-07-28 18:08:22 +05:30
Phosra
519ed44ebb
fix(ext/fetch): resolve TODOs about WebIDL conversions in body init ( #15312 )
2022-07-28 13:18:17 +02:00
Divy Srivastava
fad8d7d32a
perf(ext/ffi): support Uint8Array in fast calls ( #15319 )
2022-07-27 19:32:21 +05:30
Aapo Alasuutari
8911bdb6d0
chore(ext/ffi): Remove unnecessary byte_offset conditional slicing ( #15320 )
2022-07-27 11:13:30 +05:30
Aapo Alasuutari
b4b4e5980b
chore(ops): Remove unused arguments from ops ( #15315 )
2022-07-26 19:34:08 +02:00
Divy Srivastava
58d1126fa4
chore(ext/ffi): remove dependency on stdint.h ( #15294 )
2022-07-24 18:38:13 +05:30
Aapo Alasuutari
f8fee6cd21
feat(ext/ffi): Safe number pointers ( #15173 )
2022-07-24 16:11:11 +05:30
Aapo Alasuutari
e1cbd2364f
feat(ext/ffi): Add support to get ArrayBuffers from UnsafePointerView ( #15143 )
2022-07-23 22:41:06 +05:30
diachedelic
2843160fc7
feat(ext/crypto): deriveBits P-384 ( #15138 )
...
This commit adds P-384 curve support for crypto.subtle.deriveBits.
Co-authored-by: James Diacono <james@diacono.com.au>
2022-07-23 22:34:37 +05:30
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
Aapo Alasuutari
244c00d95b
perf(ext/ffi): Optimise common pointer related APIs ( #15144 )
2022-07-22 16:37:35 +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
ayame113
27a72a12b7
chore: align some Web API type definitions to lib.dom.d.ts ( #15219 )
2022-07-20 18:30:41 +08:00
Phosra
b8e1250500
fix(ext/web): align DOMException better with spec ( #15097 )
2022-07-20 10:12:18 +02:00
Dante Issaias
2b1f145c3e
chore(ext): update webgpu ( #15059 )
2022-07-20 02:22:26 +02:00
Bartek Iwańczuk
1bdf5a2081
chore: upgrade rusty_v8 to 0.47.0 ( #15247 )
2022-07-19 21:36:15 +02:00
Leo Kettmeir
2eb27c92db
fix: WebSocketStream ping event causes pending promises ( #15235 )
2022-07-18 22:49:49 +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
David Sherret
635eed9373
chore: fix Windows specific clippy errors ( #15212 )
2022-07-15 12:30:25 -04: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
Kayla Washburn
91a33c65f3
fix(ext/ffi): allow setting a custom lib path for libtcc.a ( #15208 )
2022-07-14 16:01:07 -06: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
Divy Srivastava
5b26a4a30e
fix(ext/http): reading headers with ongoing body reader ( #15161 )
2022-07-12 13:31:37 -04:00
Colin Ihrig
dcd05d4cb9
fix(net): don't panic on failed UDS removal ( #15157 )
...
If a Unix Domain Socket cannot be removed, throw instead of
panicing.
Fixes: https://github.com/denoland/deno/issues/14213
2022-07-12 11:53:53 -04:00
Aapo Alasuutari
007e1b4bd5
fix(ext/ffi): i64 arg to C mapping was wrong ( #15162 )
2022-07-12 16:14:54 +05:30
Aapo Alasuutari
d725cb28ca
feat(ext/ffi): Support 64 bit parameters in Fast API calls ( #15140 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-07-12 08:20:20 +05:30
Divy Srivastava
77d065e034
fix(ext/ffi): trampoline for fast calls ( #15139 )
2022-07-12 06:33:05 +05:30
Livia Medeiros
b68115db3a
fix(ext/crypto): Adjust typings for Crypto.getRandomValues()
( #15130 )
2022-07-11 21:43:57 +02: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
Gamer Omega
e5489446d5
fix(ext/console): Fix a typo in a warning when .timeEnd is called on an unknown timer ( #15135 )
2022-07-09 21:30:29 +02:00
sevenwithawp
213d831ae3
refactor(ext) Decrease of StringPrototypeReplace recurrent usage ( #15058 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-09 14:28:02 -04:00
Divy Srivastava
132c761e87
fix(ext/ffi): allow opting out of fast ffi calls ( #15131 )
2022-07-09 18:41:07 +05:30
Aapo Alasuutari
3da182b0b8
fix(ext/ffi): Avoid keeping JsRuntimeState RefCell borrowed for event loop middleware calls ( #15116 )
2022-07-09 11:49:20 +02:00
Divy Srivastava
20cbd7f0f8
perf(ext/ffi): leverage V8 Fast Calls ( #15125 )
2022-07-08 23:19:09 +05:30
Zach
82f7daeed7
fix(ext/http) nextRequest return type annotation from ResponseEvent to RequestEvent ( #15100 )
...
Fixes #15099
2022-07-06 20:40:27 -04:00
Divy Srivastava
6046342a20
perf(ext/http): skip core.isProxy
check for default ResponseInit ( #15077 )
2022-07-06 17:33:32 +05:30
Garcia
04061f9f39
fix(ext/url): missing primordial ( #15096 )
2022-07-06 13:45:01 +02:00
David Sherret
9d061c9e68
chore: pin aes-gcm to fix cargo publish ( #15084 )
2022-07-05 14:24:40 -04: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
Divy Srivastava
93c03fffc4
perf(ext/http): remove accept_encoding interior mutability ( #15070 )
2022-07-04 21:48:09 +05:30
Divy Srivastava
20cf0770dd
perf(ext/http): simplify op_http_accept ( #15067 )
2022-07-04 18:41:31 +05:30
Divy Srivastava
a2643ae7bd
perf(ext/http): lazy load headers ( #15055 )
2022-07-04 07:41:52 +05:30
Bartek Iwańczuk
b8b82c3ea4
chore: use Rust 1.62.0 ( #15028 )
2022-07-01 15:28:06 +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
Alexandre Negrel
9c878981cf
fix(ext/crypto): add EcdhKeyDeriveParams to deriveKey types ( #15005 )
2022-06-30 11:23:05 +05:30
Nugine
1328a56230
perf(ext/web): use base64-simd for atob/btoa ( #14992 )
2022-06-29 21:12:39 +05:30
Aapo Alasuutari
3ad8bd8557
fix(ext/ffi): Empty buffers error with index out of bounds on FFI ( #14997 )
2022-06-29 20:30:29 +05:30
Mark Ladyshau
6743b3227b
fix(ext/web): remove ErrorEventInit
's error default ( #14809 )
2022-06-29 14:29:08 +02:00
Divy Srivastava
76d387fb93
perf(ext/ffi): optimize synchronous calls ( #14945 )
2022-06-29 13:43:33 +05:30
Aapo Alasuutari
00f4521b20
feat(ext/ffi): Thread safe callbacks ( #14942 )
2022-06-28 14:53:36 +05:30
Luca Casonato
8d82ba7299
build: require safety comments on unsafe code ( #13870 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-06-26 00:13:24 +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
Aapo Alasuutari
a232b4011a
chore(ext/ffi): Improve FFI static handling ( #14924 )
2022-06-23 08:19:07 +05:30
Aapo Alasuutari
82655b9285
perf(ext/ffi): Optimize FFI Rust side type checks ( #14923 )
2022-06-21 09:16:59 +05:30
Aapo Alasuutari
a38a1f91cf
chore(ext/ffi): simplify FFI types ( #14920 )
...
This commit simplifies the TypeScript types used for interacting with Deno FFI. The basis is that types are now first grouped into logical wholes, NativeNumberType, NativeBigIntType etc. These wholes are combined into the NativeType and NativeResultType general types.
Additionally, this PR removes the { function: { parameters: [], result: "void" } } type declaration from parameters (and result types. Now functions are merely passed and returned as "function".
2022-06-21 08:20:33 +05:30
Divy Srivastava
354fa6cd00
BREAKING(ext/ffi): Remove Deno.UnsafePointer
indirection ( #14915 )
2022-06-20 19:08:10 +05:30
Divy Srivastava
4cbb2567b5
chore(ext/crypto): update webcrypto deps ( #14452 )
2022-06-20 16:53:57 +05:30
Aapo Alasuutari
3d6fa64f19
feat(ext/ffi): Callbacks ( #14663 )
...
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-20 16:36:04 +05:30
Mark Ladyshau
60869c2598
fix(ext/fetch): add accept-language
default header to fetch ( #14882 )
2022-06-19 23:33:24 +02: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
Ryan Dahl
d0dec8d36b
chore: upgrade various deps ( #14876 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-15 13:48:53 -04:00
cjihrig
b2109a12aa
fix(url): properly indent when inspecting URLs ( #14867 )
...
This commit updates the custom inspect function for URL objects
to pass the inspect options through so that the context is
propagated and the resulting indentation is correct.
Fixes: https://github.com/denoland/deno/issues/14171
2022-06-15 09:52:28 -04:00
cjihrig
eadf943e59
fix(console): constrol inspect() indent with option ( #14867 )
...
This commit updates the Deno.inspect() logic to use the
indentLevel option to control indentation instead of passing
around separate indent/level parameters internally.
Refs: https://github.com/denoland/deno/issues/8099
Refs: https://github.com/denoland/deno/issues/14171
2022-06-15 09:52:28 -04: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
64abb65f05
feat(console): pass options and depth to custom inspects ( #14855 )
...
This commit updates Deno.inspect() to pass inspect options and
the current inspect depth to custom inspect functions.
Refs: https://github.com/denoland/deno/issues/8099
Refs: https://github.com/denoland/deno/issues/14171
2022-06-13 10:59:22 -04: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
Leo Kettmeir
a0a13b3a1b
fix(http/upgradewebsocket): check for open state for idle timeout ( #14813 )
2022-06-08 17:52:23 +02:00
Elias Sjögreen
8113fac939
feat(ext/ffi): support passing and returning bigints ( #14523 )
2022-06-08 16:43:10 +05:30
diachedelic
ff5def9ed5
feat(ext/crypto): export elliptic keys as "raw" ( #14764 )
...
This commit adds support for the "raw" format when exporting public ECDH/ECDSA keys via
the SubtleCrypto.exportKey method.
2022-06-08 08:29:42 +05:30
Nayeem Rahman
9385a91312
refactor(core): Move Deno.core bindings to ops ( #14793 )
2022-06-07 11:25:10 +02:00
Mark Ladyshau
cfb6067f9b
fix(ext/fetch): remove deprecation of URL
in deno fetch
( #14769 )
2022-06-07 01:58:21 +02:00
Nayeem Rahman
e3eae662f3
fix: Format non-error exceptions ( #14604 )
...
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-06-06 20:26:57 +02:00
Bartek Iwańczuk
de562b0215
chore: Forward v1.22.2 to main ( #14785 )
2022-06-02 22:29:41 +02:00
Mark Ladyshau
4e26bcb2bb
fix(ext/crypto): adjust getRandomValues
types ( #14714 )
2022-06-02 15:15:46 +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
Leo Kettmeir
3c97bbe165
fix(ext/websocket): WebSocket dispatch single close event ( #13443 )
2022-05-23 13:21:11 +02:00
denobot
5ad8919d64
1.22.0 ( #14657 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-05-18 20:35:16 +05:30
Luca Casonato
1c4028a381
fix: add types for Response.json
( #14655 )
2022-05-18 16:16:11 +02:00
Aaron O'Mullan
f2410b4481
perf(ext/http): faster accept-encoding parsing ( #14654 )
2022-05-18 16:14:23 +02:00
Luca Casonato
c4b7bdb9d1
chore: update rustls ( #14647 )
...
This fixes thevery annoying "Received a ServerHelloDone handshake
message while expecting [CertificateRequest]" debug log from rustls.
2022-05-18 15:04:44 +02:00
Aleksei Kosyrev
037466e9cd
fix(ext/tls): ability to ignore IP-address certificate errors ( #14610 )
2022-05-18 13:32:12 +02:00
Divy Srivastava
4d82610700
fix(ext/http): no response body reader when cancelling during shutdown ( #14653 )
2022-05-18 16:13:22 +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
Aaron O'Mullan
8879244f72
fix(ext/http): error on invalid headers ( #14642 )
...
Minor regression/change-in-behaviour from #14552 that filtered out invalid http headers in rust vs error-ing back to JS
2022-05-17 14:40:30 +02:00
Aaron O'Mullan
037e46bb51
fix(ext/http): skip auto-compression if content-encoding present ( #14641 )
...
Regression from #14552
2022-05-17 14:02:45 +02:00
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
Craig Morten
10a68a5635
feat(ext/net): add CAA
DNS record support in Deno.resolveDns() API ( #14624 )
2022-05-16 11:20:41 +02:00
Craig Morten
c9e9265c3e
feat(ext/net): support NAPTR records in Deno.resolveDns() API ( #14613 )
2022-05-15 17:42:02 +02:00
Craig Morten
38e0a2ec1b
feat(ext/net): support full SOA
record interface ( #14617 )
2022-05-15 16:43:08 +02: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
Thanapat Chotipun
bd4256262a
feat(ext/net): add support for SOA records in Deno.resolveDns() API ( #14534 )
2022-05-14 14:08:35 +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
Andy Kurnia
42fec5150e
fix(ext/http): make serveHttp compress for Accept-Encoding: deflate, gzip ( #14525 )
2022-05-13 14:10:05 +02:00
Aaron O'Mullan
67e5a850cc
feat(serde_v8): bytes::Bytes support ( #14412 )
2022-05-13 12:53:13 +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
Aaron O'Mullan
30841a1705
cleanup(ext/http): simpler http write ops ( #14552 )
...
Facilitates making `op_http_write_headers` sync and thus faster
2022-05-10 22:36:40 +02:00
Colin Ihrig
649e5ce023
fix: finish TLS handshake before shutting down ( #14547 )
...
This commit ensures that the TLS handshake completes before
attempting to close the connection.
2022-05-10 08:27:08 -04: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
Divy Srivastava
fb390c5701
fix(ext/http): explicitly close resource after reading ( #14471 )
2022-05-04 20:09:15 +05:30
Thanapat Chotipun
e3954df8c5
feat(ext/net): add "NS" record support in Deno.resolveDns API ( #14372 )
2022-05-03 20:04:20 +02:00
Leo Kettmeir
de2004dec5
Forward 1.21.1 ( #14428 )
2022-04-28 23:32:42 +02:00
Ben Heidemann
dc4ab1d934
feat(ext/console): Compact empty iterables when calling Deno.inspect with compact false ( #14387 )
2022-04-26 13:04:28 +02:00
Aaron O'Mullan
e24b8f075e
chore: deno_http v0.43.1 ( #14392 )
2022-04-25 21:31:34 +02:00
Divy Srivastava
609c359dd4
fix(ext/http): truncate read bytes when streaming bodies ( #14389 )
...
stream shutdown wasn't happening correctly (moved it to call op_http_shutdown) & extra zeroed bytes were being sent for when body length not a multiple of 64*1024
2022-04-25 19:20:29 +02:00
Ben Heidemann
ddbfa1418c
feat(ext/console): Add string abbreviation size option for "Deno.inspect" ( #14384 )
2022-04-25 13:59:15 +02:00
Divy Srivastava
6dcf3a447c
perf(ext/http): fast path for uncompressed bodies ( #14366 )
2022-04-25 08:13:22 +05:30
Aaron O'Mullan
e2fba7b967
perf(ext/http): faster is_content_compressible ( #14383 )
...
Cleanup + benches
2022-04-24 21:45:56 +02:00
Aaron O'Mullan
4b7d306a19
perf(serde_v8): zero-copy StringOrBuffer ( #14381 )
2022-04-24 09:28:46 -03:00
Divy Srivastava
2eb8c3b82f
chore(ext/fetch): custom arity ( #14198 )
2022-04-23 22:19:06 +05:30
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
Divy Srivastava
2a86b8fb02
Reland "feat(ext/http): stream auto resp body compression" ( #14345 )
2022-04-21 12:37:49 +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
Luca Casonato
8b25807054
feat(ext/http): stream auto resp body compression ( #14325 )
...
This commit adds support for auto response body compression for
streaming bodies.
2022-04-20 22:53:56 +02:00
Divy Srivastava
2612b6f20f
core: introduce resource.read_return
( #14331 )
2022-04-20 18:39:13 +02:00
Divy Srivastava
57a8fc37fc
perf(http): optimize ReadableStream
s backed by a resource ( #14284 )
2022-04-20 18:16:44 +05:30
David Sherret
ae479b1036
perf(fmt/lint): incremental formatting and linting ( #14314 )
2022-04-19 22:14:00 -04:00
Divy Srivastava
1c05e41f37
perf(runtime): bypass tokio file and bump op buffer size to 64K ( #14319 )
2022-04-19 20:11:31 +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
a87be28a46
feat: Better formatting for AggregateError ( #14285 )
...
This commit adds "aggregated" field to "deno_core::JsError" that stores
instances of "JsError" recursively to properly handle "AggregateError"
formatting. Appropriate logics was added to "PrettyJsError" and
"console" API to format AggregateErrors.
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-16 16:12:26 +02: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
EduM22
181e378032
fix(ext/crypto): check extractable in exportKey ( #14222 )
2022-04-07 18:28:56 +05:30
Divy Srivastava
995d1666ff
chore(ext/websocket): custom arity ( #14202 )
2022-04-04 15:19:50 +05:30
Divy Srivastava
cc49b5e0d8
chore(ext/http): custom arity ( #14200 )
2022-04-04 15:19:35 +05:30
Divy Srivastava
6bb555b549
chore(ext/broadcast_channel): custom arity ( #14199 )
2022-04-04 15:18:29 +05:30
Divy Srivastava
797cf9cdd9
chore(ext/webstorage): custom arity ( #14201 )
2022-04-04 15:07:26 +05:30
Divy Srivastava
1f7dd5eda9
chore(ext/url): cleanup url ops ( #14177 )
2022-04-03 18:12:38 +05:30
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
Andreu Botella
d983b577bc
chore(wasm): Don't await on the argument to handleWasmStreaming
( #14000 )
...
`handleWasmStreaming` is the function that provides the binding with
the `fetch` API needed for `WebAssembly.instantiateStreaming()` and
`WebAssembly.compileStreaming()`. When I implemented it in #11200 , I
thought V8 was calling these functions with the argument of the
`WebAssembly` streaming functions, without doing any resolving, and so
`handleWasmStreaming` awaits for the parameter to resolve. However,
as discovered in
https://github.com/denoland/deno/issues/13917#issuecomment-1065805565 ,
V8 does in fact resolve the parameter if it's a promise (and handles
rejections arising from that).
This change removes the `async` IIFE inside `handleWasmStreaming`,
letting initial errors be handled synchronously (which will however
not throw synchronously from the `WebAssembly` namespace functions).
Awaiting is still necessary for reading the bytes of the response,
though, and so there is an `async` IIFE for that.
2022-03-29 14:44:33 +02:00
Nayeem Rahman
317f13b63f
fix(ext/fetch): extend deprecated fetch() overload with string | Request
( #14134 )
2022-03-28 12:35:48 +02:00
Luca Casonato
37b0ec454c
chore: forward v1.20.3 release commit to main ( #14121 )
2022-03-25 18:53:55 +01:00
Rafael Ávila de Espíndola
3511b7602b
chore: update rusqlite ( #14117 )
2022-03-25 13:32:50 +01:00
Luca Casonato
25b73a366f
fix(ext/ffi): enforce unstable check on ops ( #14115 )
2022-03-25 12:29:54 +01:00
Yoshiya Hinosawa
3462d87503
fix: deprecate URL as the first arg of fetch ( #14113 )
2022-03-25 20:23:55 +09:00
apeltop
bb3387de17
chore(ext): fix typo in ext/webgpu, ext/fetch ( #14106 )
2022-03-25 00:36:30 +01:00
Kitson Kelly
cff1e92ecf
1.20.2
2022-03-24 14:47:06 +11:00
Divy Srivastava
5edcd9dd35
perf(http): avoid Set.has() when closing connection resource ( #14085 )
2022-03-23 13:05:34 +05:30
Yoshiya Hinosawa
7feb25d448
feat(unstable): add ref/unref to Listener ( #13961 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-23 12:04:20 +09:00
Divy Srivastava
5c9844e5f7
perf(http): avoid checking promise every request ( #14079 )
2022-03-23 07:23:59 +05:30
Nayeem Rahman
d2c099ce34
fix(ext/fetch): Connect async error stack with user code ( #13899 )
2022-03-22 18:08:33 +01:00
David Sherret
49012cbc33
feat: upgrade to swc_ecmascript 0.137.0 ( #14067 )
2022-03-22 09:19:53 -04:00
Andreu Botella
12d28dffc6
fix(fetch): Fix uncaught rejection panic with WebAssembly.instantiateStreaming
( #13925 )
...
When an exception is thrown during the processing of streaming WebAssembly,
`op_wasm_streaming_abort` is called. This op calls into V8, which synchronously
rejects the promise and calls into the promise rejection handler, if applicable.
But calling an op borrows the isolate's `JsRuntimeState` for the duration of the
op, which means it is borrowed when V8 calls into `promise_reject_callback`,
which tries to borrow it again, panicking.
This change changes `op_wasm_streaming_abort` from an op to a binding
(`Deno.core.abortWasmStreaming`). Although that binding must borrow the
`JsRuntimeState` in order to access the `WasmStreamingResource` stored in the
`OpTable`, it also takes ownership of that `WasmStreamingResource` instance,
which means it can drop any borrows of the `JsRuntimeState` before calling into
V8.
2022-03-22 11:33:29 +01:00
Aaron O'Mullan
45ef3c91c2
perf(http): avoid per header alloc ( #14051 )
2022-03-21 12:56:30 +01: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
Jason
0bc286ab47
fix(ext/console): fix error with a Proxy of a Map ( #14032 )
2022-03-20 20:21:42 +09:00
Bartek Iwańczuk
52a6e9ef4a
feat(ext/net): Deno.upgradeHttp handles unix connections ( #13987 )
2022-03-19 14:21:49 +01:00
Leo Kettmeir
e55dee7fd8
refactor: cleanup assert() & AssertionError definitions ( #13859 )
2022-03-19 13:57:37 +01:00
Aapo Alasuutari
ad8e238348
chore(core,ext): minor JS optimisations ( #13950 )
2022-03-19 18:26:54 +09: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
Bert Belder
c5270abad7
feat(unstable): Add Deno.upgradeHttp API ( #13618 )
...
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-16 14:54:18 +01:00
Divy Srivastava
7044bf523b
perf(web): optimize Blob.text and Blob.arrayBuffer ( #13981 )
2022-03-16 19:16:52 +05:30
Ryan Dahl
45b3aa22c0
feat(ext/fetch): Allow Response status 101 ( #13969 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-16 14:30:43 +01:00
Divy Srivastava
697b60a335
perf(web): use DOMString for BlobParts ( #13979 )
2022-03-16 12:58:38 +05:30
木杉
395f527238
chore(ext/webidl): change spec link ( #13960 )
2022-03-16 03:17:50 +01:00
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
bb53135ed8
cleanup(core): OpPair => OpDecl ( #13952 )
2022-03-15 23:43:17 +01:00
wspsxing
fe606c52e1
fix: upgrade reqwest to 0.11.10 ( #13951 )
2022-03-14 23:12:59 -04: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
Filip Skokan
f9b4d262b3
fix(ext/crypto): handle JWK import with "use" ( #13912 )
2022-03-11 20:26:16 +05:30
Filip Skokan
6ecadf6398
fix(ext/crypto): use EcKeyImportParams dictionary ( #13894 )
2022-03-11 19:35:40 +05:30
Yoshiya Hinosawa
3c11768aab
v1.19.3
2022-03-10 23:29:14 +09:00
Divy Srivastava
a5957f46ee
chore(ext/crypto): remove old todos ( #13887 )
2022-03-09 18:13:11 +05:30
Satya Rohith
788553bf2f
chore: bump deno_http to 0.33.0 ( #13867 )
2022-03-07 23:16:03 +05:30
Satya Rohith
670aef5c1a
fix(ext/http): drop content-length header on compression ( #13866 )
2022-03-07 22:43:15 +05:30
Satya Rohith
d5642f5df7
chore: bump deno_http to 0.32.0 ( #13850 )
2022-03-07 00:15:10 +05:30
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
Gianluca Oldani
7e3496403a
feat(ext/net): Use socket2 crate to create TcpListener ( #13808 )
2022-03-05 00:43:48 +01:00
Satya Rohith
70690f54af
chore: update deps ( #13821 )
2022-03-05 03:38:04 +05:30
Bartek Iwańczuk
060dabee4c
feat(net): add Deno.UnixConn interface ( #13787 )
2022-03-04 20:33:13 +01:00
Kitson Kelly
d1db500cda
feat(ext/http): auto-compression of fixed response bodies ( #13769 )
...
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Satya Rohith <me@satyarohith.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2022-03-04 16:04:39 +11:00
Satya Rohith
95459e60f6
chore: bump crate version for 1.19.2 ( #13824 )
2022-03-03 15:05:18 -05:00
Divy Srivastava
8b2989c417
feat(ext/crypto): AES-GCM support for 128bit IVs ( #13805 )
2022-03-02 10:56:10 +05:30
Bartek Iwańczuk
7e3d9084b6
feat: Add Deno.TcpConn class, change return type from Deno.connect ( #13714 )
2022-02-27 15:18:30 +01:00
David Sherret
4deefafdd1
chore: bump crate versions for 1.19.1 ( #13760 )
2022-02-24 17:45:39 -05:00
Yoshiya Hinosawa
3e8180c793
feat(ext/net): support cert, key options in listenTls ( #13740 )
2022-02-24 13:16:56 +09: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
Aapo Alasuutari
b1a6555c05
feat(ext/ffi): Support read only global statics ( #13662 )
2022-02-18 17:51:19 +05:30
Bartek Iwańczuk
e17ab6322e
chore: release crates for v1.19.0 ( #13698 )
2022-02-17 00:57:40 +01:00
David Sherret
b98afb59ae
feat: deno vendor ( #13670 )
2022-02-16 13:14:19 -05:00
Luca Casonato
02c95d367e
chore: make new TCP conn methods unstable ( #13686 )
2022-02-16 17:32:29 +01:00
Leo Kettmeir
8891c19c57
fix(ext/console): print circular ref indicator in cyan ( #13684 )
2022-02-16 16:21:59 +01:00
ylxdzsw
4dff70b434
docs(ext/fetch): fix copy-paste errors in Request docs ( #13681 )
2022-02-16 13:50:15 +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
Divy Srivastava
77a9683425
fix(ext/crypto): optional additionalData in encrypt/decrypt ( #13669 )
2022-02-16 16:27:14 +05:30
ylxdzsw
074f53234a
feat(ext/http): add support for unix domain sockets ( #13628 )
2022-02-16 00:16:12 +01:00
Luca Casonato
bdc8006a36
feat(runtime): web streams in fs & net APIs ( #13615 )
...
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-15 13:35:22 +01:00
Andreu Botella
760f4c9e24
chore(ext/timers): move ext/timers to ext/web ( #13665 )
2022-02-15 12:17:30 +01:00
Surma
5e845442fa
docs(websockets): add comment about Deno.upgradeWebSocket() for WebSocket servers ( #13659 )
2022-02-13 14:47:46 +01:00
Geert-Jan Zwiers
911ddbc733
chore(ext/fetch): render jsdoc code example properly ( #13656 )
2022-02-12 16:15:54 +01:00
Divy Srivastava
e218d567d5
fix(ext/crypto): support EC p256 private key material in exportKey ( #13547 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-02-08 18:48:28 +05:30
Bartek Iwańczuk
bf22f114a6
refactor: update runtime code for primordial check for iterators ( #13510 )
2022-02-07 13:54:32 +01:00
Zach
a7850d7fe6
fix(ext/console): fix uncaught TypeError in css styling ( #13567 )
...
When using css coloring in the console, non-color values should be ignored rather than throw exceptions.
Fixes #13469
2022-02-06 19:00:06 +09:00
Bartek Iwańczuk
82284d8052
chore: forward v1.18.2 to main ( #13595 )
2022-02-04 21:44:38 +01:00
Leo Kettmeir
2f438f4106
feat(ext/console): better circular information in object inspection ( #13555 )
2022-02-04 21:10:47 +01:00
Bartek Iwańczuk
e1d3bdfbd5
refactor: fix primordials for WebGPU ( #13594 )
2022-02-04 16:30:32 +01:00
Bartek Iwańczuk
8176a4d166
refactor: primordials for instanceof ( #13527 )
2022-02-01 18:06:11 +01:00
Divy Srivastava
abf89f8c46
fix(ext/crypto): utf16 jwk encoding ( #13535 )
2022-02-01 17:32:10 +05:30
Yosi Pramajaya
3e566bb457
feat(ext/net): Add Conn.setNoDelay and Conn.setKeepAlive ( #13103 )
2022-01-31 16:36:54 +01:00
Divy Srivastava
efa02ffa2a
fix(ext/crypto): enforce 128bits tagLength for AES-GCM decryption ( #13536 )
2022-01-30 18:42:29 +05:30
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
Aaron O'Mullan
bd5d445da9
chore: re-enable wgpu_sync ( #13453 )
2022-01-24 23:47:05 +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
a96b294a8a
fix(ext/crypto): duplicate RsaHashedImportParams types ( #13466 )
2022-01-22 09:12:18 +05:30
Divy Srivastava
16776c9ade
chore: bump crate version for 0.18.0 ( #13441 )
2022-01-20 20:50:39 +05:30
Divy Srivastava
23647a0d8a
fix(ext/ffi): update copyright year to 2022 ( #13440 )
2022-01-20 19:57:25 +05:30
Aaron O'Mullan
3ab68bd0a2
revert( #13402 ): experiment: wgpu sync ( #13439 )
2022-01-20 15:23:53 +01:00
Divy Srivastava
443d8fc41c
chore(ext/console): update ansi-regex ( #13435 )
2022-01-20 15:21:04 +05:30
Yoshiya Hinosawa
4c1053ad33
chore: update copyright year ( #13434 )
2022-01-20 16:10:16 +09:00
Luca Casonato
82b086752a
feat(ext/crypto): support importing raw EC keys ( #13079 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-01-19 20:50:28 +05:30
Divy Srivastava
4da41ca8fd
fix(ext/crypto): validate maskGenAlgorithm asn1 in importKey ( #13421 )
2022-01-19 20:12:43 +05:30
Aaron O'Mullan
2ab21dafa7
experiment: wgpu sync ( #13402 )
2022-01-19 13:38:51 +01:00
Leo Kettmeir
c98fbe2fd6
chore: update urlpattern ( #13422 )
2022-01-19 11:57:27 +01:00
Sean Michael Wykes
9139985180
feat(ext/crypto): implement pkcs8/JWK for P-384 curves ( #13154 )
2022-01-19 12:14:35 +05:30
Sean Michael Wykes
77e58fe7f9
feat(ext/crypto): implement pkcs8/spki/jwk exportKey for ECDSA and ECDH ( #13104 )
2022-01-19 09:08:35 +05:30
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
Bartek Iwańczuk
bc666e42a8
fix(ext/console): don't depend on globalThis present ( #13387 )
2022-01-17 23:23:49 +01:00
David Sherret
ad224f53c7
chore: upgrade to rust 1.58 ( #13377 )
2022-01-15 07:10:12 +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
Divy Srivastava
919ded1a0b
feat(ext/crypto): implement AES-GCM decryption ( #13319 )
2022-01-14 14:18:53 +05:30
Bartek Iwańczuk
9975ede773
chore: forward v1.17.3 to main ( #13364 )
2022-01-13 20:47:42 +01:00
DjDeveloper
62291e9b0e
feat(ext/ffi): UnsafeFnPointer API ( #13340 )
2022-01-12 12:38:26 +01:00
Leo Kettmeir
f955afc5ea
chore: bump rust-urlpattern to 0.1.3 ( #13328 )
2022-01-11 22:42:58 +01:00
Luca Casonato
f3ece7457a
fix(ext/web): handle no arguments in atob ( #13341 )
2022-01-11 17:31:13 +01:00
DjDeveloper
5680d33dd9
feat(ext/ffi): support alias names for symbol definitions ( #13090 )
2022-01-11 07:21:16 +01:00
Sean Michael Wykes
91f6c5fc7e
feat(ext/crypto): implement AES-KW for wrapKey/unwrapKey ( #13286 )
2022-01-11 10:14:47 +05:30
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
Sean Michael Wykes
59f0eafd19
feat(ext/crypto): JWK support for unwrapKey/wrapKey ( #13261 )
2022-01-07 16:39:01 +05:30
Leo Kettmeir
2067820714
feat(ext/websocket): server automatically handle ping/pong for incoming WebSocket ( #13172 )
2022-01-06 17:41:16 +01:00
Bartek Iwańczuk
46f2ff1205
chore: forward 1.17.2 to main ( #13295 )
2022-01-06 13:20:42 +01:00
Leo Kettmeir
c40419b55b
feat(ext/websocket): add header support to WebSocketStream ( #11887 )
2022-01-05 17:41:44 +01:00
Divy Srivastava
c74eb7a889
feat(ext/crypto): implement AES-GCM encryption ( #13119 )
2022-01-05 20:42:30 +05:30
DjDeveloper
9778545048
fix(ext/ffi): throw errors instead of panic ( #13283 )
2022-01-05 12:55:31 +05:30
Sean Michael Wykes
c4a0a43ce8
fix(ext/crypto) - exportKey JWK for AES/HMAC must use base64url ( #13264 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-01-05 01:00:37 +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
Sean Michael Wykes
340764adec
fix(ext/crypto): use forgiving base64 encoding for JWK ( #13240 )
...
Implements "forgiving" in JWK decode passing suitable config to base64::decode_config
2022-01-03 17:54:45 +05:30
Sean Michael Wykes
9a42d65fc7
feat(ext/crypto): support AES-CTR encrypt/decrypt ( #13177 )
...
Fixes #13201 .
2022-01-03 12:27:28 +01:00
Andreu Botella
0ead12d673
fix(doc): Make private types which show up in the rustdocs public ( #13230 )
...
`CrossIsolateStore`, `ExtensionBuilder` and `InMemoryChannelResource`
are private types which are referred to by other public APIs, and so
don't show up as links in the rustdoc. This is especially confusing for
`ExtensionBuilder`, since there is nothing in the docs that explains how
to build an extension.
Exposing these three types doesn't add any new capabilities:
`ExtensionBuilder` can be created from `Extension::builder()`,
`SharedArrayBufferStore` and `CompiledWasmModuleStore` already enable
doing anything that `CrossIsolateStore` can do by itself, and
`InMemoryChannelResource` isn't constructable.
2021-12-30 02:05:26 +01:00
Sean Michael Wykes
07618c861e
fix(ext/crypto) include AES-CTR for deriveKey ( #13174 )
2021-12-27 08:25:17 -05:00
Zach
de2df20d57
fix(ext/console): map basic css color keywords to ansi ( #13175 )
2021-12-23 13:06:24 +01:00
Bartek Iwańczuk
9391ba1098
chore: merge v1.17.1 into main ( #13184 )
2021-12-22 22:20:17 +01:00
Divy Srivastava
04fe513003
refactor(ext/crypto): cleanup decrypt code ( #13120 )
2021-12-20 16:07:36 +01:00
Leo Kettmeir
ef95d7b1e9
fix(ext/websocket): WebSocketStream don't error with "sending after closing" when closing ( #13134 )
2021-12-20 11:36:46 +01:00
Divy Srivastava
6de53b631f
refactor: use once_cell
instead of lazy_static
( #13135 )
2021-12-18 16:14:42 -05:00
Luke Channings
e5a8588370
fix(ext/ffi): use c_char
instead of i8
for reading strings ( #13118 )
2021-12-17 10:42:45 +01:00
Bartek Iwańczuk
e0cba6b19b
chore: release crates for v1.17.0 ( #13112 )
2021-12-16 18:51:23 +01:00
Sean Michael Wykes
60faf7a0ed
feat(ext/crypto): support importing ECSDA and ECDH ( #13088 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-12-16 17:28:43 +01:00
Andreu Botella
8efe829fca
feat(fetch): support abort reasons in fetch ( #13106 )
2021-12-16 12:58:24 +01:00
Andreu Botella
01a6b66034
feat: support abort reasons in Deno APIs and WebSocketStream
( #13066 )
2021-12-16 12:57:26 +01:00
Luca Casonato
f0e1a6b84c
refactor(ext/crypto): clean up encrypt rust code ( #13094 )
2021-12-15 22:18:26 +01:00
Luca Casonato
ec7d90666f
fix(ext/crypto): various cleanup in JWK imports ( #13092 )
...
This aligns all of the error messages, and makes falsey comparisons
more strict.
2021-12-15 15:46:29 +01:00
Elias Sjögreen
ee49cce726
feat(ext/ffi): implement UnsafePointer and UnsafePointerView ( #12828 )
2021-12-15 15:41:49 +01:00
Ben Noordhuis
4d176b7b7c
fix(ext/net): make unix and tcp identical on close ( #13075 )
...
std/http/server knows how to handle "Listener has been closed"
exceptions but not "operation canceled" errors.
Make "unix" listen sockets throw the same exception as "tcp" listen
sockets when the socket is closed and has a pending accept operation.
There is still a discrepancy when multiple accept requests are posted
but that's probably a less visible issue and something for another day.
Fixes #13033
2021-12-14 23:27:04 +01:00
Luca Casonato
b220a58d1a
feat(ext/crypto): support exporting RSA JWKs ( #13081 )
...
This commit adds support for exporting RSA JWKs in the Web Crypto API.
It also does some minor fixes for RSA JWK imports.
Co-authored-by: Sean Michael Wykes <sean.wykes@nascent.com.br>
2021-12-14 17:02:14 +01:00
Luca Casonato
5fe4d5c818
feat(ext/crypto): support importing RSA JWKs ( #13071 )
...
This commit adds support for importing RSA JWKs in the Web Crypto API.
Co-authored-by: Sean Michael Wykes <sean.wykes@nascent.com.br>
2021-12-14 12:25:07 +01:00
Luca Casonato
8fdade79da
refactor(ext/crypto): generateKey rust cleanup ( #13069 )
2021-12-13 18:45:08 +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
Luca Casonato
5afb2cca65
refactor(ext/crypto): clean up exportKey rust code ( #13052 )
2021-12-13 13:22:03 +01:00
Luca Casonato
cbfc8dd59d
refactor(ext/crypto): symmetric jwk decode in rust ( #13047 )
2021-12-10 22:23:19 +01:00
Andreu Botella
0f0dd5b7ec
feat(ext/web): implement AbortSignal.prototype.throwIfAborted()
( #13044 )
...
See whatwg/dom#1034 .
2021-12-10 15:12:38 +01:00
Luca Casonato
2926827726
refactor(ext/crypto): clean up rust side importKey ( #13036 )
...
This commit cleans up the Rust side of `import_key` by using a bunch of
enums instead of structs with "type" and "data" fields.
This commit does add some duplicated code for the time being, because
a lot of the other ops still need to get the same cleanup treatment.
2021-12-10 15:06:03 +01:00
Kitson Kelly
616ff1d482
chore: place @deprecated
tag after documentation block ( #13037 )
2021-12-10 11:05:50 +11:00
Sean Michael Wykes
0129c74fd9
refactor(ext/crypto): various cleanups in js code ( #13027 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-12-09 23:32:10 +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
Yacine Hmito
a3d024ac2e
feat(crypto): support importKey
in SPKI format ( #12921 )
...
This commit adds support for `spki` key format for `crypto.subtle.importKey` for the RSA* algorithms.
2021-12-09 20:32:55 +01:00
Luca Casonato
e70dc53460
refactor(ext/crypto): de-duplicate copyBuffer code ( #13030 )
...
This commit de-duplicates the buffer copying code in ext/crypto.
Co-authored-by: yacinehmito <yacinehmito@users.noreply.github.com>
2021-12-09 16:50:04 +01:00
Luca Casonato
fce7e4bd31
refactor(ext/crypto): clean up exportKey
logic ( #13029 )
...
This commit de-duplicates and cleans up some logic in `exportKey`. There
are no functional changes in this commit (just moves code around).
2021-12-09 16:47:17 +01:00
Luca Casonato
abd25e5982
refactor(ext/crypto): clean up importKey
logic ( #13028 )
...
This commit de-duplicates and cleans up some logic in `importKey`. There
are no functional changes in this commit (just moves code around).
2021-12-09 16:20:14 +01:00
Yoshiya Hinosawa
69ad5f0e78
feat(ext/timers): add refTimer, unrefTimer API ( #12953 )
2021-12-09 17:00:55 +09:00
Andreu Botella
318f48f9ad
feat(streams): support abort reasons in streams ( #12991 )
2021-12-08 23:31:22 +01:00
Andreu Botella
33da15ae5a
refactor(timers): refactor timers to use one async op per timer ( #12862 )
...
This change also makes the timers implementation closer to the spec, and
sets up the stage to implement AbortSignal.timeout() (whatwg/dom#1032).
Fixes #8965
Fixes #10974
Fixes #11398
2021-12-07 13:39:58 +01:00
Ryan Dahl
a2f1357fe8
chore: upgrade to rustls 0.20 ( #12488 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-12-07 00:48:11 +01:00
Divy Srivastava
d31378726e
feat(ext/crypto): implement unwrapKey ( #12539 )
2021-12-05 04:55:11 +01:00
Bartek Iwańczuk
c59f90d01f
chore: upgrade to Rust 1.57.0 ( #12968 )
2021-12-04 14:19:06 +01:00
Luca Casonato
72e9720e91
chore: merge v1.16.4 into main ( #12984 )
2021-12-04 01:26:54 +01:00
Leo Kettmeir
46794d4e43
refactor(ext/fetch): pass opstate in FetchHandler::fetch_file
2021-12-03 14:25:16 +01:00
Ryan Dahl
14f4102ece
refactor: deno_tls does not depend on reqwest ( #12961 )
2021-12-01 13:20:34 -05:00
Ryan Dahl
084caffc08
refactor: cli doesn't need to depend on deno_tls ( #12952 )
...
also move create_http_client to deno_fetch
2021-12-01 11:13:11 -05:00
Ryan Dahl
f3b74350da
refactor: remove deno_fetch::HttpClientDefaults ( #12931 )
...
More clean up that should have been in cc83ad3
2021-11-29 10:29:41 -05:00
Michael Busby
6c09e02304
feat(ext/net): enable sending to broadcast address ( #12860 )
...
You can now send UDP datagrams to the broadcast address.
2021-11-29 11:14:46 +01:00
Ryan Dahl
cc83ad39ce
refactor: add deno_fetch::Options for init ( #12904 )
...
deno_fetch::init has a lot of parameters and generic on two types
that keeps expanding over time. This refactor adds deno_fetch::Options
struct for more clearly defining the various parameters.
2021-11-28 13:07:03 -05:00
Divy Srivastava
96d02deed6
feat(ext/crypto): support importing exporting AES JWK keys ( #12444 )
2021-11-28 16:48:49 +01:00
Andreu Botella
1974eb1021
fix(websocket): bad rid on WebSocketStream abort( #12913 )
...
Fix a bad resource ID error when aborting a WebSocketStream immediately
after its creation.
2021-11-28 12:25:49 +01:00
Yury Selivanov
1d3f734e18
feat(ext/net): ALPN support in Deno.connectTls()
( #12786 )
2021-11-26 19:59:53 +01:00
Andreu Botella
d763633781
feat(etc/fetch): Support WebAssembly.instantiateStreaming
for file fetches ( #12901 )
...
Fetching of local files, added in #12545 , returns a response with no
headers, including the `Content-Type` header. This currently makes it
not work with the WebAssembly streaming APIs, which require the response
to have a content type of `application/wasm`.
Since the only way to obtain a `Response` object with a non-empty `url`
field is via `fetch()`, this change changes the content type requirement
to only apply to responses whose url has the `file:` scheme.
2021-11-26 19:52:41 +11:00
Luca Casonato
2853e37604
fix(ext/crypto): throw on key & op algo mismatch ( #12838 )
2021-11-25 15:57:01 +01:00
Bert Belder
c6f3493f18
chore: merge v1.16.3 into main ( #12892 )
2021-11-24 15:56:18 -08:00
Luca Casonato
2eae1ae665
revert: store header keys lower case internally ( #12837 )
...
This reverts commit 49ec3d10ad
.
2021-11-23 01:23:11 +01:00
Luca Casonato
71ceca0ffc
fix(ext/crypto): don't panic on decryption failure ( #12840 )
2021-11-22 23:58:21 +01:00
Bert Belder
6a797f7ba9
chore(ext/http): deno fmt ( #12798 )
2021-11-17 15:34:41 -08:00
David Sherret
cd61cedd19
chore: bump crates for 1.16.2 ( #12792 )
2021-11-17 10:14:23 -05:00
Ryan Dahl
b2036a4db7
refactor: re-export anyhow from deno_core ( #12777 )
2021-11-16 09:02:28 -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
upendra1997
e00bfecf96
fix(crypto): handling large key length in HKDF ( #12692 )
2021-11-11 10:04:17 +01:00
Bert Belder
72a6231a61
refactor(ext/http): rewrite hyper integration and fix bug ( #12732 )
...
Fixes: #12193
Fixes: #12251
Closes: #12714
2021-11-10 14:51:43 -08:00
Aaron O'Mullan
375ce63c63
feat(core): streams ( #12596 )
...
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-09 19:26:17 +01:00
Luca Casonato
4f64acd4e4
chore: bump crate versions for 1.16.0 ( #12706 )
2021-11-09 13:03:17 +01:00
Luca Casonato
0de6d1edc4
fix(fetch): set content-length for empty POST/PUT ( #12703 )
...
This commit changes `fetch` to set `content-length: 0` on POST and PUT
requests with no body.
2021-11-09 12:10:40 +01:00
Luca Casonato
75793baae8
Revert "refactor(ext/http): rewrite hyper integration and fix bug ( #12332 )" ( #12704 )
...
This reverts commit 5b1e537446
.
2021-11-09 12:10:21 +01:00
Luca Casonato
66974a8794
fix(ext/net): expose all tls ops ( #12699 )
...
This makes it possible for implementers to cherry-pick which ops they
want to use.
2021-11-09 02:07:12 +01:00
Leo Kettmeir
ccd730a8b7
feat(ext/web): add AbortSignal.reason
( #12697 )
2021-11-08 23:37:06 +01:00
Bert Belder
5b1e537446
refactor(ext/http): rewrite hyper integration and fix bug ( #12332 )
...
Fixes: #12193
2021-11-08 12:49:11 -08: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
Kitson Kelly
d3662e487d
feat(ext/fetch): support fetching local files ( #12545 )
...
Closes #11925
Closes #2150
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2021-11-01 15:29:46 +11:00
Aaron O'Mullan
e98a36b213
cleanup(ext/fetch): consistent op names ( #12612 )
...
Rename `op_create_http_client` to `op_fetch_custom_client` to follow prefix/namespaced convention
2021-10-31 19:14:22 +01:00
Kenta Moriuchi
95b9e5f30f
feat(ext/console): Display error.cause in console ( #12462 )
2021-10-30 19:25:46 +02:00
Aaron O'Mullan
94a81e5e9b
cleanup(ext/net): consistent op names ( #12607 )
2021-10-30 18:51:42 +02:00
Luca Casonato
b7341438f2
feat: stabilize Deno.startTls ( #12581 )
...
This commit stabilizes `Deno.startTls` and removes `certFile` from the
`StartTlsOptions`.
2021-10-29 17:13:31 +02:00
Malted
8e0fd1dca1
fix(ext/fetch): Replace redundant local variable with inline return statement ( #12583 )
2021-10-29 13:42:10 +02: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
Kitson Kelly
1c739470b5
feat(ext/webstorage): use implied origin when --location not set ( #12548 )
...
Closes #11882
BREAKING CHANGE: Previously when `--location` was set, the unique storage key was derived from the the URL of the location instead of just the origin. This change correctly uses just the origin. This may cause previously persisted storage to change its key and data to not be available with the same location as before.
2021-10-27 11:10:27 +11:00
Leo K
6268703487
fix(ext/http): allow multiple values in upgrade header for websocket ( #12551 )
...
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2021-10-26 23:06:44 +02:00
Ryan Dahl
9161e74a7d
Use libffi-rs instead of deno-libffi ( #12555 )
...
Fork is no longer necessary since https://github.com/tov/libffi-rs/pull/33
landed.
2021-10-26 16:30:27 -04:00