Age | Commit message (Collapse) | Author |
|
(#25183)
This commit gets deno_node's customizer to use fixed-length array
instead of `Vec` to avoid wrong capacity allocation.
In the previous code we reserve a capacity of 14 for
`external_references`. However, after pushing all the necessary
`ExternalReference`s, it ends up with a length of 21, not 14. This means
another allocation happens even though we reserve some space.
To make sure that there will no longer be extra allocation, it should be
a good idea to use fixed-length array here.
|
|
Fixes https://github.com/denoland/deno/issues/20931
|
|
Ref https://github.com/denoland/deno/issues/24129
`kty: "okp"` is defined in
[rfc8037](https://www.rfc-editor.org/rfc/rfc8037.html)
|
|
This commit bumps the minimum required version of `dsa` crate to 0.6.3.
This is preferable because `SigningKey::sign_prehashed_rfc6979` function
we use in `deno_node` is available from this version.
Ref: [dsa's CHANGELOG.md](https://github.com/RustCrypto/signatures/blob/132b04631409db1ca805aba2f62830c8e359b29f/dsa/CHANGELOG.md#063-2024-01-28)
|
|
|
|
This will help with build perf a bit.
|
|
|
|
This change was introduced in #24741, but due to the change in
behaviour, we will revert it and re-introduce it in 2.0
|
|
Fixes #25142
Signed-off-by: Caleb Lloyd <caleblloyd@gmail.com>
|
|
Fixes https://github.com/denoland/deno/issues/23531
|
|
Bumped versions for 1.46.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
Fixes https://github.com/denoland/deno/issues/25077
|
|
(#25128)
Closes https://github.com/denoland/deno/issues/25117
|
|
Co-authored-by: Will Leach <4619280+melbourne2991@users.noreply.github.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: David Sherret <dsherret@gmail.com>
|
|
|
|
Missed removing it before committing
|
|
Co-authored-by: David Sherret <dsherret@gmail.com>
|
|
|
|
The check in `tty.WriteStream.prototype.hasColors()` was incorrect
leading to the
[`yoctocolors`](https://github.com/sindresorhus/yoctocolors) package not
printing any colors.
Fixes https://github.com/denoland/deno/issues/24407
|
|
- Update ffi turbocall to use revised fast call api
- Remove `v8_version` function calls
- `*mut OwnedIsolate` is no longer stored in OpCtx gotham store
|
|
This PR addresses a regression introduced in
https://github.com/denoland/deno/pull/25021 that would cause the
`req.url` parameter in Node's http server to always be a single
character instead of the expected value. The regression was caused by
effectively calling `.indexOf()` on an empty string and thus passing the
wrong index for slicing.
```js
"".indexOf("/") // -> -1
request.url.slice(-1) // effectively only giving us the last character
```
Fixes https://github.com/denoland/deno/issues/25080
|
|
PrismJS uses `WorkerGlobalScope` and `self` for detecting browser's Web
Worker context:
https://github.com/PrismJS/prism/blob/59e5a3471377057de1f401ba38337aca27b80e03/prism.js#L11
Now the detection logic above is broken when it's imported from Deno's
Web Worker context because we only hide `self` (Prism assumes when
`WorkerGlobalScope` is available, `self` is also available).
This change fixes the above by also hiding `WorkerGlobalScope` global in
Node compat mode.
closes #25008
|
|
My fix in #25030 was buggy, I forgot to pass the `byteOffset` and
`byteLength`. Whoops.
I also discovered that fs.read was not respecting the `offset` argument,
and we were constructing a new `Buffer` for the callback instead of just
passing the original one (which is what node does, and the @types/node
definitions also indicate the callback should get the same type).
Fixes #25028.
|
|
Linux/macos only currently.
Part of https://github.com/denoland/deno/issues/23524 (fixes it on
platforms other than windows).
Part of #16899 (fixes it on platforms other than windows).
After this PR, playwright is functional on mac/linux.
|
|
Adds a `parallel` flag to `deno serve`. When present, we spawn multiple
workers to parallelize serving requests.
```bash
deno serve --parallel main.ts
```
Currently on linux we use `SO_REUSEPORT` and rely on the fact that the
kernel will distribute connections in a round-robin manner.
On mac and windows, we sort of emulate this by cloning the underlying
file descriptor and passing a handle to each worker. The connections
will not be guaranteed to be fairly distributed (and in practice almost
certainly won't be), but the distribution is still spread enough to
provide a significant performance increase.
---
(Run on an Macbook Pro with an M3 Max, serving `deno.com`
baseline::
```
❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000
Running 30s test @ http://127.0.0.1:8000
2 threads and 125 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 239.78ms 13.56ms 330.54ms 79.12%
Req/Sec 258.58 35.56 360.00 70.64%
Latency Distribution
50% 236.72ms
75% 248.46ms
90% 256.84ms
99% 268.23ms
15458 requests in 30.02s, 2.47GB read
Requests/sec: 514.89
Transfer/sec: 84.33MB
```
this PR (`with --parallel` flag)
```
❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000
Running 30s test @ http://127.0.0.1:8000
2 threads and 125 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 117.40ms 142.84ms 590.45ms 79.07%
Req/Sec 1.33k 175.19 1.77k 69.00%
Latency Distribution
50% 22.34ms
75% 223.67ms
90% 357.32ms
99% 460.50ms
79636 requests in 30.07s, 12.74GB read
Requests/sec: 2647.96
Transfer/sec: 433.71MB
```
|
|
Co-authored-by: Satya Rohith <me@satyarohith.com>
|
|
Uint8Array (#25030)
Part of #25028.
Our underlying read/write operations in `io` assume the buffer is a
Uint8Array, but we were passing in other typed arrays (in the case above
it was `Int8Array`).
|
|
There is no constructor code when creating an inspector `Session`
instance in Node. Also get rid of some symbols which should've been
private properties. This PR doesn't yet add any new implementations
though as these are mostly cosmetic changes.
|
|
For some reason we didn't register the `node:inspector` module, which
lead to a panic when trying to import it. This PR registers it.
Related: https://github.com/denoland/deno/issues/25004
|
|
|
|
make this http incoming constructor match with node, and also handle
arbitrary duplex inputs
|
|
|
|
Follow-on to
https://github.com/denoland/deno/pull/24216/files#r1642188672
|
|
**Changes**:
- Remove unsafe usage, rewrite Rust representation with `yoke`.
- Implement `X509Certificate.prototype.publicKey()`
Fixes https://github.com/denoland/deno/issues/23307
|
|
Fixes https://github.com/denoland/deno/issues/22919
|
|
Fixes https://github.com/denoland/deno/issues/24416
|
|
|
|
This is commonly used to register loading non standard file types. But
some libs also register TS loaders which Deno supports natively, like
the npm `payload` package. This PR unblocks those.
Fixes https://github.com/denoland/deno/issues/24902
|
|
- Return auth tag for GCM ciphers from auto padding shortcircuit
- Use _ring_ for ed25519 signing
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
|
|
For dd-trace tests to succeed, `OutgoingMessage` should be a function
instead of a class.
|
|
This commit makes `fetch` error messages include source and destination TCP
socket info i.e. port number and IP address for better debuggability.
Closes #24922
|
|
Co-Authored-By: Luca Casonato <hello@lcas.dev>
Fixes https://github.com/denoland/deno/issues/21804
Ref https://github.com/denoland/deno/issues/20924
---------
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
|
|
Add the missing `node:util.debug` export which is an alias of
`node:util.debuglog`, see
https://nodejs.org/api/util.html#utildebugsection
|
|
server (#24946)
Closes https://github.com/denoland/deno/issues/22820
|
|
(#24943)
Because public/private key are reassigned, they should be `let` instead
of `const`.
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
|
|
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Closes #21806
|
|
This commit improves error messages that `fetch` generates on failure.
Fixes #24835
|
|
This PR ensures that we forward a `rename` event in our file watcher.
The rust lib we use combines that with the `modify` event.
This fixes a compatibility issue with Node too, which sends the `rename`
event as well.
Fixes https://github.com/denoland/deno/issues/24880
|
|
properties (#24914)
Fixed `GPUAdapter` bugs:
* `GPUAdapter#isFallbackAdapter` being `undefined`
* `GPUAdapter#info` throwing `TypeError`
* introduced by #24783
* `GPUAdapter#info` closing adapter resources
* introduced by #23752
|