Commit graph

2742 commits

Author SHA1 Message Date
Marvin Hagemeister
d35c6b471e fix lint 2025-04-04 18:17:51 +02:00
Marvin Hagemeister
5168180d0c chore: drop support for non class instances 2025-04-04 18:15:44 +02:00
Marvin Hagemeister
c593686338 feat(serve): support export default class instance 2025-04-04 18:00:45 +02:00
Marvin Hagemeister
77b1b2d40d feat(serve): support export default class 2025-04-04 18:00:44 +02:00
Divy Srivastava
88b1f4a29a
chore: upgrade v8 to 135.1.0 (#28697) 2025-04-04 18:52:19 +05:30
denobot
08274e0621
chore: forward v2.2.7 release commit to main (#28746)
This is the release commit being forwarded back to main for 2.2.7

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-04-04 16:14:30 +05:30
snek
ebc4f82eca
feat: v8js metrics (#28592)
Implement
https://opentelemetry.io/docs/specs/semconv/runtime/v8js-metrics/
2025-04-03 15:18:54 +02:00
Yoshiya Hinosawa
f2d73abdd7
fix(ext/node): better dns.lookup compatibility (#27936) 2025-04-02 11:38:07 +09:00
chirsz
1e62ba12bb
fix(ext/webgpu): release current texture of surface after present (#28691)
Fixes #28207.
2025-04-01 10:07:28 -04: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
Benjamin Swerdlow
cf4afb9c9c
refactor(ext/node): export GlobalsStorage (#28683) 2025-03-31 14:00:05 -04:00
Asher Gomez
3aaa86b5c8
fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_lstat.ts (#28644)
Towards #24236
2025-03-28 10:52:33 -07:00
Kenta Moriuchi
f2299353a0
fix(webgpu): move isFallbackAdapter from GPUAdapter to GPUAdapterInfo (#28650)
fix #28618

I also fixed `Deno.privateCustomInspect`, which was defined as static
methods of the classes and was not working properly.
2025-03-28 03:08:57 -07:00
Asher Gomez
9a13bafa0e
fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_realpath.ts (#28652)
Towards #24236
2025-03-28 09:48:19 +01:00
Asher Gomez
512cf558d4
fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_readv.ts (#28645)
Towards #24236
2025-03-28 09:47:36 +01:00
denobot
a1724f5d5a
chore: forward v2.2.6 release commit to main (#28657)
This is the release commit being forwarded back to main for 2.2.6

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2025-03-28 13:32:27 +05:30
Divy Srivastava
66e03a39a3
fix(ext/websocket): cancel in-flight handshake on close() (#28598)
Fixes https://github.com/denoland/deno/issues/25126

---------

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2025-03-28 03:43:32 +00: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
Ryan Dahl
7aaec6a5af
chore: upgrade some dependencies (#28627) 2025-03-26 09:49:51 -07: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
Gene Parmesan Thomas
5b5e93ff42
fix(ext/crypto): support cross-curve ECDSA sign and verify (#28574)
Fixes #20198

The Web Crypto implementation has been artificially limiting `ECDSA` to
only the “recommended” curve/hash pairs (`P‑256/SHA‑256` and
`P‑384/SHA‑384`). The underlying `ring` APIs enforced those pairs, so
any attempt to verify signatures produced with different digests (e.g.
`P‑384` with `SHA‑256`) failed with a “Not implemented” error.

This PR rewires the ECDSA sign/verify path to use RustCrypto’s `ecdsa`
crate instead of `ring`, computes digests separately, and uses the
prehash signing/verifying API so that any `sha1`, `sha256`, `sha384` or
`sha512` can be used with either curve. The JS `SubtleCrypto` bindings
were updated to drop the hard coded checks, and a new unit test
exercises `P‑384 + SHA‑256` to ensure non‑matching combos now round
trip.

---------

Signed-off-by: Gene Parmesan Thomas <201852096+gopoto@users.noreply.github.com>
Signed-off-by: gopoto <201852096+gopoto@users.noreply.github.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-03-22 17:17:44 +00:00
Divy Srivastava
48ccb67131
chore(ext/http): add "legacy_abort" runtime flag (#28371)
Deno.serve `Request` abort signals are aborted by default even when it
is finished successfully. This PR gates this behavior behind the
"legacy_abort" which is the default right now.

Turning the `no_legacy_abort` runtime option on is a **breaking change**
and will only abort request signals when there is a failure, thereby
cannot be used to determine if the request finished. This aligns with
`fetch` API.

Ref https://github.com/denoland/deno/issues/27005
2025-03-22 08:13:57 +05:30
c00kie17
208992ad53
fix(ext/node): sqlite error details (#28431)
Improves SQLite error reporting by including `err_code`, `err_str`,
matching Node.js behavior.

Fixes #28289
2025-03-22 07:52:22 +05:30
denobot
43f6137d92
chore: forward v2.2.5 release commit to main (#28579)
NOTE: Commit 27363d389 was incorrectly landed in main before the release
completed and is not included in v2.2.5. The official v2.2.5 release was made
from the v2.2 branch.
2025-03-21 06:25:03 -07:00
snek
27363d389d
refactor: internal logging utility (#28567)
`import.meta.log` enables basic log filtering through
`env_logger`/`DENO_LOG`. Log levels are supported, and filenames can
also be used. for example: `DENO_LOG=ext:deno_http::00_serve.ts=warn`
2025-03-21 12:17:50 +01:00
Adakite
7afdff6f6c
fix(ext/os): explicitly enable sysinfoapi feature on winapi dependency (#28568)
This pr explicitly enables the `sysinfoapi` feature flag on `winapi` in
`deno_os`, so that `deno_os` and other deno crates that rely on it can
be built independently outside of the workspace on Windows.
2025-03-21 03:04:44 +00:00
snek
d4ee94962f
feat: upgrade deno_core and V8 (#28562)
includes V8 upgrade to 135
2025-03-21 00:19:44 +01:00
Yoshiya Hinosawa
6420e50cd0
fix(ext/node): add util.getCallSites (#28546)
This PR adds
[getCallSites](https://nodejs.org/api/util.html#utilgetcallsitesframecount-options)
API to "node:util".

This unblocks https://github.com/denoland/deno/issues/28318. Currently
the task is blocked by the unavailability of `util.getCallSites` because
it's used in
[`test/common/index.js`](8846b5392f/test/common/index.js (L31))
2025-03-20 21:39:04 +00:00
Lach
7ac8130854
feat(otel): basic event recording (#28552) 2025-03-20 13:58:08 -07:00
Kenta Moriuchi
50f1bbd44c
fix(otel): replace ArrayPrototypeSplit with StringPrototypeSplit (#28538) 2025-03-18 17:19:10 +00: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
Jake Champion
5aeb04f443
fix: add stackTraceLimit to ErrorConstructor interface and removed ErrorWithStackTraceLimit interface (#28539)
Signed-off-by: Jake Champion <me@jakechampion.name>
2025-03-18 09:56:39 -04:00
Paolo Barbolini
1516e3ef58
refactor: reduce dependency on futures crate (#28515)
Over time many `futures` APIs have been stabilized in `std`. This
migrates most uses to the std variants.
2025-03-17 14:14:19 +00:00
Paolo Barbolini
bb4c662660
refactor: replace memmem with memchr (#28516) 2025-03-17 09:33:51 -04:00
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
denobot
5f00b9700f
chore: forward v2.2.4 release commit to main (#28500) 2025-03-14 15:40:38 -07:00
Luke Edwards
424a2f3b57
fix(ext/node): correct STATUS_CODES strings (#28489)
Matches Node.js `http.STATUS_CODES` values now. Deno is currently
exporting an enum directly, which 1) adds keys like `BadRequest` and 2)
ships the status-text strings as non-space-delimited values (eg,
`'BadRequest`` instead of `'Bad Request'`)

Signed-off-by: Luke Edwards <luke.edwards05@gmail.com>
2025-03-13 14:21:08 -04:00
Max
c892cd88c8
chore(ext/fetch): re-export FsError to implement FetchPermissions (#28485)
Currently, there is no way to implement `FetchPermissions` without
importing `FsError` from `deno_fs` directly. This PR aims to re-export
the `FsError` from `deno_fetch` itself to allow it.
2025-03-13 11:34:56 -04:00
Leo Kettmeir
28e5c388b4
feat(otel): span context propagators (#28460)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2025-03-13 16:32:45 +01:00
Luca Casonato
b204cdc512
chore: fix build on main (#28487) 2025-03-13 11:58:52 +00:00
Yoshiya Hinosawa
dcfaba0f3a
fix(otel/unstable): trace error cases of fetch (#28480) 2025-03-13 17:47:00 +09:00
Yoshiya Hinosawa
c9930c591a
feat(unstable/otel): add otel tracing to node:http.request (#28463) 2025-03-13 17:43:37 +09:00
snek
e88366aece
fix: unhandled rejection from quic (#28448)
Fixes: https://github.com/denoland/deno/issues/28406
2025-03-11 07:23:42 +01:00
Toma
64f810d45c
fix(ext/node): use primordials in ext/node/polyfills/path/_util.ts (#28432)
Towards https://github.com/denoland/deno/issues/24236
2025-03-10 06:37:20 -07:00
denobot
d91402ae20
chore: forward v2.2.3 release commit to main (#28391)
This is the release commit being forwarded back to main for 2.2.3

Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2025-03-05 05:57:04 +00:00
David Sherret
bf060427b9
fix(node): require esm should prefer module.exports export (#28376) 2025-03-03 15:03:12 -05:00
Nathan Whitaker
69b59b2296
perf(http): instantiate generic functions in deno_http, increase opt-level for some more hyper deps (#28317)
results on my machine (Macbook pro w/ M3 Max)

canary (hello world):
```
❯ oha -c 125 -n 4000000 --no-tui --disable-compression http://localhost:8000
Summary:
  Success rate: 100.00%
  Total:        31.0160 secs
  Slowest:      0.0083 secs
  Fastest:      0.0005 secs
  Average:      0.0010 secs
  Requests/sec: 128965.6454

  Total data:   49.59 MiB
  Size/request: 13 B
  Size/sec:     1.60 MiB
```

this PR (hello world):
```
❯ oha -c 125 -n 4000000 --no-tui --disable-compression http://localhost:8000
Summary:
  Success rate: 100.00%
  Total:        28.4050 secs
  Slowest:      0.0085 secs
  Fastest:      0.0001 secs
  Average:      0.0009 secs
  Requests/sec: 140820.2060

  Total data:   49.59 MiB
  Size/request: 13 B
  Size/sec:     1.75 MiB
```

---

Two changes here:
- use `opt-level` 3 for some of hyper's deps, since profile overrides
are not transitive
- As noted in the [cargo
reference](https://doc.rust-lang.org/cargo/reference/profiles.html#overrides-and-generics)
generic functions _may_ be optimized at the opt-level of the
_instantiating_ crate, rather than the defining crate. So currently it's
possible that some of the functions in `deno_http` are being compiled at
a lower optimization level. This PR ensures the generics are
instantiated in `deno_http`, which theoretically should guarantee they
actually use opt-level 3.

To allow embedders to still provide a custom property extractor, I put
this behind a feature flag.
2025-02-27 10:07:11 -08:00
Luca Casonato
aa55efaa13
fix(otel): don't throw when calling setActiveSpan at root (#28323)
When calling `setActiveSpan` at the module root, or with `options.root =
true`, the function would internally throw.
2025-02-27 18:47:09 +01:00