summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2024-08-23chore(ext/node): use array instead of Vec to avoid wrong capacity allocation ↵Yusuke Tanaka
(#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.
2024-08-23fix(ext/crypto): throw DataError for invalid EC key import (#25181)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20931
2024-08-23fix(ext/node): import JWK octet key pairs (#25180)Divy Srivastava
Ref https://github.com/denoland/deno/issues/24129 `kty: "okp"` is defined in [rfc8037](https://www.rfc-editor.org/rfc/rfc8037.html)
2024-08-22chore(ext/node): bump minimum required version of `dsa` to 0.6.3 (#25154)Yusuke Tanaka
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)
2024-08-22refactor: remove unused AllowAllNodePermissions (#25159)David Sherret
2024-08-22chore(build): deno_kv - remove dep on deno_node (#25158)David Sherret
This will help with build perf a bit.
2024-08-22chore: forward v1.46.1 release commit to main (#25155)denobot
2024-08-22fix(urlpattern): fallback to empty string for undefined group values (#25151)Leo Kettmeir
This change was introduced in #24741, but due to the change in behaviour, we will revert it and re-introduce it in 2.0
2024-08-22fix(ext/node): http2session ready state (#25143)Caleb Lloyd
Fixes #25142 Signed-off-by: Caleb Lloyd <caleblloyd@gmail.com>
2024-08-22fix(ext/node): register `node:wasi` built-in (#25134)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/23531
2024-08-221.46.0 (#25139)denobot
Bumped versions for 1.46.0 Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-21feat: Upgrade V8 to 12.9 (#25138)Bartek Iwańczuk
2024-08-21fix(ext/websocket): unhandled close rejection in WebsocketStream (#25125)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/25077
2024-08-21fix(ext/node): pass content-disposition header as string instead of bytes ↵Satya Rohith
(#25128) Closes https://github.com/denoland/deno/issues/25117
2024-08-20fix(ext/net): validate port in Deno.{connect,serve,listen} (#24399)seb
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>
2024-08-20chore: enable no-console dlint rule (#25113)David Sherret
2024-08-20chore: Remove stray `console.error` log in `node:child_process` (#25111)Nathan Whitaker
Missed removing it before committing
2024-08-20fix(cli): update permission prompt message for compiled binaries (#24081)Yazan AbdAl-Rahman
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-19fix: add permission name when accessing a special file errors (#25085)Bedis Nbiba
2024-08-19fix(node/tty): fix `tty.WriteStream.hasColor` with different args (#25094)Marvin Hagemeister
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
2024-08-19feat: upgrade deno_core (#25042)snek
- Update ffi turbocall to use revised fast call api - Remove `v8_version` function calls - `*mut OwnedIsolate` is no longer stored in OpCtx gotham store
2024-08-18fix(node/http): wrong `req.url` value (#25081)Marvin Hagemeister
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
2024-08-17fix(ext/node): fix prismjs compatibiliy in Web Worker (#25062)Yoshiya Hinosawa
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
2024-08-16fix(node/fs): Use correct offset and length in node:fs.read and write (#25049)Nathan Whitaker
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.
2024-08-15fix(node): Create additional pipes for child processes (#25016)Nathan Whitaker
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.
2024-08-14feat(serve): Opt-in parallelism for `deno serve` (#24920)Nathan Whitaker
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 ```
2024-08-14feat(ext/node): support http2session.socket (#24786)Sean McArthur
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-08-14fix(node/fs): node:fs.read and write should accept typed arrays other than ↵Nathan Whitaker
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`).
2024-08-14fix(node/inspector): Session constructor should not throw (#25041)Marvin Hagemeister
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.
2024-08-14fix: `node:inspector` not being registered (#25007)Marvin Hagemeister
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
2024-08-14fix(ext/node): don't throw when calling PerformanceObserver.observe (#25036)Luca Casonato
2024-08-14fix: dd-trace http message compat (#25021)snek
make this http incoming constructor match with node, and also handle arbitrary duplex inputs
2024-08-12chore: update the copyright of c, mjs, and jsx (#25005)Kenta Moriuchi
2024-08-12fix(ext/node): don't concat set-cookie in ServerResponse.appendHeader (#25000)Luca Casonato
Follow-on to https://github.com/denoland/deno/pull/24216/files#r1642188672
2024-08-11fix(ext/node): rewrite X509Certificate resource and add `publicKey()` (#24988)Divy Srivastava
**Changes**: - Remove unsafe usage, rewrite Rust representation with `yoke`. - Implement `X509Certificate.prototype.publicKey()` Fixes https://github.com/denoland/deno/issues/23307
2024-08-11fix(ext/node): support ieee-p1363 ECDSA signatures and pss salt len (#24981)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/22919
2024-08-11fix(ext/node): createBrotliCompress params (#24984)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/24416
2024-08-09fix(ext/node): use pem private keys in createPublicKey (#24969)Luca Casonato
2024-08-09fix: stub `node:module.register()` (#24965)Marvin Hagemeister
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
2024-08-09fix(ext/node): ed25519 signing and cipheriv autopadding fixes (#24957)Luca Casonato
- Return auth tag for GCM ciphers from auto padding shortcircuit - Use _ring_ for ed25519 signing --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-08-09chore: make node:http.OutgoingMessage a function (#24853)snek
For dd-trace tests to succeed, `OutgoingMessage` should be a function instead of a class.
2024-08-08fix(ext/fetch): include TCP src/dst socket info in error messages (#24939)Yusuke Tanaka
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
2024-08-08fix(ext/node): add `CipherIv.setAutoPadding()` (#24940)Divy Srivastava
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>
2024-08-08fix(node/util): add missing `debug` alias of `debuglog` (#24944)Marvin Hagemeister
Add the missing `node:util.debug` export which is an alias of `node:util.debuglog`, see https://nodejs.org/api/util.html#utildebugsection
2024-08-08fix(ext/node): client closing streaming request shouldn't terminate http ↵Satya Rohith
server (#24946) Closes https://github.com/denoland/deno/issues/22820
2024-08-08fix(node/crypto): Assign publicKey and privateKey with let instead of const ↵Birk Skyum
(#24943) Because public/private key are reassigned, they should be `let` instead of `const`. Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-08-08fix(ext/node): add crypto.diffieHellman (#24938)Luca Casonato
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Closes #21806
2024-08-07fix(ext/fetch): include URL and error details on fetch failures (#24910)Yusuke Tanaka
This commit improves error messages that `fetch` generates on failure. Fixes #24835
2024-08-07fix: `rename` watch event missing (#24893)Marvin Hagemeister
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
2024-08-07fix(webgpu): Fix `GPUAdapter#isFallbackAdapter` and `GPUAdapter#info` ↵Kenta Moriuchi
properties (#24914) Fixed `GPUAdapter` bugs: * `GPUAdapter#isFallbackAdapter` being `undefined` * `GPUAdapter#info` throwing `TypeError` * introduced by #24783 * `GPUAdapter#info` closing adapter resources * introduced by #23752