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

586 commits

Author SHA1 Message Date
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