Daniel Mizerski
687ae870d1
fix(ext/node): add stubbed process.report ( #21373 )
...
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-12-01 15:36:11 +09:00
Yoshiya Hinosawa
3591ba8578
fix(ext/node): fix os.freemem ( #21347 )
2023-11-30 22:06:01 +09:00
David Sherret
d4ef471744
fix(node): spawnSync
's status
was incorrect ( #21359 )
...
The exit code wasn't hooked up properly.
2023-11-27 19:54:01 -05:00
Yoshiya Hinosawa
7d8f0ae038
chore(ext/node): remove unnecessary test case ( #21337 )
...
This test case is covered by the last case in
5710fffb12/cli/tests/node_compat/test/parallel/test-stream2-transform.js
and not necessary anymore.
2023-11-25 12:20:47 +09:00
Bartek Iwańczuk
998d9061ef
chore: deflake unit_node/crypto/crypto_key_test.ts ( #21331 )
...
Ref https://github.com/denoland/deno/issues/21187
On CI we are going to run only fast tests, with an option to
pass `SLOW_TESTS=1` env var to enable more comprehensive tests.
2023-11-24 12:56:05 -07:00
Yoshiya Hinosawa
bf42467e21
fix(ext/node): fix node:stream.Writable ( #21297 )
...
This change applies the same fix as
https://github.com/nodejs/node/pull/46818 , and the original example
given in #20456 works as expected.
closes #20456
2023-11-23 09:57:05 +09:00
Asher Gomez
616354e76c
refactor: replace deferred()
from std/async
with Promise.withResolvers()
( #21234 )
...
Closes #21041
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-22 12:11:20 +01:00
Bartek Iwańczuk
0ffcb46e0f
Revert "chore: update to std@0.207.0
( #21284 )" ( #21295 )
...
This reverts commit 20aa0796e6
.
`main` has been failing consistenly on `kv_undelivered_test` and
`serve_test` after this upgrade.
2023-11-22 04:13:56 +00:00
Asher Gomez
20aa0796e6
chore: update to std@0.207.0
( #21284 )
...
Closes #21002
2023-11-22 02:03:03 +01:00
Divy Srivastava
c97a97240b
fix(ext/node): handle closing process.stdin more than once ( #21267 )
...
Fixes https://github.com/denoland/deno/issues/21112
Aligns more towards what Node.js does. Closing stdin more than once is a
nop.
2023-11-20 18:57:18 +05:30
Bartek Iwańczuk
cf6673b23d
fix(ext/node): add APIs perf_hook.performance ( #21192 )
...
Required for Next.js.
2023-11-14 16:33:09 +05:30
Jacob Hummer
b2e3389a6a
fix(node/http): export globalAgent ( #21081 )
...
Fixes #21080
Fixes #18312
---------
Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-11 10:13:30 +05:30
Divy Srivastava
df14835b83
fix(ext/node): implement process.geteuid ( #21151 )
...
Fixes #21097
2023-11-10 11:49:57 -07:00
Bartek Iwańczuk
612b7dfcc7
fix(node/child_process): properly normalize stdio for 'spawnSync' ( #21103 )
...
Closes https://github.com/denoland/deno/issues/20782
2023-11-10 05:59:39 +00:00
Divy Srivastava
c4029f6af2
fix(node): implement createPrivateKey ( #20981 )
...
Towards #18455
2023-11-09 23:26:59 +05:30
Gasman
837c870ff4
fix(node/http): socket.setTimeout ( #20930 )
...
Fixes #20923
2023-11-07 00:51:14 +01:00
Kenta Moriuchi
90189dd997
fix(ext): use String#toWellFormed
in ext/webidl and ext/node ( #21054 )
...
Fixes #18802
This PR adds `util.toUSVString` to node:util:
```js
import util from "node:util";
util.toUSVString("string\ud801"); // => "string\ufffd"
```
2023-11-06 22:18:28 +01:00
Kenta Moriuchi
841f215fd4
fix(ext/node): adapt dynamic type checking to Node.js behavior ( #21014 )
2023-11-01 16:06:25 +09:00
Bartek Iwańczuk
e7abb705f9
Revert "chore: update deno_std submodule ( #20994 )" ( #21001 )
...
This reverts commit 6e2abb2b13
.
2023-10-28 01:24:37 +00:00
Bartek Iwańczuk
6e2abb2b13
chore: update deno_std submodule ( #20994 )
2023-10-27 10:34:30 -04:00
sigmaSd
9f9c3d9048
fix(polyfill): correctly handle flag when its equal 0 ( #20953 )
...
Fixes https://github.com/denoland/deno/issues/20910
2023-10-22 08:02:55 +00:00
Bartek Iwańczuk
5095af7801
fix(ext/node): process.argv0 ( #20925 )
...
Fixes https://github.com/denoland/deno/issues/20924
2023-10-18 01:51:39 +02:00
Bartek Iwańczuk
cee221109a
fix(node/http2): fixes to support grpc ( #20712 )
...
This commit improves "node:http2" module implementation, by enabling
to use "options.createConnection" callback when starting an HTTP2
session.
This change enables to pass basic client-side test with "grpc-js/grpc"
package.
Smaller fixes like "Http2Session.unref()" and "Http2Session.setTimeout()"
were handled as well.
Fixes #16647
2023-10-12 14:03:19 +00:00
Divy Srivastava
ab3c9d41e4
fix(ext/node): implement uv.errname ( #20785 )
...
Fixes https://github.com/denoland/deno/issues/20617
2023-10-05 18:27:20 +00:00
Luca Casonato
d5b6c636b0
fix(ext/node): don't call undefined nextTick fn ( #20724 )
...
The `process` global is not defined in this file.
Fixes #20441
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-02 14:13:57 +02:00
Divy Srivastava
75a724890d
fix(node): supported arguments to randomFillSync
( #20637 )
...
Fixes https://github.com/denoland/deno/issues/20634
2023-09-23 10:04:55 +02:00
Luca Casonato
430b63c2c4
perf: improve async op santizer speed and accuracy ( #20501 )
...
This commit improves async op sanitizer speed by only delaying metrics
collection if there are pending ops. This
results in a speedup of around 30% for small CPU bound unit tests.
It performs this check and possible delay on every collection now,
fixing an issue with parent test leaks into steps.
2023-09-16 07:48:31 +02:00
Bartek Iwańczuk
5a1505db67
feat(ext/node): http2.connect() API ( #19671 )
...
This commit improves compatibility of "node:http2" module by polyfilling
"connect" method and "ClientHttp2Session" class. Basic operations like
streaming, header and trailer handling are working correctly.
Refing/unrefing is still a TODO and "npm:grpc-js/grpc" is not yet working
correctly.
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-09-15 21:51:25 +02:00
Curran McConnell
a9cc4631ca
fix(ext/node/ops/zlib/brotli): Allow decompressing more than 4096 bytes ( #20301 )
...
Fixes https://github.com/denoland/deno/issues/19816
In that issue, I suggest switching over the other brotli functionality
to the Rust API provided by the `brotli` crate. Here, I only do that
with the `brotli_decompress` function to fix the bug with buffers longer
than 4096 bytes.
2023-09-08 09:11:33 +05:30
Divy Srivastava
9befa566ec
fix(ext/node): implement AES GCM cipher ( #20368 )
...
Adds support for AES-GCM 128/256 bit keys in `node:crypto` and
`setAAD()`, `setAuthTag()` and `getAuthTag()`
Uses https://github.com/littledivy/aead-gcm-stream
Fixes https://github.com/denoland/deno/issues/19836
https://github.com/denoland/deno/issues/20353
2023-09-06 11:01:50 +05:30
zuisong
4a561f12db
fix(node/child_process): don't crash on undefined/null value of an env var ( #20378 )
...
Fixes #20373
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-05 12:42:35 +02:00
Bartek Iwańczuk
2929313652
fix(node/http): don't leak resources on destroyed request ( #20040 )
...
Closes https://github.com/denoland/deno/issues/19828
2023-08-29 12:13:58 +00:00
Yoshiya Hinosawa
fb7092fb43
fix(ext/node): fix argv[1] in Worker ( #20305 )
2023-08-29 12:18:25 +09:00
Matt Mastracci
7adaf613bf
fix(ext/node): shared global buffer unlock correctness fix ( #20314 )
...
The fix for #20188 was not entirely correct -- we were unlocking the
global buffer incorrectly. This PR introduces a lock state that ensures
we only unlock a lock we have taken out.
2023-08-28 15:28:39 -06:00
Divy Srivastava
1cb547d885
fix(node): propagate create cipher errors ( #20280 )
...
Fixes https://github.com/denoland/deno/issues/19002
2023-08-26 10:45:37 +05:30
Matt Mastracci
c37b9655b6
fix(ext/node): simultaneous reads can leak into each other ( #20223 )
...
Reported in #20188
This was caused by re-use of a global buffer `BUF` during simultaneous
async reads.
2023-08-22 14:45:10 +00:00
Bartek Iwańczuk
a48ec1d563
fix(node/http): emit error when addr in use ( #20200 )
...
Closes https://github.com/denoland/deno/issues/20186
2023-08-18 13:48:18 +02:00
Matt Mastracci
23ff0e722e
feat(ext/web): resourceForReadableStream ( #20180 )
...
Extracted from fast streams work.
This is a resource wrapper for `ReadableStream`, allowing us to treat
all `ReadableStream` instances as resources, and remove special paths in
both `fetch` and `serve`.
Performance with a ReadableStream response yields ~18% improvement:
```
return new Response(new ReadableStream({
start(controller) {
controller.enqueue(new Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]));
controller.close();
}
})
```
This patch:
```
12:36 $ third_party/prebuilt/mac/wrk http://localhost:8080
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 99.96us 100.03us 6.65ms 98.84%
Req/Sec 47.73k 2.43k 51.02k 89.11%
959308 requests in 10.10s, 117.10MB read
Requests/sec: 94978.71
Transfer/sec: 11.59MB
```
main:
```
Running 10s test @ http://localhost:8080
2 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 163.03us 685.51us 19.73ms 99.27%
Req/Sec 39.50k 3.98k 66.11k 95.52%
789582 requests in 10.10s, 82.83MB read
Requests/sec: 78182.65
Transfer/sec: 8.20MB
```
2023-08-17 07:52:37 -06:00
Divy Srivastava
33dc5d2622
fix(node): implement TLSSocket._start ( #20120 )
...
Closes https://github.com/denoland/deno/issues/19983
Closes https://github.com/denoland/deno/issues/18303
Closes https://github.com/denoland/deno/issues/16681
Closes https://github.com/denoland/deno/issues/19978
2023-08-11 11:57:41 +00:00
Divy Srivastava
2f00b0add4
fix(ext/node): support dictionary option in zlib init ( #20035 )
...
Fixes https://github.com/denoland/deno/issues/19540
2023-08-11 11:42:35 +00:00
Divy Srivastava
65db8814c3
fix(node): object keys in publicEncrypt ( #20128 )
...
Fixes https://github.com/denoland/deno/issues/19935
2023-08-11 07:34:23 +00:00
Bartek Iwańczuk
6405b5f454
fix(node): polyfill process.title ( #20044 )
...
Closes https://github.com/denoland/deno/issues/19777
2023-08-04 14:31:13 +02:00
Bartek Iwańczuk
8d8a89ceea
fix(node): repl._builtinLibs ( #20046 )
...
Ref https://github.com/denoland/deno/issues/19733
2023-08-04 14:30:48 +02:00
Leo Kettmeir
aa8078b688
feat(node/os): implement getPriority, setPriority & userInfo ( #19370 )
...
Takes #4202 over
Closes #17850
---------
Co-authored-by: ecyrbe <ecyrbe@gmail.com>
2023-07-31 22:29:09 +02:00
Matt Mastracci
2fd87471e8
chore(cli): Fix test that locks up on some M2 macs ( #19989 )
...
I'm not sure why, but sending SIGABRT to Deno on my machine as part of
this test causes it to lock up very badly, leaving it in an unkillable
`UE+` state.
This showed up after #19333 , but was not caused by it.
2023-07-31 07:29:00 -06:00
Bartek Iwańczuk
bd79baea5e
fix(node): add writable and readable fields to FakeSocket ( #19931 )
...
Closes https://github.com/denoland/deno/issues/19927
2023-07-25 07:17:53 +00:00
Leo Kettmeir
da709729e3
fix(node/http): add encrypted field to FakeSocket ( #19886 )
...
Fixes #19557
2023-07-21 02:18:07 +02:00
Leo Kettmeir
bf4e99cbd7
fix(node/http): call callback after request is sent ( #19871 )
...
Fixes #19762
2023-07-19 01:30:19 +02:00
Leo Kettmeir
bab0294db6
fix(node/net): Server connection callback include socket value ( #19779 )
2023-07-19 00:33:43 +02:00
await-ovo
37241e9b1e
fix(ext/node): fix stream/promises export ( #19820 )
2023-07-17 22:10:34 +09:00