Bartek Iwańczuk
11e9e073d9
fix(ext/node): support for inspector.url() ( #31705 )
...
ci / pre-build (push) Has been cancelled
ci / test release macos-aarch64 (push) Has been cancelled
ci / bench release linux-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 / 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 / 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 / build libs (push) Has been cancelled
ci / publish canary (push) Has been cancelled
Closes https://github.com/denoland/deno/issues/31700
2025-12-22 23:42:06 +00:00
denobot
3fbb1daddb
2.6.3 ( #31690 )
...
ci / pre-build (push) Has been cancelled
ci / bench release linux-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 / 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 / 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 / build libs (push) Has been cancelled
ci / publish canary (push) Has been cancelled
Bumped versions for 2.6.3
---------
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-12-20 11:07:07 +00:00
David Sherret
d3668555dc
Revert "fix(ext/node): stub out Module.register and Module.registerHooks" ( #31684 )
...
Reverts denoland/deno#31666
2025-12-20 10:53:17 +01:00
denobot
9cd8077757
2.6.2 ( #31674 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Bumped versions for 2.6.2
---------
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-12-19 14:04:14 +00:00
Bartek Iwańczuk
bd7b0a8f3a
fix(ext/node): stub out Module.register and Module.registerHooks ( #31666 )
...
Stubs out `Module.register` and `Module.registerHooks` functions that
are meant to be used for Module Loader hooks as per
https://nodejs.org/api/module.html#customization-hooks .
This is a follow up to https://github.com/denoland/deno/pull/24965
Ref https://github.com/denoland/deno/issues/31665 .
Improves error message from
https://github.com/denoland/deno/issues/30538#issuecomment-3658925471 .
2025-12-19 13:28:29 +01:00
Felipe Cardozo
dd47e25a30
feat: support named pipe listen, connect and open ( #31624 )
...
Co-authored-by: Cyan Changes <contact@cyans.me>
Add support to Pipe.prototype.listen, Pipe.prototype.connect for windows
with named pipes.
Also support to Pipe.prototype.open for unix.
Alternative of https://github.com/denoland/deno/pull/29308 , but without
`Deno:pipe`.
Only with node compatibilities.
Solution for:
https://github.com/denoland/deno/issues/25867
https://github.com/denoland/deno/issues/28332
https://github.com/denoland/deno/issues/31032
Maybe related:
https://github.com/denoland/deno/issues/10244
I tested the Nuxt and Nx, they are working fine on Windows now.
I also tested node-pty, and it's working on Unix.
Co-authored-by: Cyan Changes <contact@cyans.me>
2025-12-19 09:18:48 +01:00
lif
1d77081cc3
fix(fetch): fix SOCKS5 proxy URL validation logic ( #31604 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Closes #31356
2025-12-18 15:53:11 +01:00
Takuro Kitahara
bf919416b3
fix(ext/node): avoid env permission for TERM in console and readline ( #31638 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Fixes #30372
2025-12-18 13:28:33 +01:00
Mert Can Altin
719132d265
fix(ext/node): add error handling functions and tests for UV bindings ( #31639 )
2025-12-18 13:14:47 +01:00
Leo Kettmeir
26fdc29fe0
fix: update glob implementation to match with latest node ( #31627 )
...
Fixes #31625
2025-12-17 17:05:08 +01:00
Luca Casonato
4c08a08a4e
fix(ext/telemetry): otel baggage propagation ( #31620 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
There were three bugs in baggage propagation:
- `BaggageImpl` was not reading items from the map passsed in, instead
always creating an empty baggage
- `Deno.serve` was reading out baggage and storing it in a context, but
then not starting the callback in that context, but in the parent
context, meaning the user did not have access to the baggage.
- The baggage was stored on the context with the wrong key.
The gist of it is that `propagation.getActiveBaggage()` works now.
Secondly, this adds a composite propagator into the global OTEL context,
so that `propagation.extract()` and `propagation.inject()` start
working.
Fixes #28085 and fixes #30064 , towards #28082
2025-12-16 12:12:29 +00:00
Daniel Osvaldo Rahmanto
2ec057b3e0
fix(ext/node): sqlite:backup compatibility ( #31610 )
...
Notable changes:
- Respect progress callback function option.
- Set default backup rate to 100 to follow Node's implementation.
- Various validation and error handling.
Note that the op implementation in this PR is still sync.
Given this code:
```js
import { backup, DatabaseSync } from "node:sqlite";
const populate = (database, rows) => {
database.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT);");
let values = "";
for (let i = 0; i < rows; i++) {
values += `(${i}, 'Name ${i}'),`;
}
values = values.slice(0, -1);
database.exec(`INSERT INTO test (id, name) VALUES ${values}`);
};
const backupPath = "backup.sqlite";
const database = new DatabaseSync(":memory:");
populate(database, 1000);
const t0 = performance.now();
await backup(database, backupPath, { rate: 1 });
const t1 = performance.now();
database.close();
console.log(`Backup completed in ${(t1 - t0).toFixed(2)} ms`);
```
Results:
```bash
# Node.js v25.2.1
➜ node ./backup-benchmark.js
Backup completed in 0.71 ms
# This PR (debug build mode)
➜ ddeno -A ./backup-benchmark.js
Backup completed in 0.71 ms
# Deno v2.6.0
➜ deno -A ./backup-benchmark.js
Backup completed in 1272.16 ms
```
The current implementation is slow because it sleeps 250ms after each
`sqlite3_backup_step` call.
2025-12-16 15:26:12 +07:00
denobot
abf630fb20
2.6.1 ( #31615 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Bumped versions for 2.6.1
---------
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-12-15 13:45:57 +01:00
Daniel Osvaldo Rahmanto
80e36fc36a
fix(ext/node): DatabaseSync compatibility ( #31515 )
...
Closes #29439
Notable changes:
- `DatabaseSync`:
- accept Buffer and URL paths.
- implement `.location()` method.
- add `isTransaction` and `isOpen` getters.
- respect timeout option.
- `backup`: accept Buffer and URL paths.
Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-database-sync.js
test to pass.
2025-12-11 20:04:20 +07:00
Bartek Iwańczuk
d94c7fa2dc
fix: adjust deno_cache version ( #31553 )
...
Small mishap because of https://github.com/denoland/deno/pull/31183 and
https://github.com/denoland/deno/pull/31205 .
2025-12-10 16:36:32 +00:00
denobot
d5b1548eba
2.6.0 ( #31549 )
...
Bumped versions for 2.6.0
---------
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-12-10 14:29:22 +01:00
Divy
0bc213b15b
fix(ext/node): prevent cipher operations after finalize ( #31533 )
...
Throw a state error for operations if the cipher is already finalized.
2025-12-09 16:03:37 +05:30
snek
a15cafeb3b
feat(ext/web): transferable {Readable,Writable,Transform}Stream ( #31126 )
...
https://streams.spec.whatwg.org/#rs-transfer
https://streams.spec.whatwg.org/#ws-transfer
https://streams.spec.whatwg.org/#ts-transfer
Remaining test failures are due to our `DOMException` not correctly
being serializable and can be solved in a followup.
```js
// example
const INDEX_HTML = Deno.readTextFileSync("./index.html");
const worker = new Worker("./the_algorithm.js", { type: "module" });
Deno.serve(async (req) => {
if (req.method === "POST" && req.path === "/the-algorithm") {
const { port1, port2 } = new MessageChannel();
worker.postMessage({ stream: req.body, port: port1 }, { transfer: [req.body, port1] });
const res = await new Promise((resolve) => {
port1.onmessage = (e) => resolve(e.data);
});
return new Response(res);
}
if (req.path === "/") {
return new Response(INDEX_HTML, { "content-type": "text/html" });
}
return new Response(null, { status: 404 });
});
```
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-12-08 12:31:43 +00:00
Daniel Osvaldo Rahmanto
2353b9ba6a
fix(ext/node): implement DatabaseSync.aggregate() ( #31461 )
...
Implementation is based on
https://github.com/nodejs/node/blob/v24.2.0/src/node_sqlite.cc
It passes all tests from
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-aggregate-function.mjs
except for two test cases where it uses `mock()` from `node:test`, which
we don't yet implement. The tests on `sqlite_test.ts` are copied from
the node compat test cases.
---------
Co-authored-by: Divy <dj.srivastava23@gmail.com>
2025-12-08 10:34:31 +00:00
Marvin Hagemeister
b8b549d574
fix(node): missing statfs export from node:fs/promises ( #31528 )
...
We already had the functionality, we just didn't export it.
Fixes https://github.com/denoland/deno/issues/31526
2025-12-08 09:45:01 +00:00
Nicholas R
bc9d356059
fix(node/net): return string family in server.address() ( #31465 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
## Summary
Aligns Deno's Node.js compatibility layer (`node:net`, `node:http`,
`node:https`,
`node:http2`, `node:dns`) with Node.js v18.4.0+ behavior by returning
the `family`
property as a string (`"IPv4"` or `"IPv6"`) rather than a number in
`server.address()`
and socket address methods.
Node.js briefly changed `family` from string to number in v18.0.0
(nodejs/node#41431 ),
but reverted in v18.4.0 (nodejs/node#43054 ) due to ecosystem breakage
(nodejs/node#43014 ).
This fix ensures compatibility with npm packages that rely on the string
format, which
has been the stable API since Node.js v18.4.0.
## Changes
- Modified `ext/node/polyfills/http.ts` to add `family` property to
`address()` return
- Modified `ext/node/polyfills/internal_binding/tcp_wrap.ts` to return
string `family`
instead of number in `getsockname()`, `getpeername()`, and `#connect()`
- Modified `ext/node/polyfills/net.ts` to fix `socket.remoteFamily`
getter (no longer
needs conversion since `family` is now a string)
- Modified `ext/node/polyfills/dns.ts` and
`ext/node/polyfills/internal/dns/promises.ts` to accept string family
values (`"IPv4"`,
`"IPv6"`) in `lookup()`, matching [Node.js
behavior](https://nodejs.org/api/dns.html#dnslookuphostname-options-callback )
- Added tests in `tests/unit_node/http_test.ts`,
`tests/unit_node/http2_test.ts`,
`tests/unit_node/https_test.ts`, `tests/unit_node/dns_test.ts`, and
`tests/unit_node/net_test.ts`
## Node.js Compatibility Note
For non-IP addresses (when `isIP()` returns 0), the `family` property is
`undefined`.
This matches Node.js C++ behavior in
[`AddressToJS`](https://github.com/nodejs/node/blob/main/src/tcp_wrap.cc )
where family
is only set for `AF_INET` (`"IPv4"`) and `AF_INET6` (`"IPv6"`), and left
undefined
otherwise.
## Refs
- nodejs/node#43054
- nodejs/node@70b516e
<!--
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.
-->
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Rahmanto <daniel.rahmanto@gmail.com>
2025-12-06 10:51:55 +07:00
Bartek Iwańczuk
5b2dc85a3c
Revert "feat: use Node.js timers by default ( #31272 )" ( #31490 )
...
ci / test release windows-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 / 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 / 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 / publish canary (push) Blocked by required conditions
This reverts commit 7ada8d6589 .
This is a breaking change and is postponed until Deno 3.0.
2025-12-04 00:50:11 +00:00
Bartek Iwańczuk
4b5a26d271
Revert "refactor: remove 'managed globals' infra ( #31318 )" ( #31491 )
...
This reverts commit 9498b36170 .
This is a breaking change and is postponed until Deno 3.0.
Related to https://github.com/denoland/deno/pull/31490
2025-12-03 15:27:09 -08:00
denobot
49fa02d988
fix(ext/node): url.domainToASCII returns empty string for invalid domains ( #31219 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
## Summary
This PR fixes the behavior of `url.domainToASCII` to match Node.js by
returning an empty string when an invalid domain is passed, instead of
throwing an error.
## Changes
- Modified `op_node_idna_domain_to_ascii` in `ext/node/ops/idna.rs` to
return an empty string on error instead of propagating the error
- Updated documentation in `ext/node/polyfills/internal/idna.ts` to
clarify this behavior
- Added spec test in `tests/specs/node/url_domain_to_ascii/` to verify
the fix
## Test Plan
### Manual Testing
Tested with the example from the issue:
```javascript
import url from 'node:url';
console.log(url.domainToASCII('xn--iñvalid.com')); // Returns empty string instead of throwing
```
Also tested with various valid and invalid domains to ensure
compatibility:
- Valid domains: `example.com` → `example.com`
- Valid unicode: `münchen.de` → `xn--mnchen-3ya.de`
- Invalid punycode: `xn--iñvalid.com` → `` (empty string)
- Invalid domain: `xn--` → `` (empty string)
### Automated Tests
Added spec test that verifies the behavior matches Node.js for both
valid and invalid domains.
## Closes
Fixes #31133
---
_This PR was autogenerated and may require review and adjustments._
🤖 Generated with [Claude Code](https://claude.com/claude-code )
---------
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Rahmanto <daniel.rahmanto@gmail.com>
2025-12-03 21:57:53 +07:00
Daniel Osvaldo Rahmanto
95e434eb37
fix(ext/node): respect abort signal option on FileHandle.readFile ( #31462 )
...
Towards #29972
Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-promises-file-handle-readFile.js
test to pass.
2025-12-02 08:13:11 +07:00
Nicholas R
42b6c82254
fix(node/process): make process.stdin.isTTY writable ( #31464 )
...
## Summary
In Node.js, `tty.ReadStream` sets `isTTY` as a simple instance property
(`this.isTTY = true`), making it naturally writable. Deno's polyfill
used a getter-only property definition, preventing assignment.
Some npm packages need to override `isTTY` at runtime. For example,
Playwright's test server sets `process.stdin.isTTY = undefined` to
prevent reporters from blocking on user input during UI mode
(microsoft/playwright#37867).
This aligns stdin with the stdout/stderr fix from #26130 , ensuring all
stdio streams behave consistently with Node.js.
## Refs
-
6a1a3ba045/lib/tty.js (L71)
-
3a5a32d26d/packages/playwright/src/runner/testServer.ts (L257-L266)
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-02 00:37:23 +01:00
xtqqczze
3680f8b799
fix: clippy::derivable_impls ( #31460 )
...
https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
2025-12-02 00:21:36 +01:00
ryu
efa4da8643
fix(ext/web): console.dir respects indent level ( #31412 )
...
ci / pre-build (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 / lint debug linux-x86_64 (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 / 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 / lint debug macos-x86_64 (push) Has been cancelled
ci / lint debug windows-x86_64 (push) Has been cancelled
ci / build libs (push) Has been cancelled
ci / publish canary (push) Has been cancelled
It looks more natural if you respect the indentation of `console.group`.
`console.dir` on Node.js also respects group indentation, so this
improves Node.js compat.
Test code:
```ts
console.dir("1");
console.group();
console.dir("2");
console.group();
console.dir("3");
console.groupEnd();
console.dir("4");
console.groupEnd();
console.dir("5");
```
current output:
```sh
1
2
3
4
5
```
this pr output:
```sh
1
2
3
4
5
```
2025-11-29 00:36:57 +01:00
Bartek Iwańczuk
4c228b455d
fix(ext/node): reimplement setImmediate API ( #30328 )
...
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-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 / 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 / publish canary (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/28016
2025-11-28 11:05:41 +01:00
David Sherret
ef3192d879
fix(node/timers): ensure active timers entry is deleted on Timeout.prototype.refresh ( #31436 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/31435
2025-11-27 14:03:27 -05:00
ud2
24a0209fa1
feat(ext/web): add ImageData Float16Array support ( #31394 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Implements whatwg/html#11143 .
2025-11-27 13:04:43 +01:00
Nathan Whitaker
faf9505814
fix(node): support advanced serialization in IPC ( #31380 )
...
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-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 / 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 / publish canary (push) Blocked by required conditions
Fixes #31354 .
2025-11-26 23:15:32 +00:00
Nathan Whitaker
3e22a737ed
perf(node): optimize Buffer compare ( #31425 )
...
Implements the comparison part in native code, which effectively uses
memcmp instead of comparing byte by byte
Benchmark:
```ts
import { bench, run } from "mitata";
import { Buffer } from "node:buffer";
const a = Buffer.from(new Array(8 * 1024 * 1024).fill(2));
const b = Buffer.from(new Array(8 * 1024 * 1024).fill(2));
bench("Buffer.compare offset", () => a.compare(b, 6, undefined, 10));
bench("Buffer.compare full", () => Buffer.compare(a, b));
await run();
```
Before:
```
❯ deno run -A compare.mjs
cpu: Apple M3 Max
runtime: deno 3.0.0-rc.0+0bd52c4 (aarch64-apple-darwin)
benchmark avg (min … max) p75 / p99
------------------------------------------- ---------
Buffer.compare offset 14.95 ms/iter 15.22 ms
(14.29 ms … 17.19 ms) 16.83 ms
( 1.09 kb … 9.75 kb) 1.64 kb
Buffer.compare full 17.67 ms/iter 19.75 ms
(14.17 ms … 23.50 ms) 22.59 ms
(696.00 b … 776.00 b) 698.05 b
```
After:
```
❯ devdeno run -A compare.mjs
cpu: Apple M3 Max
runtime: deno 3.0.0-rc.0 (aarch64-apple-darwin)
benchmark avg (min … max) p75 / p99
------------------------------------------- ---------
Buffer.compare offset 172.66 µs/iter 173.21 µs
(162.38 µs … 284.37 µs) 212.33 µs
( 0.00 b … 352.40 kb) 1.03 kb
Buffer.compare full 167.45 µs/iter 167.33 µs
(151.21 µs … 266.63 µs) 224.79 µs
( 0.00 b … 448.40 kb) 1.12 kb
```
2025-11-26 23:39:14 +01:00
Daniel Osvaldo Rahmanto
0bd52c4640
fix(ext/node): implement DatabaseSync.function() and better error details ( #31386 )
...
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / bench release linux-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 / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (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 / publish canary (push) Blocked by required conditions
Closes #30097
Implementation is based on
https://github.com/nodejs/node/blob/v24.2.0/src/node_sqlite.cc
Changes in this PR allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-custom-functions.js
test to pass.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-11-25 14:14:27 +00:00
Nathan Whitaker
7ad8750fe9
perf(node): implement getOwnNonIndexProperties in native code ( #31393 )
...
This speeds up assertions on typed arrays by a ton. This unblocks one of
the node compat tests for advanced serialization, which times out
because the assertion is too slow.
Bench:
```
import assert from "node:assert";
const iters = 10;
let total = 0;
for (let i = 0; i < iters; i++) {
const start = performance.now();
assert.deepStrictEqual(
new Uint8Array(8 * 1024 * 1024).fill(0),
new Uint8Array(8 * 1024 * 1024).fill(0),
);
const end = performance.now();
total += end - start;
}
console.log("took", total / iters, "per iter");
```
Before:
```
took 2634.9984669 per iter
```
After:
```
took 15.0644873 per iter
```
So over 100x faster
2025-11-24 21:25:19 +00:00
Daniel Osvaldo Rahmanto
f881b2f9a7
fix(ext/node): autopadding behavior on crypto.Cipheriv ( #31389 )
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 / 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 / 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 / publish canary (push) Blocked by required conditions
2025-11-24 18:33:57 +07:00
Daniel Osvaldo Rahmanto
f61f5ffe7b
fix(ext/node): StatementSync.iterate() should reset is_iter_finished flag on every call ( #31361 )
2025-11-20 23:22:26 +07:00
Bartek Iwańczuk
9498b36170
refactor: remove 'managed globals' infra ( #31318 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
This should also solve problems in
https://github.com/denoland/deno/issues/30905#issuecomment-3517418642 .
2025-11-20 12:29:00 +01:00
Daniel Osvaldo Rahmanto
491274d6ed
fix(ext/node): implement dns.lookupService ( #31310 )
...
Closes #26300
Allows the following node compatibility tests to pass:
-
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-dns-lookupService-promises.js
-
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-dns-lookupService.js
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added `dns.lookupService()` for reverse DNS lookups, supporting both
callback and Promise-based APIs.
* Returns hostname and service information for a given IP address and
port combination.
* **Tests**
* Added unit tests for new DNS lookupService functionality across
callback and Promise variants.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-20 11:12:26 +00:00
Marvin Hagemeister
dbe35b03fb
fix(node): stub missing process.sourceMapsEnabled ( #31358 )
...
See https://nodejs.org/api/process.html#processsourcemapsenabled
This fixes an issue in Fresh with vite's environment API which relies on
this property to check if vite should map stack traces
https://github.com/vitejs/vite/blob/main/packages/vite/src/module-runner/sourcemap/index.ts#L17
2025-11-20 09:39:24 +00:00
Bartek Iwańczuk
030826f589
refactor(ext/web): don't accept generic BroadcastChannel ( #31330 )
...
Removes generic `BC` option from the `deno_web` extension - leaving a
single, concrete implementation of the `InMemoryBroadcastChannel`.
2025-11-20 10:04:55 +01:00
David Sherret
82eba477fb
feat: add --ignore-env=... ( #31187 )
...
Adds the ability to ignore certain environment variables and return
`undefined` instead of erroring.
2025-11-19 15:49:06 +00:00
Daniel Osvaldo Rahmanto
3c0f2890eb
fix(ext/node): segfault on calling StatementSync methods after connection has closed ( #31331 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
Previously, running this code causes segfault:
```ts
import { DatabaseSync } from "node:sqlite";
const db = new DatabaseSync(':memory:');
const stmt = db.prepare('SELECT 1 AS value');
db.close();
stmt.get(); // segmentation fault (core dumped)
```
Changes in this PR also allows the
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-statement-sync-columns.js
test to pass.
2025-11-19 08:56:09 +07:00
Asher Gomez
90ef8527e4
feat(ext/web): stabilize BroadcastChannel ( #30770 )
...
Closes #30044
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2025-11-18 12:47:23 +01:00
Vamshi Krishna Pendyala
5b53514e8a
fix(node): ensure process.argv is an array of strings ( #31322 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
This PR resolves #30964 where process.argv returned getter functions
rather than string values.
---------
Co-authored-by: Daniel Rahmanto <daniel.rahmanto@gmail.com>
2025-11-18 10:39:00 +01:00
Ishita SIngh
ccc9aba580
fix(node/assert): deepStrictEqual now correctly handles Number objects ( #31233 )
...
Fixes #31172
## Description
The `deepStrictEqual` function was using `asserts.equal()` which doesn't
properly handle boxed primitives like Number objects. Changed it to use
`isDeepStrictEqual()` from `comparisons.ts` which correctly handles
Number, String, Boolean, BigInt, and Symbol objects.
## Changes
- Modified `ext/node/polyfills/assert.ts`:
- Added import for `isDeepStrictEqual` from
`ext:deno_node/internal/util/comparisons.ts`
- Updated `deepStrictEqual` function to use `isDeepStrictEqual()`
instead of `asserts.equal()`
- Added test cases in `tests/unit_node/assert_test.ts`:
- Test that `deepStrictEqual` throws `AssertionError` for different
Number objects
- Test that `deepStrictEqual` passes for equal Number objects
## Testing
Added unit tests to verify:
- `deepStrictEqual` throws `AssertionError` for different Number objects
(e.g., `new Number(1)` vs `new Number(2)`)
- `deepStrictEqual` passes for equal Number objects (e.g., `new
Number(1)` vs `new Number(1)`)
## Related Issue
#31172 - `assert.deepStrictEqual` does not throw exception for Number
objects
---------
Co-authored-by: Daniel Rahmanto <daniel.rahmanto@gmail.com>
2025-11-18 09:02:21 +07:00
Nathan Whitaker
5421a29944
refactor: remove permission traits + generics from extension crates ( #31284 )
...
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 / 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 / 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 / publish canary (push) Blocked by required conditions
I also moved the `RuntimePermissionDescriptorParser` struct from
deno_runtime into deno_permissions, so that extension crates can use it
in tests and stuff like that
2025-11-17 10:30:36 -08:00
Daniel Osvaldo Rahmanto
74eff7bcd4
fix(ext/node): sqlite setAllowUnknownNamedParameters error message ( #31319 )
...
Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-named-parameters.js
to pass.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected an error message for SQLite named parameters validation to
display the expected parameter name accurately.
* **Tests**
* Added new test coverage for SQLite named parameters functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-17 23:04:13 +07:00
Daniel Osvaldo Rahmanto
f48bd04877
fix(ext/node): sqlite.DatabaseSync explicit resource management compatibility ( #31311 )
...
Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-sqlite-database-sync-dispose.js
to pass
2025-11-17 14:58:49 +07:00
Sravanth
863abe816e
feat(ext/node): implement FileHandle.appendFile(data[, options]) ( #31301 )
...
Part of #25554
This PR adds support for the missing `FileHandle.appendFile()` API in
the Node.js compatibility layer.
2025-11-17 08:57:04 +01:00