Commit graph

13188 commits

Author SHA1 Message Date
David Sherret
5b85bdaf88
2.1.13 (#29284) 2025-05-13 15:41:01 -04:00
Nayeem Rahman
2f0fae9d90 fix: handling of contradictory global permission flags (#29213) 2025-05-13 15:02:32 -04:00
Bartek Iwańczuk
946ccda1aa fix: make --allow-env stronger that --deny-env (#29079) 2025-05-13 15:02:19 -04:00
David Sherret
16b18e2b8d
2.1.12 (#28858)
Release to fix how the LTS version incorrectly reports itself as 2.1.10
instead of 2.1.11.
2025-04-11 19:06:05 -04:00
Divy Srivastava
19d69ef755 fix(ext/node): return Buffer from crypto cipher APIs (#28826)
Fixes https://github.com/denoland/deno/issues/28633
2025-04-11 17:51:17 -04:00
Arsh
5dd3af1049 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-11 17:51:10 -04:00
Yoshiya Hinosawa
3f510d2f0e fix(ext/node): support input option in spawnSync (#28792) 2025-04-11 17:50:28 -04:00
Nathan Whitaker
d1b4fcd77c 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-11 17:50:06 -04:00
Asher Gomez
6aba04db80 fix(ext/node): use primordials in ext/node/polyfills/path/separator.ts (#28669) 2025-04-11 17:49:50 -04:00
David Sherret
c94302a176 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-11 17:49:14 -04:00
David Sherret
d73d467148
2.1.11 (#28812)
LTS release.
2025-04-08 16:54:13 -07:00
David Sherret
acfe15536c chore: fix compiler error 2025-04-07 14:34:16 -07:00
David Sherret
1ce5331ad6 fix(npm): further reduce duplicates with optional peers (#28705)
* https://github.com/denoland/deno_npm/pull/93

Closes
https://github.com/denoland/deno/issues/28023#issuecomment-2769944224
2025-04-07 14:30:52 -07:00
Kenta Moriuchi
65b5d300b8 fix(types): add Error.isError type (#28679) 2025-04-07 14:29:21 -07:00
Benjamin Swerdlow
53b44049b1 refactor(ext/node): export GlobalsStorage (#28683) 2025-04-07 14:29:15 -07:00
David Sherret
b9dd66e48c fix(npm): reduce duplicate peers by preferring existing nv if nv anywhere in ancestor peers (#28663)
* https://github.com/denoland/deno_npm/pull/91/files

Closes https://github.com/denoland/deno/issues/26145
2025-04-07 14:28:55 -07:00
Asher Gomez
c79186da1c fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_lstat.ts (#28644)
Towards #24236
2025-04-07 14:27:57 -07:00
Asher Gomez
ffa716b712 fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_realpath.ts (#28652)
Towards #24236
2025-04-07 14:27:24 -07:00
Asher Gomez
0643220e2a fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_readv.ts (#28645)
Towards #24236
2025-04-07 14:27:13 -07:00
Divy Srivastava
e9b0416194 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-04-07 14:27:03 -07:00
David Sherret
d917796a21 fix(npm): improve optional peer dep handling (#28651) 2025-04-07 14:26:28 -07:00
Yoshiya Hinosawa
e5dc4bed63 fix(ext/node): emit 'close' event on ServerResponse object when client aborted the request (#28601) 2025-04-07 14:24:49 -07:00
Nathan Whitaker
3bc4206274 perf(install): keep parsed npm package info in memory cache (#28636)
Fixes #28517.

The npm package info gets requested a bunch of times by deno_npm. Before
this PR, we were loading it from the FS and parsing it each and every
time. With a lot of dependencies (and large `registry.json` files), this
can lead to massive blowups in install times.

From the repro in #28517

before this PR:

```
        Command being timed: "deno i"
        User time (seconds): 538.54
        System time (seconds): 56.49
        Percent of CPU this job got: 198%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 4:59.45
        Maximum resident set size (kbytes): 378976
```

this PR:
```
        Command being timed: "deno-this-pr i"
        User time (seconds): 1.29
        System time (seconds): 1.56
        Percent of CPU this job got: 68%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.16
        Maximum resident set size (kbytes): 500864
```

So roughly an improvement from 339s to 4s. You can see that the max RSS
does increase a decent amount, which is the main downside. However, this
in memory cache is cleared once we're done caching npm packages, and IMO
the performance tradeoff is well worth it.

This also has a very noticable, though less drastic, effect on fresh
installs (no deno.lock) for smaller projects. Here's a clean nextJS
template project:

```
❯ hyperfine --warmup 5 --prepare "rm -rf node_modules deno.lock" "deno i" "deno-this-pr i"
Benchmark 1: deno
  Time (mean ± σ):     765.0 ms ±  10.1 ms    [User: 622.3 ms, System: 216.4 ms]
  Range (min … max):   749.0 ms … 783.6 ms    10 runs

Benchmark 2: deno-this-pr
  Time (mean ± σ):     357.2 ms ±   9.4 ms    [User: 193.2 ms, System: 198.2 ms]
  Range (min … max):   346.4 ms … 374.1 ms    10 runs

Summary
  deno-this-pr ran
    2.14 ± 0.06 times faster than deno
```
2025-04-07 14:24:39 -07:00
Nathan Whitaker
0df0d5cd0a chore: downgrade warning to debug log on clonefile failure (#28637)
Ref https://github.com/denoland/deno/issues/26928.

This was originally a warning so potential bugs would be visible. Now
that the code has been working for a while without issues, and since the
warning can be triggered in a valid case (as in the issue above, where
the warnings also hid the real diagnostic), let's downgrade this from a
warning to a debug log.
2025-04-07 14:24:27 -07:00
Divy Srivastava
bef35c3aa8 fix(ext/node): mkdir() parse file mode (#28609)
Fixes https://github.com/denoland/deno/issues/28604
2025-04-07 14:23:10 -07:00
Yoshiya Hinosawa
6fb04ff4b9 fix(ext/node): propagate 'close' event of IncomingMessage to Socket (#28582) 2025-04-07 14:23:05 -07:00
David Sherret
7fe8ff0c41 chore: fix build errors in last commit 2025-04-07 11:33:42 -07:00
David Sherret
b97096f163 fix(npm): reduce occurrences of duplicate packages due to peer dep resolution (#28586) 2025-04-07 11:17:13 -07:00
Adakite
d5502714db 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-04-07 11:11:05 -07:00
letianpailove
210c92d31f docs: fix a numerical error in update_typescript.md (#28556)
Signed-off-by: letianpailove <113023596+letianpailove@users.noreply.github.com>
2025-04-07 11:10:27 -07:00
Jo Franchetti
6bccf12cac docs: adding jsdocs for temporalAPI (#28542) 2025-04-07 11:10:05 -07:00
Jake Champion
5114710b98 fix: add stackTraceLimit to ErrorConstructor interface and removed ErrorWithStackTraceLimit interface (#28539)
Signed-off-by: Jake Champion <me@jakechampion.name>
2025-04-07 11:09:51 -07:00
letianpailove
b4212010e7 docs: fix a typo in specs README.md (#28524) 2025-04-07 10:31:47 -07:00
Ryan Dahl
0ef51d0048 docs: randomUUID and getRandomValues (#28496) 2025-04-07 10:31:27 -07:00
Jo Franchetti
38cd978543 docs: making copy a little clearer (#28481)
Updating compile help text copy to make it a little clearer
Reported in https://github.com/denoland/docs/issues/1500
2025-04-07 10:31:10 -07:00
Luke Edwards
04909976ff 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-04-07 10:31:03 -07:00
letianpailove
d4c7601408 docs: fixed a typo in update_typescript.md (#28486)
Asynciterable as singular means it adds the concept of AsyncIterable to
DOM instead of providing multiple AsyncIterable instances.

Signed-off-by: letianpailove <113023596+letianpailove@users.noreply.github.com>
2025-04-07 10:30:37 -07:00
Ryan Dahl
2f0369213a docs: ignore absent window global variable in d.ts (#28456) 2025-04-07 10:30:31 -07:00
Jo Franchetti
3ac24ee9e5 docs: adding a missing full stop to context help text (#28465)
Full top missing from help text of config
2025-04-07 10:30:20 -07:00
Toma
a422ad2632 fix(ext/node): use primordials in ext/node/polyfills/path/_util.ts (#28432)
Towards https://github.com/denoland/deno/issues/24236
2025-04-07 10:29:38 -07:00
Nathan Whitaker
e595f2381e fix(install): exclude npm workspace packages from graph roots in install (#28401)
Fixes #28374.
2025-04-07 10:29:17 -07:00
Mohammad Sulaiman
64a4003487 fix(run): skip the cjs suggestion for mjs/mts modules (#26698)
Co-authored-by: David Sherret <dsherret@gmail.com>
2025-04-07 10:28:46 -07:00
Muthuraj Ramalingakumar
2ddaafd762 fix(ext/node): node compatibility issue missing fd in createServer callback socket object (#27789) 2025-04-07 10:24:40 -07:00
Bartek Iwańczuk
abdc08360c fix(add): better help text for --dev arg (#28304)
Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2025-04-07 10:24:09 -07:00
Leo Kettmeir
26bf1e67d7 fix: add info suggestion for unsafely-ignore-certificate-errors and add --help=full (#28203)
For #27865
2025-04-07 10:22:47 -07:00
Nayeem Rahman
c1926ff1c4 fix(fmt): support "--ext vto" and "--ext njk" (#28262) 2025-04-07 10:21:46 -07:00
Kenta Moriuchi
cc0450c82f fix(cli): add compilerOptions.lib examples to config-file.v1.json (#28226)
closes #28222
2025-04-07 10:21:32 -07:00
David Sherret
64b439a04b chore: mark worker_large_output as flaky (#28241) 2025-04-07 10:21:24 -07:00
Nathan Whitaker
a9c0b3891a perf(install): only read initialized file if we care about the tags (#28242)
Speeds up the caching part of this arbitrary `"nodeModulesDir": "auto"`
project by about 22%

We write the tags associated with a given npm package to the
`.initialized` file, so that byonm can correctly resolve tags. When
setting up the node modules dir, we read that file to see if we need to
update the tags.

If we don't have any tags associated with the package though, we can
just check for existence (which is a fair bit faster than trying to
`open` + `read` a file).

```
❯ hyperfine --warmup 3 "deno check src/**/*.ts" "../deno/target/release-lite/deno check src/**/*.ts"
Benchmark 1: deno check src/**/*.ts
  Time (mean ± σ):     369.9 ms ±   5.5 ms    [User: 286.9 ms, System: 128.9 ms]
  Range (min … max):   361.7 ms … 377.7 ms    10 runs

Benchmark 2: ../deno/target/release-lite/deno check src/**/*.ts
  Time (mean ± σ):     303.5 ms ±   5.9 ms    [User: 210.9 ms, System: 124.5 ms]
  Range (min … max):   292.7 ms … 315.0 ms    10 runs

Summary
  ../deno/target/release-lite/deno check src/**/*.ts ran
    1.22 ± 0.03 times faster than deno check src/**/*.ts
```
2025-04-07 10:21:15 -07:00
David Sherret
383bc94ea1 chore: mark inspector break tests as flaky (#28239) 2025-04-07 10:21:05 -07:00