Commit graph

3167 commits

Author SHA1 Message Date
Felipe Cardozo
48f273b8c9
fix(ext/node): process.moduleLoadList as undefined (#31022) 2025-10-20 14:51:46 +00:00
David Sherret
05958afda0
fix(npm): handle deno run/install of npm package with only directories.bin (#30919) 2025-10-17 12:06:15 -04:00
Daniel Osvaldo Rahmanto
a44f0cb99f
fix(ext/node): support option object parameter on fs.write and fs.writeSync (#30999)
Some checks are pending
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 / 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
Closes #30972

Other changes:
- Re-enables ignored tests on `tests/unit_node/_fs/_fs_write_test.ts`
- Ported the polyfill to `.ts`, though defining the types are tricky
since our implementation (ported from node) mutates a lot of variables.
2025-10-17 14:28:31 +02:00
snek
e8fe235d54
feat(ext/http): make websocket response headers mutable (#31000) 2025-10-17 10:59:39 +02:00
Nayeem Rahman
dd10efa4ef
fix: show referrer range in deno_core loader errors (#30981) 2025-10-14 14:09:12 +01:00
CPunisher
e2b107867e
fix(napi): Fix misused napi_callback_info in CallbackInfo (#30983)
Some checks are pending
ci / build libs (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 / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
2025-10-14 09:57:49 +02:00
Daniel Osvaldo Rahmanto
80e54a81e7
fix(ext/node): checking Symbol in env should not ask for permission (#30965)
Discovered on #30905, though not directly addressing the main issue

Given this code: 
```ts
console.log(globalThis.process.env)
```

Deno 2.5.4:
```bash
➜ deno index.ts 
 Granted env access to "Symbol(Deno.customInspect)".
 Granted env access to "Symbol(Deno.privateCustomInspect)".
 Granted env access to "Symbol(nodejs.util.inspect.custom)".
 Granted env access to "constructor".
 Granted env access to "Symbol(Symbol.iterator)".
 Granted env access.
[..result..]
```

This PR:
```bash
➜ deno index.ts
 Granted env access to "constructor".
 Granted env access.
[..result..]
```

Futhermore, it allows the following tests to pass:
-
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-process-env-deprecation.js
-
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-process-env-ignore-getter-setter.js
2025-10-14 08:25:35 +02:00
Bartek Iwańczuk
710418c097
fix: Deno.serve correctly passes tcpBacklog option (#30748)
Typo made in https://github.com/denoland/deno/pull/30541
2025-10-13 11:45:46 +02:00
Daniel Osvaldo Rahmanto
03a5e4531b
fix(ext/node): dns.resolve6 compatibility (#30974)
Closes #30936

The `compressIPv6` function is causing this issue. Maybe it was used in
the past to compress IPv6 address returned from the op function, though
I might be wrong about this.

Both `Deno.resolveDns` and the `resolve6` polyfill use `op_dns_resolve`
op function, which returns a result that already matches with the
Node.js' `resolve6`. The incorrect result is due to our `resolve6`
polyfill applying the `compressIPv6` function to the result.
2025-10-13 11:20:08 +02:00
codepage949
302b6fc5a5
fix(ext/web): fix promise chain leak of ReadableStream (#30871)
Closes #30298

This problem occurs because promise chain keep growing(like a stack
overflow caused by a recursive function) while the stream is running. To
solve this, used a loop.
2025-10-13 11:12:40 +02:00
Daniel Osvaldo Rahmanto
cce15c39b8
fix(ext/node): path.matchesGlob compatibility (#30976)
Some checks failed
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-10-11 15:09:27 -04:00
Divy
15ef715f20
fix(process): case insenstive check for disallowing .bat and .cmd (#30967)
Some checks are pending
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 / 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
2025-10-10 17:13:26 +05:30
denobot
6fbce91e40
2.5.4 (#30961)
Some checks failed
ci / pre-build (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 / 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 / publish canary (push) Has been cancelled
Bumped versions for 2.5.4

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-10-09 11:41:56 +02:00
Bartek Iwańczuk
a0172f07c3
test: update autobahn test suite (#30951) 2025-10-08 14:29:04 +00:00
Azeem Pinjari
386f3b2830
fix: use ArrayIsArray primordial (#30927)
Closes #30892.
2025-10-07 00:01:51 +02:00
Daniel Osvaldo Rahmanto
07a2389c70
fix(ext/node): fs.cp and fs.cpSync compatibility (#30502)
Closes #27494

Changes are based on Node.js' implementation. This allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-cp.mjs
test to pass.
2025-10-06 23:55:26 +02:00
Daniel Osvaldo Rahmanto
d9ef5d39c7
fix(ext/node): map BadResource error to the corresponding node error (#30926)
Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-stat-bigint.js
test to pass
2025-10-06 17:35:15 +02:00
snek
d49dda30b1
fix(webgpu): crash after isolate disposal (#30909)
Some checks failed
ci / pre-build (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
ci / build libs (push) Has been cancelled
this loop doesn't inherently stop running when the isolate stops
running, so use the isolate task spawner to ensure logic only runs when
the event loop is still running. it would be nice to move this logic
inside the DeviceErrorHandler (we could get rid of the task loop!) but
it creates a cyclic dependency on the device object which was annoying
to think about.
2025-10-04 07:53:24 +02:00
Daniel Osvaldo Rahmanto
23671da135
fix(ext/node): fs.realpath buffer encoding (#30885)
Towards #29972

Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-realpath-buffer-encoding.js
test to pass.

---------

Co-authored-by: Divy <dj.srivastava23@gmail.com>
2025-10-03 20:16:26 -07:00
Daniel Osvaldo Rahmanto
805973385d
fix(ext/node): omit smi from zlib.crc32 op function (#30907)
Some checks are pending
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
Closes #30636
2025-10-03 13:57:30 -07:00
Daniel Osvaldo Rahmanto
1573279c12
fix(ext/node): fs.stat and fs.statSync compatibility (#30866)
Some checks are pending
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-10-03 11:34:01 -04:00
Yusuke Tanaka
415acdd462
fix(ext/node): avoid stack overflow in node:zlib's gunzip (#30865)
Fixes #30829

## Problem

The zlib polyfill had recursive calls between `processCallback` and
`handle.write()` that caused stack overflow when decompressing large
data.

## Solution

Defer `handle.write()` calls with `process.nextTick()` to break the
synchronous call chain.

## Changes
- `ext/node/polyfills/zlib.js`: Wrapped `handle.write()` in
`process.nextTick()`
- `tests/unit_node/zlib_test.ts`: Added test for 64MiB data
decompression
2025-10-03 17:57:23 +09:00
Daniel Osvaldo Rahmanto
926bcbc4c2
fix(ext/node): inspect X509Certificate class (#30882)
Fixes #30874
2025-10-03 13:49:56 +05:30
denobot
1c3d04cfaf
2.5.3 (#30903)
Some checks are pending
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
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-10-02 22:05:24 -04:00
David Sherret
1ab2268c0b
fix(fs): improve file stat checks (#30876)
Some checks are pending
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-09-29 20:28:06 -04:00
David Sherret
992e998dfe
fix(fs): improve file utime checks (#30872)
Improves the checks on FsFile.prototype.utime
2025-09-29 18:56:38 -04:00
Bartek Iwańczuk
ecfd6ae6fa
chore: upgrade to Rust 1.90 (#30793)
Co-authored-by: Divy Srivastava <me@littledivy.com>
2025-09-29 15:16:55 -04:00
Daniel Osvaldo Rahmanto
0d73ac088a
fix(ext/node): setTimeout promisified to handle abort signal (#30855)
Some checks are pending
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 #30839
2025-09-26 17:12:15 +02:00
Divy
ade24896b2
fix(ext/node): allow ATTACH DATABASE with --allow-all (#30763) 2025-09-25 14:36:50 +05:30
denobot
0278715639
2.5.2 (#30835)
Some checks are pending
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 / 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
Bumped versions for 2.5.2

Co-authored-by: nayeemrmn <nayeemrmn@users.noreply.github.com>
2025-09-24 21:42:53 +02:00
Daniel Osvaldo Rahmanto
dcc9474175
fix(ext/node): fs.readFile, fs.readFileSync assert encoding (#30830)
Towards #29972

- Validates the encoding of `readFile`.
- Fixes the handling of `binary` encoding where previously it returns
Buffer. On Node.js, Buffer is only returned when the encoding is not
specified.
- Allows
[parallel/test-fs-read-file-assert-encoding.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-read-file-assert-encoding.js)
test to pass.
2025-09-24 15:32:41 +02:00
Daniel Osvaldo Rahmanto
e7f179305b
chore: use SymbolAsyncDispose and SymbolDispose primordials (#30828)
Follow up to https://github.com/denoland/deno_core/pull/1200
2025-09-24 13:23:35 +02:00
Divy
8a0990ccd3
fix: reject running .bat and .cmd directly on windows (#30818)
Some checks are pending
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-09-24 10:35:37 +05:30
Nathan Whitaker
d82f509c41
perf: stack allocated v8 scopes (#30827)
Some checks are pending
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-09-23 17:54:14 -07:00
Daniel Osvaldo Rahmanto
2ad17f7c7c
fix(ext/node): crypto Cipheriv and Decipheriv base64 encoding (#30806)
Some checks are pending
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 / 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 #30722

The root cause comes from the `.update()` and `.final()` methods of
`Cipheriv` and `Decipheriv`, which internally calls `.toString()` method
of Buffer. Doing so adds padding to make the output length a multiple of
4, which we don't want for this case. This PR replaces that to use
`StringDecoder` instead, making it more aligned with the Node.js
implementation.
2025-09-23 11:38:06 +02:00
Bartek Iwańczuk
7938d5d2a4
refactor: adjust to latest inspector changes in deno_core (#30775)
Some checks failed
ci / pre-build (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
ci / test debug linux-aarch64 (push) Has been cancelled
Ref https://github.com/denoland/deno_core/pull/1196

There are no functional changes in this PR - just adjusting
to the API change.
2025-09-20 19:14:26 +02:00
snek
4772778107
refactor: http upgrade internals (#30612)
Some checks are pending
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 / 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)
Some checks are pending
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
9399f7b894
refactor: Rewrite usages of V8 inspector to the new API (#30743)
Some checks are pending
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 / 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
Based on https://github.com/denoland/deno_core/pull/1193.

This commit rewrites 3 parts of the system to use a new "sync"
V8 inspector API exposed by `deno_core`:
- REPL
- coverage collection
- hot module replacement

Turns out the async abstraction over V8 inspector was unnecessary
and actually greatly complicated usage of the inspector.

Towards https://github.com/denoland/deno/issues/13572
Towards https://github.com/denoland/deno/issues/13206
2025-09-17 16:11:03 +02:00
Luca Casonato
c46393755d
fix(ext/ws): send User-Agent header in WS handshake (#30758) 2025-09-17 15:00:54 +02:00
denobot
4c1cdfc9a4
2.5.1 (#30753)
Bumped versions for 2.5.1

---------

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-09-17 01:58:00 +02:00
Daniel Osvaldo Rahmanto
fc6f0d38a3
fix(ext/node): implement fchmod on windows (#30704)
- Also fixes `node:fs.fstat` because it was incorrectly showing the file
mode on windows, which is needed by the node compat test.
- Moves the `stat_extra` function from `ext/fs/std_fs.rs` (deno_fs) into
`ext/io/lib.rs` (deno_io), because it's more convenient to export it
from there letting us to use the function on `deno_fs` and `deno_io`,
and currently `deno_fs` had already used `deno_io` as a dependency.
- Allows
[parallel/test-fs-chmod-mask.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-chmod-mask.js)
and
[parallel/test-fs-chmod.js](https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-chmod.js)
tests to pass.
2025-09-16 09:22:37 -04:00
Daniel Osvaldo Rahmanto
d8c186196c
fix(ext/node): validate fs.read on empty buffer (#30706)
Towards #29972

Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-read-empty-buffer.js
test to pass.
2025-09-16 11:16:17 +02:00
Daniel Osvaldo Rahmanto
0ad6a5eb7f
fix(ext/node): make fs.glob accepts URL cwd (#30705)
Towards #29972

Allows
https://github.com/nodejs/node/blob/v24.2.0/test/parallel/test-fs-glob.mjs
to pass.
2025-09-16 11:12:08 +02:00
Bartek Iwańczuk
4a1f63b930
Revert "fix(ext/node): fs.stat and fs.statSync compatibility (#30… (#30741)
Some checks are pending
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
Luca Casonato
4b81955f03
feat(unstable): tcp proxy for Deno.HttpClient (#30700)
Allows doing proxies with `Deno.HttpClient` easially.
2025-09-15 16:50:12 +00:00
Daniel Osvaldo Rahmanto
432761aac5
fix(ext/node): fs.stat and fs.statSync compatibility (#30637)
Some checks are pending
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