Filip Skokan
aa710aac98
fix(ext/crypto): ecdh spki key import/export roundtrip ( #16152 )
2022-10-04 17:09:41 +05:30
Filip Skokan
fd08b13dff
fix(ext/crypto): ECDH and X25519 non byte length and 0 length fixes ( #16146 )
2022-10-04 16:54:05 +05:30
Aurélien Bertron
8d20784f7a
fix(ext/crypto): deriveBits for ECDH not taking length into account ( #16128 )
...
Fixes #16047
2022-10-03 23:10:34 -07:00
Filip Skokan
7742ad77fa
fix(ext/crypto): curve25519 import export ( #16140 )
2022-10-03 23:06:25 -07:00
Bartek Iwańczuk
5b097fd7e5
fix(npm): better error is version is specified after subpath ( #16131 )
2022-10-03 19:10:53 +02:00
Marcos Casagrande
d13c88e70d
refactor(ext/fetch): avoid extra headers copy in .clone ( #16130 )
2022-10-03 13:34:13 +02:00
Satya Rohith
eacd6a7f29
chore(ext/cache): make helper functions public ( #16117 )
2022-10-03 10:52:54 +05:30
Marcos Casagrande
e2990be264
fix(ext/cache): close resource on error ( #16129 )
2022-10-03 09:48:59 +05:30
李瑞丰
b3444e0d3b
fix(ext/crypto): fix importKey error when leading zeroes ( #16009 )
...
Co-authored-by: Jason <m.jason.liu@outlook.com>
2022-10-03 09:37:25 +05:30
Marcos Casagrande
a55b194638
fix(ext/cache): acquire reader lock before async op ( #16126 )
2022-10-02 01:21:48 +02:00
Colin Ihrig
636b448f3c
fix(ext/crypto): use correct handle for public keys ( #16099 )
...
When storing public and private keys in the key store, use a different
handle for each key so that they can be looked up in the future.
Refs: https://github.com/denoland/deno/pull/14119
Refs: https://github.com/denoland/deno_std/issues/2631
2022-09-30 09:18:30 -04:00
Luca Casonato
20c7300412
refactor(ext/http): remove op_http_read ( #16096 )
...
We can use Resource::read_return & op_read instead. This allows HTTP
request bodies to participate in FastStream.
To make this work, `readableStreamForRid` required a change to allow non
auto-closing resources to be handled. This required some minor changes
in our FastStream paths in ext/http and ext/flash.
2022-09-30 07:54:12 +02:00
Luca Casonato
38f544538b
fix(runtime): no FastStream for unrefable streams ( #16095 )
2022-09-30 00:42:33 +02:00
Marcos Casagrande
927f4e2e83
fix(ext/fetch): Body#bodyUsed
for static body ( #16080 )
...
This fixes a bug where `Body#bodyUsed` incorrectly returns `false`
for a body that has actually already been consumed, after `Body#body`
is called.
2022-09-29 17:38:04 +02:00
Agustin Casagrande
16bc9b16d2
refactor(ext/cache): remove extra headers iteration in cache.put ( #16078 )
2022-09-29 10:34:45 +05:30
denobot
d8827514ff
1.26.0
...
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-29 00:10:44 +02:00
Divy Srivastava
e2828ad762
fix(ext/flash): reregister socket on partial read on Windows ( #16076 )
2022-09-28 20:52:24 +02:00
Divy Srivastava
e64af6260a
feat(ext/flash): add reuseport
option on Linux ( #16022 )
2022-09-28 23:16:29 +05:30
Satya Rohith
b312279e58
feat: implement Web Cache API ( #15829 )
2022-09-28 17:41:12 +05:30
Bartek Iwańczuk
212b7dd6da
feat: Add requesting API name to permission prompt ( #15936 )
...
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-09-27 22:36:33 +02:00
Satya Rohith
7a47321b09
fix(ext/fetch): blob url ( #16057 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-27 22:07:46 +05:30
Divy Srivastava
f02f2425d5
feat(ext/crypto): add x25519 and Ed25519 CFRG curves ( #14119 )
2022-09-27 17:43:42 +05:30
Marcos Casagrande
c7dd842f84
perf(ext/fetch): use content-length in InnerBody.consume ( #15925 )
...
This fast path prevents repeated allocations when receiving a fetch body with a known size.
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-26 20:27:50 +02:00
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