Commit graph

14322 commits

Author SHA1 Message Date
Divy Srivastava
cedf5c4f6a
fix(ext/node): implement Buffer.copyBytesFrom (#28829)
Enables the full `parallel/test-buffer-from.js` test
2025-04-10 12:05:49 +00:00
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
1e50c7981b
refactor(ext/node): rewrite HandleWrap in Rust (#28765)
Ports `HandleWrap` and `AsyncWrap` to Rust.
2025-04-10 17:20:25 +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
Divy Srivastava
561097dd63
fix(ext/node): implement process.loadEnvFile (#28824)
Fixes https://github.com/denoland/deno/issues/28017
2025-04-10 07:43:29 +00:00
Marvin Hagemeister
25e3a17bd9
fix(unstable): lint .parent property not traversing over groups (#28803)
In our JS lint plugin API each node has a `.parent` property to access
its parent. But I forgot to skip group nodes, which lead to an invalid
node being returned.

Fixes: https://github.com/denoland/deno/issues/28799
2025-04-10 09:17:42 +02:00
Yoshiya Hinosawa
8e42ea015d
chore: simplify node compat chat message (#28825) 2025-04-10 16:15:01 +09:00
Hajime-san
1513550d66
fix(ext/canvas): handle integer overflow in createImageBitmap (#28764)
fixes https://github.com/denoland/deno/issues/28732
2025-04-10 11:16:14 +05:30
Divy Srivastava
58c6c0bc9c
fix: dont strip n-api symbols in denort on mac (#28800)
Fixes https://github.com/denoland/deno/issues/24614
2025-04-09 23:14:29 +05:30
Divy Srivastava
c394f1c432
fix(build): upgrade libffi to 4.0.0 (#28816) 2025-04-09 19:20:31 +05:30
Divy Srivastava
c8a0f6b1cd
fix: use full SHA for canary panic URLs (#28819) 2025-04-09 04:51:59 -07:00
Yoshiya Hinosawa
cb00561e97
fix(ext/node): support input option in spawnSync (#28792) 2025-04-09 13:42:12 +09:00
0hmX
9bc9faff49
fix(ext/node): add support for --no- prefix (allowNegative option) in parseArgs() (#28811) 2025-04-09 12:24:02 +09:00
Bartek Iwańczuk
c8291e6926
feat: enable explicit resource management for JavaScript (#28119)
This commit enabled [explicit resource management]
(https://github.com/tc39/proposal-explicit-resource-management)
proposal for JavaScript code.

This is done by upgrading `deno_ast` to a version that no longer
transpiles TS files with `using` keyword, and instead enables
a V8 flag that provides native support.

Closes https://github.com/denoland/deno/issues/20821

---------

Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-04-08 15:12:10 -07:00
Nathan Whitaker
96571854e0
chore: box some more large futures (#28806)
These both were >20KB. Also added `clippy::large_futures` to `lint.js`
so we catch this
2025-04-08 20:54:48 +00:00
Marvin Hagemeister
ee4c4a0a63
fix(unstable): add parent types to lint ast nodes (#28802)
Noticed that the `.parent` type was missing for AST nodes for our JS
lint API. Whenever possible I've only specified the limited
possibilities of parent types, but when it's too complex I defaulted to
just `Node`.
2025-04-08 16:51:09 +00:00
Divy Srivastava
a69b5e16b1
fix(compile): multi icon ordering on windows (#28771)
Fixes https://github.com/denoland/deno/issues/26400. Correctly handle
multi-icon icos in `deno compile --icon`.

Ref
bf318ea9c8

## Explanation

Icons in PE are very sensitive to resource table ordering. Here's what
works:

<img width=320
src=https://github.com/user-attachments/assets/8f3e5a18-5f00-42d6-a366-16b6194c711c></img>

We can't use `editpe`'s builtin `set_icon` because it lays out `Icon`
and `Icon Group` together before/after the `RCData`. Instead, we need a
custom implementation that places RCData between the icon entries.

This means we defer `Icon Group` to always happen during
`PortableExecutable::build`. After the fix:

<img width=440
src=https://github.com/user-attachments/assets/73a9b347-64c2-41e1-a314-918231ba7276></img>
2025-04-08 21:59:10 +05:30
Yoshiya Hinosawa
c6ecd179ad
chore: post node test results to slack (#28795) 2025-04-08 23:14:38 +09:00
Yoshiya Hinosawa
41005f8cd4
chore: fix node_compat_test workflow summary job (#28793) 2025-04-08 23:14:02 +09:00
Nathan Whitaker
6d33141d8d
fix(node): add reset method to event loop delay histogram (#28788)
Fixes https://github.com/denoland/deno/issues/28767

Don't love the `RefCell`, but don't really see a (safe) way around it.
2025-04-07 22:05:53 -07:00
Yoshiya Hinosawa
9bc3b07819
chore: create monthly summary of node test runs (#28778) 2025-04-08 12:12:27 +09:00
Nathan Whitaker
780b741555
perf(npm): load npm resolution snapshot directly from lockfile (#28647)
Fixes #27264. Fixes https://github.com/denoland/deno/issues/28161.

Currently the new lockfile version is gated behind an unstable flag
(`--unstable-lockfile-v5`) until the next minor release, where it will
become the default.

The main motivation here is that it improves startup performance when
using the global cache or `--node-modules-dir=auto`.

In a create-next-app project, running an empty file:
```
❯ hyperfine --warmup 25 -N --setup "rm -f deno.lock" "deno run --node-modules-dir=auto -A empty.js" "deno-this-pr run --node-modules-dir=auto -A empty.js" "deno-this-pr run --node-modules-dir=auto --unstable-lockfile-v5 empty.js" "deno run --node-modules-dir=manual -A empty.js" "deno-this-pr run --node-modules-dir=manual -A empty.js"
Benchmark 1: deno run --node-modules-dir=auto -A empty.js
  Time (mean ± σ):     247.6 ms ±   1.7 ms    [User: 228.7 ms, System: 19.0 ms]
  Range (min … max):   245.5 ms … 251.5 ms    12 runs

Benchmark 2: deno-this-pr run --node-modules-dir=auto -A empty.js
  Time (mean ± σ):     169.8 ms ±   1.0 ms    [User: 152.9 ms, System: 17.9 ms]
  Range (min … max):   168.9 ms … 172.5 ms    17 runs

Benchmark 3: deno-this-pr run --node-modules-dir=auto --unstable-lockfile-v5 empty.js
  Time (mean ± σ):      16.2 ms ±   0.7 ms    [User: 12.3 ms, System: 5.7 ms]
  Range (min … max):    15.2 ms …  19.2 ms    185 runs

Benchmark 4: deno run --node-modules-dir=manual -A empty.js
  Time (mean ± σ):      16.2 ms ±   0.8 ms    [User: 11.6 ms, System: 5.5 ms]
  Range (min … max):    14.9 ms …  19.7 ms    187 runs

Benchmark 5: deno-this-pr run --node-modules-dir=manual -A empty.js
  Time (mean ± σ):      16.0 ms ±   0.9 ms    [User: 12.0 ms, System: 5.5 ms]
  Range (min … max):    14.8 ms …  22.3 ms    190 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Summary
  deno-this-pr run --node-modules-dir=manual -A empty.js ran
    1.01 ± 0.08 times faster than deno run --node-modules-dir=manual -A empty.js
    1.01 ± 0.07 times faster than deno-this-pr run --node-modules-dir=auto --unstable-lockfile-v5 empty.js
   10.64 ± 0.60 times faster than deno-this-pr run --node-modules-dir=auto -A empty.js
   15.51 ± 0.88 times faster than deno run --node-modules-dir=auto -A empty.js
```

When using the new lockfile version, this leads to a 15.5x faster
startup time compared to the current deno version.

Install times benefit as well, though to a lesser degree.

`deno install` on a create-next-app project, with everything cached
(just setting up node_modules from scratch):

```
❯ hyperfine --warmup 5 -N --prepare "rm -rf node_modules" --setup "rm -rf deno.lock" "deno i" "deno-this-pr i" "deno-this-pr i --unstable-lockfile-v5"
Benchmark 1: deno i
  Time (mean ± σ):     464.4 ms ±   8.8 ms    [User: 227.7 ms, System: 217.3 ms]
  Range (min … max):   452.6 ms … 478.3 ms    10 runs

Benchmark 2: deno-this-pr i
  Time (mean ± σ):     368.8 ms ±  22.0 ms    [User: 150.8 ms, System: 198.1 ms]
  Range (min … max):   344.8 ms … 397.6 ms    10 runs

Benchmark 3: deno-this-pr i --unstable-lockfile-v5
  Time (mean ± σ):     211.9 ms ±  17.1 ms    [User: 7.1 ms, System: 177.2 ms]
  Range (min … max):   191.3 ms … 233.4 ms    10 runs

Summary
  deno-this-pr i --unstable-lockfile-v5 ran
    1.74 ± 0.17 times faster than deno-this-pr i
    2.19 ± 0.18 times faster than deno i
```

With lockfile v5, a 2.19x faster install time compared to the current
deno.
2025-04-08 02:06:17 +00:00
Asher Gomez
52d9fc1499
fix(ext/node): use primordials in ext/node/polyfills/path/separator.ts (#28669) 2025-04-08 10:42:58 +09:00
David Sherret
47c05ff70d
fix(install): regression where Deno not used when postinstall script ran script without file extension (#28786)
`node scripts/postinstall` was not running with Deno anymore and it
previously was.

Closes https://github.com/denoland/deno/issues/28780
2025-04-08 00:59:48 +00:00
David Sherret
874f4fc5ae
chore: skip explicit_start_and_end_low_precision test on ci (#28789)
It's gotten too flaky.
2025-04-07 17:55:18 -07:00
David Sherret
63901aac83
chore: skip updating release-latest.txt when current version not greater than latest version (#28787)
Signed-off-by: David Sherret <dsherret@users.noreply.github.com>
2025-04-08 00:06:59 +00:00
David Sherret
96b06c64a5
fix(compile): do not panic including node_modules directory (#28782)
Closes https://github.com/denoland/deno/issues/28773
2025-04-07 16:43:34 -07:00
David Sherret
f621182577
chore: make statSync unit test less flaky (#28785) 2025-04-07 22:55:05 +00: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
Asher Gomez
ec8e4af85b
fix(ext/node): use primordials in ext/node/polyfills/path/_win32.ts (#28668) 2025-04-07 16:54:54 +09:00
Asher Gomez
0934841fcc
fix(ext/node): use primordials in ext/node/polyfills/path/_posix.ts (#28665) 2025-04-07 16:49:52 +09:00
Divy Srivastava
6f406c1cd6
fix(ci): missing release symcache (#28774)
Probably caused by copy-pasting from the canary upload job.
2025-04-06 15:42:42 +00:00
denobot
1086a75cc9
chore: forward v2.2.8 release commit to main (#28762)
Co-authored-by: dsherret <dsherret@users.noreply.github.com>
2025-04-05 03:09:25 +00:00
David Sherret
a19230159e
ci: improve verify_pr_title script (#28759)
Ref https://github.com/denoland/deno/pull/28697
2025-04-05 08:24:29 +05:30
Nathan Whitaker
457bfc9066
fix: only strip local and debug symbols from macOS binary (#28758)
Fixes #28757.

We need to retain the napi symbols in the binary. `strip` with no flags
on macos strips all symbols out of the binary (including global
symbols).

Only strip out the local and debug symbols from the binary, retaining
the global symbols (which include the napi ones)
2025-04-05 00:29:59 +00:00
David Sherret
9d841987ef
refactor(lsp): internally expose and use LspScopedResolver (#28755)
Reduces some repeat hashmap lookups by exposing the `LspScopedResolver`.
2025-04-04 21:48:04 +00:00
Nayeem Rahman
37b760e3c6
fix(lsp): filter scheme in semantic tokens registration options (#28756) 2025-04-04 21:27:20 +00:00
Nayeem Rahman
757ef462f7
fix(lint): resolve plugin paths from proper config specifier (#28752) 2025-04-04 19:30:27 +00:00
David Sherret
becf24c8c2
fix(compile): ensure atime/birthtime/mtime/ctime is set in vfs (#28731)
Co-authored-by: XYCode <xycode-xyc@outlook.com>
2025-04-04 09:50:44 -04:00
WWRS
dca9f7c0c3
fix(fmt): use non-zero exit code when formatting fails (#28523) 2025-04-04 14:48:47 +01: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
Yoshiya Hinosawa
5a0693c4db
test(ext/http): reduce flakiness of serve_test (#28739)
This PR reduces the flakiness of the case `req.body.getReader().read()
throws the error with reasonable error message`.

The case tries to cause BadResource error by premature disconnection
from the client, but it sometimes completes the request when the reading
of tcp data happens quickly. This PR tries to prevent that scenario by
adding some delays when reading & writing http messages.
2025-04-04 11:13:58 +05:30
Divy Srivastava
8beb90cd65
fix(runtime): fix duplicate unstable ids for no-legacy-abort (#28740) 2025-04-04 06:40:51 +01:00
Nayeem Rahman
67a1029b3b
fix(lsp): url_to_uri() encoding on windows (#28737) 2025-04-04 05:24:53 +00:00
David Sherret
52e243bd9a
fix(install): remove duplicate deprecated messages (#28738)
We were keying on package id instead of nv.
2025-04-04 01:53:54 +00:00
Nayeem Rahman
7509fc26dd
fix(lsp): preserve notification order after init flag is raised (#28733) 2025-04-03 23:54:09 +01:00
Nayeem Rahman
ec05282346
fix(test): ignore write errors in reporter (#28722) 2025-04-03 17:48:55 +01:00
snek
ebc4f82eca
feat: v8js metrics (#28592)
Implement
https://opentelemetry.io/docs/specs/semconv/runtime/v8js-metrics/
2025-04-03 15:18:54 +02:00