snek
4772778107
refactor: http upgrade internals ( #30612 )
...
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
clean up some outdated code and implement a few performance
improvements. most notably, the response from `upgradeWebSocket` is now
actually used as a normal response.
a followup pr will rework raw upgrades to a greater extent
2025-09-19 09:33:32 +02:00
Daniel Osvaldo Rahmanto
328d5ef2a0
fix(ext/node): accept ArrayBuffer on crypto.timingSafeEqual ( #30773 )
...
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes #30759
The buffer validation is based on Node.js implementation:
591ba692bf/src/crypto/crypto_util.h (L467-L472)
2025-09-18 16:51:56 +02:00
Daniel Osvaldo Rahmanto
ebcb2fa294
fix(ext/node): fs.statfsSync
and fs.statfs
compatibility ( #30662 )
...
Towards #29972
- Converts the polyfill to typescript.
- Implement async op.
- Allows `Buffer` type path.
- Allows
[parallel/test-fs-statfs.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-statfs.js )
test to pass.
2025-09-18 16:03:30 +02:00
Bartek Iwańczuk
4a1f63b930
Revert "fix(ext/node): fs.stat
and fs.statSync
compatibility (#30… ( #30741 )
...
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
…637)"
This reverts commit 432761aac5
.
The tests are causing flakes on Windows
2025-09-15 19:25:47 -04:00
Daniel Osvaldo Rahmanto
08d9895075
chore(test): fix node:fs.close
test flakiness ( #30735 )
2025-09-15 17:21:22 +00:00
Daniel Osvaldo Rahmanto
432761aac5
fix(ext/node): fs.stat
and fs.statSync
compatibility ( #30637 )
...
ci / build libs (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Closes #30570
Changes in this PR:
- Implement `ino`, `nlink`, and `blocks` properties of `Deno.FileInfo`
on Windows. These changes are automatically reflected to the
corresponding node stat function. In order to do so, I had to tinker
with the
[createByteStruct](a3a904da14/ext/fs/30_fs.js (L297)
)
function to create another optional int type, apart from `?u64`. It's
common for small sized files on Windows (particularly NTFS file system)
to have a `Stats.blocks` property of 0, and currently all 0 values with
type `?u64` will be coerced into `null` by `createByteStruct`.
- Refactor the `BigIntStats` and `Stats` class, to use the same class
with Node.js that are provided from
[utils.mjs](7f8e488c36/ext/node/polyfills/internal/fs/utils.mjs (L577)
).
Also ensures that all properties are not `null` or `undefined`.
- Addresses the `prefer-primordials` lint rule.
2025-09-15 15:29:30 +02:00
Daniel Osvaldo Rahmanto
27fa8db5c6
fix(ext/node): handle falsy values enumerability in process.env ( #30708 )
...
Closes #30701
2025-09-15 11:59:51 +02:00
Daniel Osvaldo Rahmanto
6050aea25a
fix(ext/node): set default callback for fs.close
( #30720 )
...
Fixes #30718
2025-09-15 08:05:31 +00:00
Daniel Osvaldo Rahmanto
8244cd8e21
fix(ext/node): validate readlink arguments ( #30691 )
...
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Also accepts `Buffer` typed path. Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-readlink-type-check.js
test to pass.
Towards #29972
2025-09-11 18:43:48 +02:00
Alex Yang
cb4207efb6
feat(ext/node): add sqlite-type symbol for DatabaseSync ( #30511 )
...
Related:
d1eabcb044
Related: https://github.com/nodejs/node/pull/59405
Related: https://github.com/better-auth/better-auth/pull/3869
Related: https://github.com/oven-sh/bun/pull/22109
Nowadays, there are tons of database packages, like sqlite3, sqlite,
better-sqlite, bun:sqlite... Checking the difference from them is pretty
hard.
instanceof is not good, since the developer will still need to import
the module, which is costly.
I think we should provide a symbol to distinguish different SQLite
classes, at least nodejs could make the first step.
---------
Signed-off-by: Alex Yang <himself65@outlook.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-09-08 23:45:39 +00:00
Yoshiya Hinosawa
6ee7d60ce1
fix(ext/node): set socket.authorized to true for https request ( #30641 )
...
This PR sets true to `req.socket.authorized` when making https request
from `node:https` module.
This makes yarn classic's https client working (e.g. `yarn add cowsay`).
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-09-08 20:29:41 +00:00
Daniel Osvaldo Rahmanto
e60f5d2c52
fix(ext/node): fs.mkdtemp
and fs.mkdtempSync
compatibility ( #30602 )
...
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
`fs.mkdtemp` and `fs.mkdtempSync` now accept `Buffer` and `Uint8Array`
path. The implementation has been moved to Rust, including directory
suffix generation and directory creation.
2025-09-05 16:12:42 -04:00
EdamAmex
d5eaefc3c0
fix(ext/node): ignore Node.js' --experimental-*
flags when spawning child process ( #26351 )
...
Closes https://github.com/denoland/deno/issues/26349
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-09-04 12:18:51 +00:00
Daniel Osvaldo Rahmanto
e843a115fd
fix(ext/node): fs.symlink and fs.symlinkSync compatibility ( #30555 )
2025-09-03 17:48:13 -04:00
Daniel Osvaldo Rahmanto
1ef0d0838e
fix(ext/node): implement http.res.setHeaders ( #30586 )
...
Closes #30540
Also fixes res.writeHead implementation to parse array values correctly.
For example, `res.writeHead(200, [["foo", "bar"]])` and
`res.writeHead(200, ["foo", "bar"])` should produce the same result.
These changes allows
[parallel/test-http-response-setheaders.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-http-response-setheaders.js )
to pass.
2025-09-01 23:13:03 +02:00
Divy
36e9eb2023
fix(ext/node): support JS underlying stream in TLS ( #30465 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes https://github.com/denoland/deno/issues/20594
This implements `JSStreamSocket` which drives the TLS underlying stream
in `rustls_tokio_stream` using 2 sets of channels. One for piping the
encrypted protocol transport and the other for plaintext application
data.
This fixes connecting to `npm:mssql`:
```js
import sql from "npm:mssql";
const sqlConfig = {
server: "localhost",
user: "divy",
password: "123",
database: "master",
options: {
trustServerCertificate: true,
},
};
const pool = await sql.connect(sqlConfig);
const result = await pool.request().query(`SELECT * FROM sys.databases`);
```
2025-08-28 17:56:17 +05:30
Daniel Osvaldo Rahmanto
e463e57b0e
fix(ext/node): fs.exists
and fs.existsSync
compatibility ( #30507 )
...
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Closes #30506
Other changes:
- Emit deprecation warning.
- Allows
[parallel/test-fs-exists.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-exists.js )
to pass.
- Allows
[test-fs-symlink-dir-junction.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-symlink-dir-junction.js )
to pass. Previously it always fail due to invalid assertion using
`existsSync`.
2025-08-26 15:31:39 +02:00
Divy
09036f5241
fix(ext/node): handle null
keypair in tls connect ( #30516 )
ci / build libs (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-08-25 17:47:10 +00:00
Daniel Osvaldo Rahmanto
3948bb6e55
fix(ext/node): http.server.listen to handle signal option ( #30515 )
...
Closes #30508
2025-08-25 16:55:51 +02:00
gitstart-app[bot]
6314c3c46d
fix(ext/node): crypto.hkdfSync
returns wrong result for non-Uint8Array TypedArray inputs ( #30463 )
...
ci / pre-build (push) Has been cancelled
ci / build libs (push) Has been cancelled
ci / publish canary (push) Has been cancelled
ci / test debug linux-aarch64 (push) Has been cancelled
ci / test release linux-aarch64 (push) Has been cancelled
ci / test debug macos-aarch64 (push) Has been cancelled
ci / test release macos-aarch64 (push) Has been cancelled
ci / bench release linux-x86_64 (push) Has been cancelled
ci / lint debug linux-x86_64 (push) Has been cancelled
ci / lint debug macos-x86_64 (push) Has been cancelled
ci / lint debug windows-x86_64 (push) Has been cancelled
ci / test debug linux-x86_64 (push) Has been cancelled
ci / test release linux-x86_64 (push) Has been cancelled
ci / test debug macos-x86_64 (push) Has been cancelled
ci / test release macos-x86_64 (push) Has been cancelled
ci / test debug windows-x86_64 (push) Has been cancelled
ci / test release windows-x86_64 (push) Has been cancelled
The original HKDF implementation incorrectly handled
TypedArrays by converting them through the toBuf() function, which only
handles strings and Buffers. This caused TypedArrays to be processed
incorrectly, losing their actual byte representation.
Closes https://github.com/denoland/deno/issues/29913
---------
Co-authored-by: gitstart-app[bot] <80938352+gitstart-app[bot]@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-08-23 11:56:19 +02:00
Divy
3a491a509a
fix(ext/node): TLS emit close event on parent socket ( #30451 )
...
Fixes https://github.com/denoland/deno/issues/28543
2025-08-19 19:01:23 +05:30
Divy
9956a84637
fix(ext/node): bad compression caused by invalid brotli params ( #30437 )
...
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
Fixes https://github.com/denoland/deno/issues/30306
Fixes https://github.com/denoland/deno/issues/30430
Fixes https://github.com/denoland/deno/issues/29755
2025-08-18 17:19:29 +00:00
Daniel Osvaldo R
9b1d8d5f2b
fix(ext/node): os.setPriority
and os.getPriority
compatibility ( #30383 )
...
Closes #30405
Changes in this PR:
- Fixes `os.setPriority()` on Windows.
- Validates the function parameters correctly and constructs
`NodeSystemError` on op call error.
- Allows [parallel/test-os-process-priority.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-os-process-priority.js ) to pass.
---------
Signed-off-by: Daniel Osvaldo R <daniel.rahmanto@gmail.com>
2025-08-18 19:07:28 +02:00
Daniel Osvaldo R
e4a47febcd
fix(std/fs): implement chmod
on windows ( #30436 )
...
Closes #4357
On Windows, `chmod` can only change read and write permissions
(https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/chmod-wchmod?view=msvc-170 ).
It doesn't implement distinct permissions among group, owner, or others.
Changes in this PR also enables `node:fs`’ `chmod` on Windows and fixes
the `prefer-primordials` lint rule #24236 .
2025-08-18 19:06:22 +02:00
Daniel Osvaldo R
a694cae55d
fix(ext/node): export promises
from stream ( #30427 )
...
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Closes #30423
2025-08-17 18:56:29 +05:30
Divy
5c79bc7300
fix(ext/node): mTLS support for node:tls
( #30426 )
...
Fixes https://github.com/denoland/deno/issues/28341
- handle `secureContext.key` and `secureContext.cert` in `new
TLSSocket()`
- Fix serialize when `secureContext.ca` is an array
Fixes MQTT connect support:
```
New connection from 127.0.0.1:58119 on port 8883.
1755367370: New client connected from 127.0.0.1:58119 as 637013c2-53c7-4779-9e84-50dcf2f2f81b (p5, c0, k60, u'test-client').
1755367370: No will message specified.
1755367370: Sending CONNACK to 637013c2-53c7-4779-9e84-50dcf2f2f81b (0, 0)
```
2025-08-17 16:32:15 +05:30
Divy
044b62f702
fix(ext/node): tls upgrades for used sockets ( #30418 )
...
Fixes `npm:postgres` support
Fixes https://github.com/denoland/deno/issues/30417
Fixes https://github.com/denoland/deno/issues/28551
Fixes https://github.com/denoland/deno/issues/28526
```
$ target/debug/deno -A repro.mjs
Result(1) [
{
current_database: "testdb",
version: "PostgreSQL 14.17 (Homebrew) on aarch64-apple-darwin24.2.0, compiled by Apple clang version 16.0.0 (clang-1600.0.26.6), 64-bit"
}
]
```
2025-08-16 16:04:52 +05:30
Daniel Osvaldo R
62bb429cbf
fix(ext/node): accept base64url
encoding on StringDecoder ( #30366 )
...
Also remove a duplicated `normalizedEncoding` function. These node
compatibility tests are now passing:
-
[test-string-decoder-end.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-string-decoder-end.js )
-
[test-string-decoder-fuzz.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-string-decoder-fuzz.js )
2025-08-10 18:49:14 +05:30
Daniel Osvaldo R
9371d7bcf3
fix(ext/node): handle large buffer correctly ( #30369 )
...
Previously, Deno throws error when creating `Buffer.allocUnsafe` or
`Buffer.allocUnsafeSlow` with size of `2**31` where that's not the case
with Node.js.
The changes allow these tests to pass:
-
[test-buffer-large-size-buffer-alloc-unsafe-slow.js](https://github.com/nodejs/node/blob/v24.2.0/test/pummel/test-buffer-large-size-buffer-alloc-unsafe-slow.js )
-
[test-buffer-large-size-buffer-alloc-unsafe.js](https://github.com/nodejs/node/blob/v24.2.0/test/pummel/test-buffer-large-size-buffer-alloc-unsafe.js )
-
[test-string-decoder-large-buffer.js](https://github.com/nodejs/node/blob/v24.2.0/test/pummel/test-string-decoder-large-buffer.js )
<!--
Before submitting a PR, please read
https://docs.deno.com/runtime/manual/references/contributing
1. Give the PR a descriptive title.
Examples of good title:
- fix(std/http): Fix race condition in server
- docs(console): Update docstrings
- feat(doc): Handle nested reexports
Examples of bad title:
- fix #7123
- update docs
- fix bugs
2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->
2025-08-10 14:02:43 +02:00
Divy
56d6a74894
fix: upgrade @node/types to 24 ( #30343 )
...
ci / lint debug macos-x86_64 (push) Has been cancelled
ci / lint debug windows-x86_64 (push) Has been cancelled
ci / test debug linux-x86_64 (push) Has been cancelled
ci / test release linux-x86_64 (push) Has been cancelled
ci / test debug macos-x86_64 (push) Has been cancelled
ci / test release macos-x86_64 (push) Has been cancelled
ci / test debug windows-x86_64 (push) Has been cancelled
ci / test release windows-x86_64 (push) Has been cancelled
ci / build libs (push) Has been cancelled
ci / publish canary (push) Has been cancelled
ci / pre-build (push) Has been cancelled
ci / test debug linux-aarch64 (push) Has been cancelled
ci / test release linux-aarch64 (push) Has been cancelled
ci / test debug macos-aarch64 (push) Has been cancelled
ci / test release macos-aarch64 (push) Has been cancelled
ci / bench release linux-x86_64 (push) Has been cancelled
ci / lint debug linux-x86_64 (push) Has been cancelled
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-08-07 16:08:47 +00:00
Garret Thompson
038d5a5331
fix(ext/node): avoid panic when crypto.randomInt
has no arguments ( #30314 )
...
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/30313
2025-08-05 17:09:39 +02:00
Daniel Osvaldo R
55f74e809b
fix(ext/node): parse fs open options correctly ( #30300 )
...
Fixes #30299
I decided to build the `OpenOptions` on the Rust side, because it's
cheaper to pass integers to the op function and we can enable the fast
op call. Also the tests that I added to the `config.toml` were already
passing before this PR.
2025-08-05 11:12:22 +02:00
Bartek Iwańczuk
efb5617d15
fix(ext/node): assign 'ERR_BUFFER_TOO_LARGE' to codes ( #30311 )
...
ci / build libs (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/30310
2025-08-04 18:19:46 +02:00
Daniel Osvaldo R
45f64df6c1
fix(ext/node): incorrect ERR_INVALID_ARG_VALUE
constructor arguments position ( #30309 )
...
This allows
[parallel/test-fs-internal-assertencoding.js](https://github.com/nodejs/node/blob/v23.9.0/test/parallel/test-fs-internal-assertencoding.js )
to pass.
Towards #29972
2025-08-04 16:05:41 +00:00
Bartek Iwańczuk
dcdd1d6139
fix(ext/node): worker_threads handles basic require
calls ( #30279 )
...
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This is not a full-fledged and fully correct `require`/CJS support
for `node:worker_threads`, but unlocks certain scenarios that
were not working at all previously.
2025-08-02 11:27:06 +00:00
Leo Kettmeir
43b376cd47
Revert "fix(ext/node): support TLS for unix sockets" ( #30284 )
...
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Reverts denoland/deno#30169
Causes issues with playwright's installation of browsers
2025-08-02 09:11:23 +00:00
Bartek Iwańczuk
b05e8b20ac
fix(ext/node): support TLS for unix sockets ( #30169 )
...
This commit adds initial support for connecting Unix socket over
TLS in `node:tls.connect()` API
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-08-01 12:00:14 +02:00
Daniel Osvaldo R
6ae4eda86a
fix(ext/node): define fs constants correctly across platforms ( #30113 )
2025-07-31 17:11:01 -04:00
Daniel Osvaldo R
8680d97b38
fix(ext/node): fs.open
and fs.openSync
compatibility ( #30191 )
...
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
Notable changes:
- Introduces a separate op between `Deno.open` and `node:fs.open`.
- Removes redundant `existenceCheckRequired` and `Deno.lstatSync` calls,
as the op layer already handles that when `options.create_new` is true
and uses synchronous I/O when `O_SYNC` is passed.
- Allows passing custom flags to the op (e.g. `O_SYNC`).
- Addresses `prefer-primordials` lint rule.
- Allows
[parallel/test-fs-open.js](https://github.com/nodejs/node/blob/v23.9.0/test/parallel/test-fs-open.js )
test to pass. There are also several tests that have passed before that
I added to the config.toml.
2025-07-31 15:10:10 +00:00
Daniel Osvaldo R
af55e069ef
fix(ext/node): fs.rename
and fs.renameSync
compatibility ( #30245 )
2025-07-31 10:24:59 -04:00
Daniel Osvaldo R
d642f84203
fix(ext/node): fs.unlink
and fs.unlinkSync
compatibility ( #30257 )
...
ci / publish canary (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
Improves compatibility with Node.js by validating the input parameters,
accepting Buffer type paths, and converting thrown errors correctly.
This PR also addresses `prefer-primordials` lint rule. These changes
allow parallel/test-fs-unlink-type-check.js test to pass.
Towards https://github.com/denoland/deno/issues/29972 ,
https://github.com/denoland/deno/issues/24236 .
2025-07-31 10:56:11 +02:00
Divy
5cfe47abc3
fix(ext/node): use Zlib base for brotli handles ( #30112 )
...
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
Fixes #28507
Closes https://github.com/denoland/deno/issues/28836
```
$ ../deno/target/debug/deno run -A npm:pnpm i --save yargs
Packages: +297
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 381, reused 257, downloaded 41, added 297, done
dependencies:
+ @deno/astro-adapter 0.2.1 (0.3.1 is available)
+ astro 5.12.0
+ yargs 18.0.0
```
2025-07-28 10:11:59 +05:30
Bartek Iwańczuk
ca4f4b4788
fix(ext/node): add process._rawDebug ( #30141 )
ci / pre-build (push) Has been cancelled
ci / test debug linux-aarch64 (push) Has been cancelled
ci / test release linux-aarch64 (push) Has been cancelled
ci / test debug macos-aarch64 (push) Has been cancelled
ci / test release macos-aarch64 (push) Has been cancelled
ci / bench release linux-x86_64 (push) Has been cancelled
ci / lint debug linux-x86_64 (push) Has been cancelled
ci / lint debug macos-x86_64 (push) Has been cancelled
ci / lint debug windows-x86_64 (push) Has been cancelled
ci / test debug linux-x86_64 (push) Has been cancelled
ci / test release linux-x86_64 (push) Has been cancelled
ci / test debug macos-x86_64 (push) Has been cancelled
ci / test release macos-x86_64 (push) Has been cancelled
ci / test debug windows-x86_64 (push) Has been cancelled
ci / test release windows-x86_64 (push) Has been cancelled
ci / build libs (push) Has been cancelled
ci / publish canary (push) Has been cancelled
2025-07-18 19:29:31 +02:00
Daniel Osvaldo R
0a01d63080
fix(ext/node): validate path parameters on link
and linkSync
( #30061 )
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
2025-07-11 11:35:43 +09:00
Divy Srivastava
3a94adf956
fix(ext/http2): fix oob buffer reads in http2 requests ( #29969 )
2025-07-02 09:28:50 -07:00
Jeff Hykin
2f72884425
feat(node API): add fs.glob
, fs.globSync
, fs.promises.glob
( #28972 )
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-07-01 11:35:45 +02:00
Nicholas Berlette
a70f1cfab4
fix(node): use primordials more consistently in _events.mjs
( #29930 )
...
ci / pre-build (push) Has been cancelled
ci / lint debug windows-x86_64 (push) Has been cancelled
ci / test debug linux-x86_64 (push) Has been cancelled
ci / test release linux-x86_64 (push) Has been cancelled
ci / test debug macos-x86_64 (push) Has been cancelled
ci / test release macos-x86_64 (push) Has been cancelled
ci / test debug windows-x86_64 (push) Has been cancelled
ci / test release windows-x86_64 (push) Has been cancelled
ci / build libs (push) Has been cancelled
ci / test debug linux-aarch64 (push) Has been cancelled
ci / test release linux-aarch64 (push) Has been cancelled
ci / test debug macos-aarch64 (push) Has been cancelled
ci / test release macos-aarch64 (push) Has been cancelled
ci / bench release linux-x86_64 (push) Has been cancelled
ci / lint debug linux-x86_64 (push) Has been cancelled
ci / lint debug macos-x86_64 (push) Has been cancelled
ci / publish canary (push) Has been cancelled
Fixes #29929
---------
Signed-off-by: Nicholas Berlette <11234104+nberlette@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-28 19:03:21 +02:00
Yoshiya Hinosawa
9026234a23
fix(ext/node): keep BOM in buffer.toString('utf8') ( #29896 )
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-06-27 12:41:27 +09:00
Daniel Osvaldo R
e69a668e1f
fix(ext/node): export promise based lchown
and lutimes
from node:fs/promises
( #29870 )
...
The promised based `lchown` and `lutimes` were implemented in #24418 and
#23172 , but haven't been exported through the `node:fs/promises`
namespace.
Signed-off-by: Daniel Osvaldo R <daniel.rahmanto@gmail.com>
2025-06-26 09:55:47 -07:00
Yoshiya Hinosawa
538f8870dc
fix(ext/node): support KeyObject in publicEncrypt/privateDecrypt ( #29798 )
2025-06-19 09:48:29 +09:00