Commit graph

319 commits

Author SHA1 Message Date
Yoshiya Hinosawa
e56dc01cb8
fix(ext/node): add "internal/http2/util" module (#29474) 2025-05-28 21:46:36 +09:00
Yoshiya Hinosawa
3de21f1b8d
fix(ext/node): add fchown and fchownSync to node:fs (#29408)
Some checks failed
ci / pre-build (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 / 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 / build wasm32 (push) Has been cancelled
ci / publish canary (push) Has been cancelled
2025-05-23 15:00:39 +09:00
Divy Srivastava
ff2354be0b
fix(ext/node): Fix Database#exec should return undefined (#29368) 2025-05-19 19:20:49 -07:00
Divy Srivastava
3c6a99fce3
fix(ext/node): handle null ssl options in node:https (#29365)
Fixes https://github.com/denoland/deno/issues/29364
2025-05-19 07:55:15 +02:00
Divy Srivastava
e6c2ad1431
fix(ext/node): TLS server unref (#29279)
Fixes https://github.com/denoland/deno/issues/29230
2025-05-13 21:38:41 +05:30
Divy Srivastava
acd0c94b46
fix(ext/node): add AES CTR to supported ciphers list (#29273)
Fix https://github.com/denoland/deno/issues/29047
2025-05-13 09:45:36 +05:30
Yoshiya Hinosawa
363223aa6a
fix(ext/node): export CallTracker as named export (#29271) 2025-05-13 10:15:48 +09:00
Divy Srivastava
5044f2f355
fix(ext/node): hold weak reference to sqlite database in instances (#29210)
Deterministic close and releases file lock on Windows.

Fixes https://github.com/denoland/deno/issues/29033
2025-05-10 09:21:53 +05:30
Divy Srivastava
b14e104306
fix(ext/node): use "localhost" as default tls hostname (#29231)
Fixes https://github.com/denoland/deno/issues/29229
2025-05-10 09:21:49 +05:30
Divy Srivastava
9d0a833e7b
fix: bump default @types/node version range to 22.15.14 (#28407)
Fixes https://github.com/denoland/deno/pull/28168#discussion_r1982740706

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-05-08 17:44:22 +00:00
Marvin Hagemeister
ed55e915a2
fix(node:http): ServerResponse.req not set (#29211)
This PR sets `ServerRsposne.req` properly. See
e38ce27f3c/lib/_http_server.js (L201)

Fixes https://github.com/denoland/deno/issues/29209
2025-05-08 18:42:04 +02:00
Satya Rohith
5f139910a1
fix(ext/node): support http over unix sockets (#29182)
Closes https://github.com/denoland/deno/issues/20255

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-08 22:07:28 +05:30
Divy Srivastava
5b037f1bed
fix(ext/node): getColorDepth for writable stdio streams (#29176)
Fixes https://github.com/denoland/deno/issues/28605
Fixes https://github.com/denoland/deno/issues/29175

` ../deno/target/debug/deno run -A npm:create-vue@latest DIR` works now
2025-05-06 21:42:14 +05:30
nana4gonta
730f48b170
fix(ext/node): Support mTLS connections node compatibility (#28937)
Support for running Node.js code that requires mTLS connections on Deno.

Ref #21497 

Closes https://github.com/denoland/deno/issues/26472
Closes https://github.com/denoland/deno/issues/29148

---------

Co-authored-by: Satya Rohith <me@satyarohith.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-06 14:25:18 +05:30
Divy Srivastava
2edc70e679
fix(ext/node): Fix dns.lookup when promisified with options.all (#29167)
Fixes https://github.com/denoland/deno/issues/29074

Co-authored-by: Satya Rohith <me@satyarohith.com>
2025-05-06 09:16:00 +05:30
Nathan Whitaker
05574665b2
fix(ext/node): work correctly with wrapper Response objects, use correct rawHeaders structure (#29056)
Fixes https://github.com/denoland/deno/issues/28022

Basically drizzle-kit studio uses hono with the node-server adapter.
That creates wrapper objects for responses that forward property getters
to the underlying response (the one we provided). However, in deno.serve
we were assuming that the response was actually the same response we
initially gave and crashed when it wasn't. instead, just call the
property getters if we can't find the inner response.

The raw headers bug is that we were exposing the `rawHeaders` field on
`Incoming` as a `Headers` object, instead it's supposed to be a flat
array of the header keys + values. I.e. `["Content-Type:",
"application/json", "Host:", "http://localhost"]`
2025-04-30 00:14:29 +00:00
siaeyy
1a171f10df
fix(ext/node): handle "ttl" option in "dns" module (#27676)
Closes #27669

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-04-29 22:49:10 +00:00
Divy Srivastava
e0813f2255
fix(ext/node): throw NotCapable on process.env accessor (#28280)
Fixes https://github.com/denoland/deno/issues/28125

Additionally "FORCE_COLOR" env var can now be accessed 
without `--allow-env` check.
---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-04-28 14:28:01 +00:00
Yoshiya Hinosawa
84b192ee5d
fix(ext/node): fix deepStrictEqual(-0, 0) (#29060) 2025-04-27 22:19:36 +09:00
ctrl+d
cf02f770aa
fix(ext/node): fix handling of abort signal in readFile (#29028)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-04-25 14:48:12 +09:00
Jim Buzbee
1feb2b6421
fix(ext/node): honor flags with respect to reuseAddress when binding to a UDP socket (#28156)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-04-22 17:49:14 +09:00
Divy Srivastava
5867988bae
fix(ext/node): Fix Writable.toWeb() (#28914)
Fixes https://github.com/denoland/deno/issues/28905
2025-04-15 20:10:48 +02:00
Divy Srivastava
01b6da9d9b
fix(ext/node): upgrade node:stream (#28855)
Ref https://github.com/denoland/deno/issues/28836

This PR replaces the _stream.mjs bundle with a file-by-file port instead. A codemod transpiles Node.js internals to ESM. The codemod performs three tasks: translating CJS to ESM, remapping internal dependencies, and hoisting lazy requires as imports.

The process is fully automated through the `update_node_stream.ts` script, simplifying future internal updates. The script checks out Node.js from a specific tag defined in the `tests/node_compat/runner`.

Additionally, the update enables new tests in our Node test runner and adds features (like compose()) that were missing from the outdated bundle.

## Performance

There is a 140KB+ binary size increase on aarch64-apple-darwin and nop startup time stays the same.
2025-04-14 21:35:34 +05:30
Divy Srivastava
0d72316fbf
fix(ext/node): implement finished() for web streams (#28600)
Fixes https://github.com/denoland/deno/issues/28590
2025-04-10 17:23:50 +05:30
Divy Srivastava
b26c30d938
fix(ext/node): return Buffer from crypto cipher APIs (#28826)
Fixes https://github.com/denoland/deno/issues/28633
2025-04-10 08:01:30 +00:00
Arsh
447b5038c0
fix(ext/node): alias shake-128 and shake-256 hash algorithms (#28451)
Fixes #28442

---------

Signed-off-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-04-10 07:58:44 +00:00
Yoshiya Hinosawa
cb00561e97
fix(ext/node): support input option in spawnSync (#28792) 2025-04-09 13:42:12 +09:00
Sebastien Guillemot
e2341c7949
fix(ext/node): add createReadStream & createWriteStream methods to the FileHandle class (#28700)
Co-authored-by: Nikolay Karadzhov <nkaradzhov89@gmail.com>
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-04-07 17:13:32 +09:00
Yoshiya Hinosawa
f2d73abdd7
fix(ext/node): better dns.lookup compatibility (#27936) 2025-04-02 11:38:07 +09:00
Divy Srivastava
5bc4266101
fix(ext/node): sqlite handle empty blob being NULL (#28674)
Fixes https://github.com/denoland/deno/issues/28672
2025-04-01 13:50:26 +00:00
Jake Champion
0f40ee7ff4
fix(ext/node): support the optional previousValue parameter for process.cpuUsage() (#28550) 2025-04-01 20:48:09 +09:00
Yoshiya Hinosawa
6c2f7835c0
fix(ext/node): emit 'close' event on ServerResponse object when client aborted the request (#28601) 2025-03-27 10:45:04 +09:00
Divy Srivastava
52d528d21d
fix(ext/node): mkdir() parse file mode (#28609)
Fixes https://github.com/denoland/deno/issues/28604
2025-03-25 09:33:41 +05:30
Yoshiya Hinosawa
d07b7ea6f6
fix(ext/node): propagate 'close' event of IncomingMessage to Socket (#28582) 2025-03-24 10:56:34 +09:00
Divy Srivastava
fb3df15fc8
fix(ext/node): restrict ATTACH DATABASE statement (#28513)
Disable `ATTACH DATABASE` statement in `node:sqlite` since it is not
supervised by Deno's permission system
2025-03-18 22:03:35 +05:30
Divy Srivastava
c638f9ade1
fix(ext/node): reset statement immidiately in run() (#28506)
Fixes https://github.com/denoland/deno/issues/28492
2025-03-15 20:14:24 +05:30
Divy Srivastava
e66ef32a8f
fix(ext/node): SQLite reset guards to prevent database locks (#28298)
Fixes https://github.com/denoland/deno/issues/28295
2025-02-25 19:27:55 +05:30
Divy Srivastava
7fa8fc4b26
fix(ext/node): descriptive sqlite error messages (#28272)
Fixes https://github.com/denoland/deno/issues/28259
2025-02-24 17:55:36 +05:30
Divy Srivastava
648ee8f0e7
fix(ext/node): decipherIv() range error on invalid final block length (#28215)
Fixes https://github.com/denoland/deno/issues/28208
2025-02-21 04:48:38 +00:00
Divy Srivastava
c1276d8fa0
fix(ext/node): rewrite SQLite named parameter handing (#28197)
Allow bare named params and handle invalid param name. Also adds
`StatementSync#setAllowBareNamedParameters`

Fixes https://github.com/denoland/deno/issues/28183
2025-02-20 18:34:34 +05:30
Divy Srivastava
664d50fab8
fix(ext/node): Fix handling of sqlite large integers (#28193)
Use `v8::Number` instead of `v8::Integer` to handle > i32::MAX.

Fixes https://github.com/denoland/deno/issues/28187
2025-02-20 16:32:46 +05:30
Gowtham K
9b9eeabcc8
fix(node/sqlite): sqlite named parameters (#28154)
This PR introduces support for named parameters in SQLite queries, as
outlined in #28134
2025-02-18 22:03:39 +05:30
Divy Srivastava
4ab380e0a7
fix(ext/node): implement StatementSync#iterate (#28168)
Fixes https://github.com/denoland/deno/issues/28130
2025-02-18 21:26:17 +05:30
Divy Srivastava
196ceb76bb
fix(ext/node): DatabaseSync#exec should execute batch statements (#28053)
Fixes https://github.com/denoland/deno/issues/28050
2025-02-11 19:52:33 +05:30
Bartek Iwańczuk
15cfa05fa6
test: remove one of 'node_unit_tests::tls_test' tests (#27985)
It will be moved to `npm_smoke_tests` repo instead
2025-02-06 17:13:07 +01:00
Divy Srivastava
4a2b8fc22d
fix(ext/node): expose sqlite changeset constants (#27992)
https://nodejs.org/api/sqlite.html#sqliteconstants
2025-02-06 13:08:40 +05:30
Divy Srivastava
a401a79c75
fix(ext/node): fix missing privateKey.x in curve25519 JWK (#27990)
Fixes https://github.com/denoland/deno/issues/27972
2025-02-06 12:11:42 +05:30
Divy Srivastava
28faaee772
fix(ext/node): throw Session methods when database is closed (#27968) 2025-02-06 08:52:49 +05:30
Divy Srivastava
ece384c094
fix(ext/node): implement DatabaseSync#applyChangeset() (#27967)
https://nodejs.org/api/sqlite.html#databaseapplychangesetchangeset-options

```js
const sourceDb = new DatabaseSync(':memory:');
const targetDb = new DatabaseSync(':memory:');

sourceDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');
targetDb.exec('CREATE TABLE data(key INTEGER PRIMARY KEY, value TEXT)');

const session = sourceDb.createSession();

const insert = sourceDb.prepare('INSERT INTO data (key, value) VALUES (?, ?)');
insert.run(1, 'hello');
insert.run(2, 'world');

const changeset = session.changeset();
targetDb.applyChangeset(changeset);
// Now that the changeset has been applied, targetDb contains the same data as sourceDb. 
```
2025-02-06 08:52:39 +05:30
Divy Srivastava
28834a89bb
fix(ext/node): implement SQLite Session API (#27909)
https://nodejs.org/api/sqlite.html#class-session

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-02-04 21:59:13 +05:30