1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 18:17:48 -05:00
Commit graph

1057 commits

Author SHA1 Message Date
Yoshiya Hinosawa
e75ed2e48b
fix lint 2024-10-29 23:02:35 +09:00
Yoshiya Hinosawa
3a4de2eb82
access to internalRid via kStreamBaseField as it could be swapped to TlsConn in afterConnect of tls.connect 2024-10-29 22:51:42 +09:00
Yoshiya Hinosawa
eaa52272ee
Merge branch 'main' into support_create_connection 2024-10-29 20:25:28 +09:00
Bartek Iwańczuk
46e5ed1a64
Revert "fix(ext/node): use primordials in ext/node/polyfills/https.ts (#26323)" (#26613)
…s` (#26323)"

This reverts commit afb33b3c25.

Reverting because it caused a regression -
https://github.com/denoland/deno/issues/26612.

Closes https://github.com/denoland/deno/issues/26612.
2024-10-29 00:41:02 +00:00
snek
4e38fbd0a3
fix: report exceptions from nextTick (#26579)
Fixes: https://github.com/denoland/deno/issues/24713
Fixes: https://github.com/denoland/deno/issues/25855
2024-10-28 18:16:43 +01:00
Satya Rohith
862e6b37a6
Merge branch 'main' into support_create_connection 2024-10-27 23:55:59 +05:30
Satya Rohith
722363b6f3
refactor: use concrete error types 2024-10-27 23:54:22 +05:30
Satya Rohith
2ee82caba1
refactor: remove public rid property 2024-10-27 23:31:49 +05:30
familyboat
c314b2d857
fix(ext/node): add path to fs.stat and fs.statSync error (#26037) 2024-10-27 08:34:35 +05:30
Mayank Kumar
793b155cd3
fix(ext/node): use primordials in ext\node\polyfills\internal\crypto\_randomInt.ts (#26534)
Towards #24236
2024-10-26 19:42:14 +02:00
Bartek Iwańczuk
730331622e
chore: forward v2.0.3 commit to main (#26535)
Forwarding v2.0.3 commit to `main`

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-10-25 09:57:40 -04:00
Satya Rohith
5b4d328624
remove stale logs
Signed-off-by: Satya Rohith <me@satyarohith.com>
2024-10-25 14:40:17 +05:30
Satya Rohith
85f39372d1
Revert "remove npm agent code"
This reverts commit 7cf82b7af4.
2024-10-25 14:39:43 +05:30
Satya Rohith
7cf82b7af4
remove npm agent code
Signed-off-by: Satya Rohith <me@satyarohith.com>
2024-10-25 14:21:58 +05:30
Yoshiya Hinosawa
8e55dab349
avoid startTls workaround 2024-10-25 17:06:01 +09:00
Yoshiya Hinosawa
2b2d9d9be2
add comment 2024-10-25 15:18:19 +09:00
Yoshiya Hinosawa
91904db2a7
remove unnecessary if check 2024-10-25 15:18:03 +09:00
Yoshiya Hinosawa
795c093135
fmt 2024-10-25 14:47:35 +09:00
Yoshiya Hinosawa
9c09c1d889
workaround for https request from make-fetch-happen (@npmcli/agent) 2024-10-25 14:43:54 +09:00
Yoshiya Hinosawa
d777191e33
remove workaround using linsterCount as it didn't work.
Instead use workaround reading callstack in `connect()` call and
pause the socket when it's from @npmcli/agent. This prevents the
undesirable initial read of the socket.
2024-10-25 13:06:28 +09:00
Nicola Bovolato
8dd6177c62
fix(ext/node): refactor http.ServerResponse into function class (#26210)
While testing, I found out that light-my-request relies on
`ServerResponse.connection`, which is deprecated, so I added that and
`socket`, the non deprecated property.

It also relies on an undocumented `_header` property, apparently for
[raw header
processing](https://github.com/fastify/light-my-request/blob/v6.1.0/lib/response.js#L180-L186).
I added it as an empty string, feel free to provide other approaches.

Fixes #19901

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-25 00:02:26 +02:00
Leo Kettmeir
c71e020668
refactor(ext/node): use concrete error types (#26419) 2024-10-24 10:45:17 -07:00
Yoshiya Hinosawa
8ece841314
support once listener 2024-10-25 01:12:59 +09:00
Yoshiya Hinosawa
c47898e2b1
A potential fix for @npmcli/agent issue
If there's no listener for reading events to socket, then
do not eagerly start reading the TcpConn.
2024-10-25 00:17:16 +09:00
Marvin Hagemeister
ef53ce3ac4
fix(node/util): support array formats in styleText (#26507)
We missed adding support for an array of formats being passed to
`util.styleText`.

Fixes https://github.com/denoland/deno/issues/26496
2024-10-24 11:46:51 +02:00
Yoshiya Hinosawa
c1054b88b2
Merge branch 'main' into support_create_connection 2024-10-24 14:36:55 +09:00
Nathan Whitaker
27df42f659
fix(ext/node): cancel pending ipc writes on channel close (#26504)
Fixes the issue described in
https://github.com/denoland/deno/issues/23882#issuecomment-2423316362.

The parent was starting to send a message right before the process would
exit, and the channel closed in the middle of the write. Unlike with
reads, we weren't cancelling the pending writes, which resulted in a
`Broken pipe` error surfacing to the user.
2024-10-24 04:50:35 +00:00
Satya Rohith
92ed4d38db
fix(node:tls): set TLSSocket.alpnProtocol for client connections (#26476)
Towards https://github.com/denoland/deno/issues/26127
2024-10-23 07:47:43 +00:00
Yoshiya Hinosawa
285635daa6
fix(ext/node): map ERROR_INVALID_NAME to ENOENT on windows (#26475)
In libuv on windows, `ERROR_INVALID_NAME` is mapped to `ENOENT`, but it
is mapped to `EINVAL` in our compat implementation, which causes the
issue #24899.

ref:
d4ab6fbba4/src/win/error.c (L138)

closes #24899 
closes #26411
closes #23635
closes #21165
closes #19067
2024-10-23 11:28:04 +09:00
jiang1997
afb33b3c25
fix(ext/node): use primordials in ext/node/polyfills/https.ts (#26323)
Towards https://github.com/denoland/deno/issues/24236
2024-10-21 09:50:53 +02:00
Satya Rohith
f62bb6ff1b
Merge branch 'main' into support_create_connection 2024-10-20 05:52:02 +05:30
Divy Srivastava
0710af034f
perf: avoid multiple calls to runMicrotask (#26378)
Improves HTTP throughput by 8-9k rps on Linux:

this patch
```
Requests/sec: 145001.69
Transfer/sec:     20.74MB
```

main
```
Requests/sec: 137866.61
Transfer/sec:     19.72MB
```

The improvements comes from the reduced number of calls to
`op_run_microtask` per request. Returning `true` from a macrotask
callback already calls `op_run_microtask` so the extra call was
redundant.

Here's `--strace-ops` output for a single request:

main
```
[     4.667] op_http_wait                                       : CompletedAsync Async
[     4.667] op_run_microtasks                                  : Dispatched Slow
[     4.668] op_http_try_wait                                   : Dispatched Slow
[     4.668] op_http_try_wait                                   : Completed Slow
[     4.668] op_http_wait                                       : Dispatched Async
[     4.668] op_http_set_response_header                        : Dispatched Slow
[     4.668] op_http_set_response_header                        : Completed Slow
[     4.669] op_http_set_response_body_text                     : Dispatched Slow
[     4.669] op_http_set_response_body_text                     : Completed Slow
[     4.669] op_run_microtasks                                  : Completed Slow
[     4.669] op_has_tick_scheduled                              : Dispatched Slow
[     4.669] op_has_tick_scheduled                              : Completed Slow
[     4.669] op_run_microtasks                                  : Dispatched Slow
[     4.669] op_run_microtasks                                  : Completed Slow
[     4.669] op_run_microtasks                                  : Dispatched Slow
[     4.669] op_run_microtasks                                  : Completed Slow
```

this pr
```
[     3.726] op_http_wait                                       : CompletedAsync Async
[     3.727] op_run_microtasks                                  : Dispatched Slow
[     3.727] op_http_try_wait                                   : Dispatched Slow
[     3.727] op_http_try_wait                                   : Completed Slow
[     3.727] op_http_wait                                       : Dispatched Async
[     3.727] op_http_set_response_header                        : Dispatched Slow
[     3.728] op_http_set_response_header                        : Completed Slow
[     3.728] op_http_set_response_body_text                     : Dispatched Slow
[     3.728] op_http_set_response_body_text                     : Completed Slow
[     3.728] op_run_microtasks                                  : Completed Slow
[     3.728] op_run_microtasks                                  : Dispatched Slow
[     3.728] op_run_microtasks                                  : Completed Slow
```
2024-10-19 08:42:59 +05:30
Leo Kettmeir
6c4ef11f04
refactor(ext/fetch): use concrete error types (#26220) 2024-10-19 01:20:58 +00:00
Nathan Whitaker
d48434e91f
fix(ext/node): stub HTTPParser internal binding (#26401)
Fixes https://github.com/denoland/deno/issues/26394.
2024-10-18 21:39:32 +00:00
Nathan Whitaker
1bccf45ecb
fix(ext/node): properly map reparse point error in readlink (#26375) 2024-10-18 10:11:06 -07:00
Satya Rohith
f32d070c12
enable websocket tests 2024-10-18 16:18:15 +05:30
Yoshiya Hinosawa
765c481cb8
Merge branch 'main' into support_create_connection 2024-10-18 16:17:15 +09:00
denobot
3ae10a01e0
chore: forward v2.0.2 release commit to main (#26376)
This is the release commit being forwarded back to main for 2.0.2

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-18 03:12:49 +02:00
Bartek Iwańczuk
8f3eb9d0e7
fix(ext/node): add null check for kStreamBaseField (#26368)
It's not guaranteed that `kStreamBaseField` is not undefined, so
added a check for it.

Closes https://github.com/denoland/deno/issues/26363
2024-10-17 22:57:05 +00:00
Nathan Whitaker
9fde5cb5e0
fix(node/fs): copyFile with COPYFILE_EXCL should not throw if the destination doesn't exist (#26360)
Fixes #26313.

We were checking for the NotFound error, but still calling the callback
with the error / throwing.
2024-10-17 19:51:15 +00:00
Satya Rohith
996eec1276
remove stale code 2024-10-18 00:08:14 +05:30
Satya Rohith
a3c6964bd9
fix flow control 2024-10-17 23:44:16 +05:30
Satya Rohith
8c0f6b02c2
chore: make race condition more visible by removing op_node_http_wait_for_connection 2024-10-17 20:53:49 +05:30
Yoshiya Hinosawa
d6af2c918c
Merge branch 'main' into support_create_connection
Signed-off-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-10-17 22:18:36 +09:00
Yoshiya Hinosawa
781eb00dfe
fix race condition of _bodyWriter creation and end() call 2024-10-17 22:12:07 +09:00
Nathan Whitaker
a61ba3c699
fix(net): don't try to set nodelay on upgrade streams (#26342)
Fixes https://github.com/denoland/deno/issues/26341.

We try to call `op_set_nodelay` on an `UpgradeStream`, which doesn't
support that operation.
2024-10-17 03:56:57 +00:00
Yoshiya Hinosawa
33a852ea2b
fix lint errors 2024-10-17 12:33:11 +09:00
Yoshiya Hinosawa
50e66dacfa
fmt 2024-10-17 12:23:04 +09:00
Yoshiya Hinosawa
4915f342b0
remove debugs 2024-10-17 12:15:27 +09:00
Yoshiya Hinosawa
16be0202ca
Merge branch 'main' into support_create_connection
Signed-off-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-10-17 12:00:57 +09:00