Bartek Iwańczuk
075bdfd621
fix(require): tryPackage uses optional chaining ( #16020 )
2022-09-26 17:39:03 +02:00
李瑞丰
a2262c11d7
fix(ext/console): fix error when logging a proxied Date ( #16018 )
2022-09-26 23:55:58 +09:00
Marcos Casagrande
b73cb7bf9c
perf(ext/console): break on iterableLimit & better sparse array handling ( #15935 )
2022-09-26 15:55:22 +09:00
Ikko Ashimine
9a9dd12253
chore(ext/crypto): fix typo in import_key.rs ( #16012 )
...
eliptic -> elliptic
2022-09-24 11:46:52 +05:30
David Sherret
1b04ff0782
chore: forward v1.25.4 release commit to main ( #16001 )
2022-09-22 15:58:43 -04:00
David Sherret
716005a0d4
feat(npm): add flag for creating and resolving npm packages to a local node_modules folder ( #15971 )
2022-09-22 11:17:02 -04:00
Aapo Alasuutari
707e9e3580
feat(ops): Automatic fast ops creation ( #15527 )
2022-09-22 10:05:24 +05:30
Bartek Iwańczuk
35fe9ee530
fix(flash): panic if response if undefined ( #15964 )
...
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-09-20 22:08:15 +02:00
Vicary A
2929ec9ffa
fix(ext/webgpu): make GPUDevice.features SetLike ( #15853 )
2022-09-20 03:43:32 +02:00
Ben Noordhuis
b1b418b81a
chore: fix clippy warnings ( #15944 )
...
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.
In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.
IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
2022-09-19 10:25:03 +02:00
Yoshiya Hinosawa
d7b27ed63b
fix(ext/node): fix builtin module module ( #15904 )
2022-09-17 20:35:32 +09:00
Divy Srivastava
5fe660ecd7
perf(web): optimize encodeInto() ( #15922 )
2022-09-17 16:48:15 +05:30
Marcos Casagrande
513e934fa7
refactor(ext/node): use primordials ( #15912 )
2022-09-17 12:35:04 +05:30
Ryan Dahl
684841a18c
upgrade deps ( #15914 )
2022-09-16 19:11:30 -04:00
Colin Ihrig
ee208c1b20
chore: forward v1.25.3 release commit to main ( #15919 )
...
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-09-15 16:24:06 -04:00
Colin Ihrig
19deec4494
fix(ops): add node.js env variable allowlist ( #15893 )
...
This commit allows the Node compatibility layer to skip
environment variable permission checks when --unstable
is passed and the variable name is one that Node uses.
Fixes: https://github.com/denoland/deno/issues/15890
2022-09-14 11:59:20 -04:00
Divy Srivastava
b26d0b8a03
fix(ext/flash): don't block requests ( #15852 )
2022-09-13 22:24:27 +05:30
David Sherret
73efed218f
refactor(npm): create general use NpmPackageResolver
( #15882 )
2022-09-13 11:59:01 -04:00
David Sherret
98454c1eb8
fix(npm): support cjs resolution of package subpath with package.json ( #15855 )
2022-09-12 15:47:54 -04:00
Andrew Johnston
6d8f6d5af0
perf(url): return early if url has no query string ( #15856 )
2022-09-11 08:40:06 +05:30
Divy Srivastava
a3df6bb344
perf(ext/flash): remove string->buffer cache ( #15850 )
2022-09-10 21:53:00 +05:30
David Sherret
3b0de03b59
fix(npm): remove export binding to match node ( #15837 )
2022-09-10 11:38:11 -04:00
Divy Srivastava
a54d5654a2
perf: optimize URL serialization ( #15663 )
2022-09-10 09:15:16 +05:30
denobot
3bce2af0eb
chore: forward v1.25.2 release commit to main ( #15831 )
...
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-09-09 20:31:43 +09:00
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
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