Bartek Iwańczuk
6c179daff0
fix(npm): recursive translation of reexports, remove window global in node code ( #15806 )
...
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-08 22:01:48 +02:00
Leo Kettmeir
93cbac69e8
chore: update url crate to 2.3.1 ( #15818 )
2022-09-08 19:04:59 +02:00
Divy Srivastava
027d4d433d
perf(ops): inline &[u8] arguments and enable fast API ( #15731 )
2022-09-07 16:21:47 +05:30
Divy Srivastava
d57f9d560d
fix(ext/flash): use utf8 length as Content-Length ( #15793 )
2022-09-07 16:21:30 +05:30
Arnau Orriols
8bdc3c2baf
feat(ext/ffi): Implement FFI fast-call trampoline with Dynasmrt ( #15305 )
2022-09-07 12:23:56 +05:30
Divy Srivastava
d2a408f452
perf(runtime): short-circuit queue_async_op
for Poll::Ready ( #15773 )
2022-09-06 23:08:37 +05:30
Bartek Iwańczuk
f2448c5de2
fix(npm): conditional exports in npm: specifiers ( #15778 )
2022-09-06 12:56:34 +02:00
Bartek Iwańczuk
264ad49e18
refactor: cleanup Node compatibility code ( #15766 )
...
- move errors related to Node compat from cli/node/errors.rs to "ext/node" crate
- remove dependency on "node_resolver" crate
- make some of structures private to the "cli/node" module
2022-09-05 12:36:35 +02:00
Aapo Alasuutari
16dbf4adc3
feat(ext/ffi): Support bool FFI type ( #15754 )
2022-09-05 08:56:52 +05:30
Bartek Iwańczuk
e324151520
BREAKING(unstable): remove --compat mode ( #15678 )
...
This commit removes "compat" mode. We shipped support for "npm:" specifier
support in v1.25 and that is preferred way to interact with Node code that we
will iterate and improve upon.
2022-09-03 18:19:30 +02:00
Garcia
4ec213b0aa
fix(ext/timers): create primordial eval
( #15110 )
2022-09-02 17:55:44 +02:00
Jason
8178665bd1
fix(cli/repl): await Promise.any([])... ( #15623 )
2022-09-02 13:38:06 +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
20c835407c
fix(ext/flash): retry write failures ( #15591 )
2022-09-01 18:58:34 +05:30
Divy Srivastava
0abf5a412b
perf(ext/web): flatten op arguments for text_encoding ( #15723 )
2022-09-01 16:21:13 +05:30
Bartek Iwańczuk
b8933b1b56
chore: upgrade httparse to 1.8 ( #15699 )
2022-08-31 11:24:38 +02:00
David Sherret
5f251b283b
fix(npm): prefer importing esm from esm ( #15676 )
2022-08-30 14:09:22 -04:00
Leo Kettmeir
f3a0e48d4e
fix(docs): add missing categories ( #15684 )
2022-08-30 13:16:56 +02:00
Danny Povolotski
5e0fa5dd88
fix(ext/websocket): fix closing of WebSocketStream with unread messages ( #15632 )
2022-08-30 03:43:17 +02:00
Bartek Iwańczuk
a938aaf36f
fix(ext/node): better error for importing ES module via require() call ( #15671 )
2022-08-29 19:48:27 +02:00
Bartek Iwańczuk
2851a98072
fix(npm): conditional exports with wildcards ( #15652 )
2022-08-29 19:15:20 +02:00
pk
829bbad13f
chore(ext/flash): typo in lib.rs
( #15662 )
...
'Syncrhonous' -> 'Synchronous'
2022-08-29 12:14:43 +05:30
Divy Srivastava
d8396225c4
perf: use fast api for op_now ( #15643 )
2022-08-28 12:21:49 +05:30
Satya Rohith
19fb9abe33
chore(ext/webstorage): upgrade rusqlite to 0.28.0 ( #15638 )
2022-08-27 19:48:59 +05:30
Yoshiya Hinosawa
9b324b1cf4
fix(ext/node): fix global in node env ( #15622 )
2022-08-26 23:39:05 +09:00
Bartek Iwańczuk
da10c9c8d1
fix(ext/flash): panic on AddrInUse ( #15607 )
2022-08-26 08:42:11 +05:30
David Sherret
376665d115
fix: avoid global declaration collisions in cjs ( #15608 )
...
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-25 20:24:18 -04:00
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