Commit graph

394 commits

Author SHA1 Message Date
David Sherret
32baa286b7
refactor: update to deno_path_util 0.5.2 (#30211) 2025-07-27 08:44:29 -04:00
Leo Kettmeir
b59576cc0f
feat(unstable): tunnelling (#30022)
Co-authored-by: snek <snek@deno.com>
2025-07-08 02:44:50 +02:00
Nathan Whitaker
9379a74e08
chore: update to edition 2024 (#29923)
Some checks are pending
ci / publish canary (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 / build libs (push) Blocked by required conditions
2025-07-02 17:59:39 -07:00
Kingsword
1946d35d6e
feat(cli): alias --unstable-sloppy-imports to --sloppy-imports (#29780) 2025-07-01 18:45:08 +00:00
Bartek Iwańczuk
f6176a1674
feat: add support for --preload/--import flag (#29626)
This commit adds initial support for `--preload` (aliased to `--import`)
flag that allows to load and execute multiple ES modules before the
entry point modules is executed.

This command is available in `deno run`, `deno test` and `deno bench`
subcommands.

Closes https://github.com/denoland/deno/issues/29776
2025-07-01 16:21:00 +05:30
Nathan Whitaker
033da85781
chore(bundle): rename --one-file to --inline-imports (#29946)
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-06-30 23:13:32 +00:00
sgasho
b5e41f605d
feat: Add --deny-import flag (#29702)
Closes: #29502

This commit adds a complementary flag to the "--allow-import" flag, that
allows to deny certain hosts.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-28 12:59:18 +00:00
Bartek Iwańczuk
9913311860
feat: stabilize --node-conditions flag (#29628)
Stabilizes `--conditions` flag added in
https://github.com/denoland/deno/pull/29586.

Closes https://github.com/denoland/deno/issues/23757
2025-06-26 22:52:04 +02:00
Bartek Iwańczuk
0a4f946fd9
feat: add 'deno update' subcommand (#29187)
Just to save a few characters, because it's an alias to "deno outdated
--update"

Ref https://github.com/denoland/deno/issues/29778
2025-06-26 19:13:29 +02:00
Nayeem Rahman
99ae41f6bb
feat: stabilize --allow-net subdomain wildcards (#29902)
Closes #29499.
2025-06-26 17:00:43 +00:00
David Sherret
ec32c6e5ba
feat(unstable): bytes and text imports (#29855)
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-06-26 11:21:16 -04:00
Bartek Iwańczuk
a8f59c1af9
feat: add DENO_COMPAT env var (#29889)
This commit adds the `DENO_COMPAT` env var, that
when specified enables several features:
- --unstable-bare-node-builtins
- --unstable-detect-cjs
- --unstable-sloppy-imports

With Deno v2.3.x, it is a common situation where these 3 flags have to
specified
to run an existing Node.js project, causing a friction that many users
experience.

The idea is that this env var could be "set and forget" for many people,
that should
provide better DX for running Node.js projects.

It is necessary to note that using this env var _impacts performance_ -
especially startup time.
2025-06-26 12:06:24 +02:00
Bartek Iwańczuk
1192bc0040
feat: rename --unstable-node-conditions to --unstable-conditions (#29885)
The `DENO_NODE_CONDITIONS` env var was renamed to `DENO_CONDITIONS`.

Ref https://github.com/denoland/deno/pull/29628
Ref https://github.com/denoland/deno/issues/23757
2025-06-26 12:05:57 +02:00
Yoshiya Hinosawa
56d7660ee4
feat(cli): add --coverage flag to deno run command (#29329)
closes #16440

This PR adds `--coverage` flag to `deno run` command. When the flag is
specified, it generates the coverage profile in the directory specified
(default is `coverage`). The coverage directory can also be specified
from the env var `DENO_COVERAGE_DIR`.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-06-25 13:34:30 +02:00
Bartek Iwańczuk
bff09506bd
feat(unstable): add DENO_NODE_CONDITIONS env var (#29848)
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
Follow up to https://github.com/denoland/deno/pull/29586 that
adds a `DENO_NODE_CONDITIONS` env var that allows to
specify conditional exports when the user can't control
CLI flags passed to the command (eg. on Deploy).
2025-06-25 07:16:11 +00:00
Bartek Iwańczuk
14f9d77f3d
feat(otel): stabilize OpenTelemetry support (#29822)
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
This commit stabilizes support for OpenTelemetry in Deno,
effectively removing the need to use `--unstable-otel` flag
or using `{ "unstable": ["otel"] }` option in the config file.

Supersedes https://github.com/denoland/deno/pull/29500
Closes https://github.com/denoland/deno/issues/29477
2025-06-24 16:49:04 +02:00
Leo Kettmeir
38f6720185
feat: unflag the deploy subcommand (#29863) 2025-06-24 12:23:58 +00:00
Bartek Iwańczuk
fd352537ce
feat: add DENO_AUTO_SERVE env var (#29852)
This commits adds `DENO_AUTO_SERVE` env var, that when specified
makes `deno run` behave like `deno serve` if the entrypoint satisfies
the `Deno.ServeDefaultExport` interface.
2025-06-24 11:05:59 +02:00
snek
e99b1c1f86
feat: allow base64 ca cert in args (#29814)
This allows loading a base64 encoded cert directly from arg/env by
prefixing it with `base64:`
2025-06-19 11:04:16 +00:00
Nathan Whitaker
03651c773f
feat(bundle): add watch mode to bundle (#29795)
Reuses the same esbuild subprocess, and triggers rebuilds on file
changes. Esbuild will reuse parsed sources that are unchanged, so
subsequent builds are faster than the initial one
2025-06-18 08:35:12 -07:00
Nathan Whitaker
f80075c3ff
feat(bundle): add --sourcemap flag (#29735)
Closes #29649.

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2025-06-13 02:55:07 +00:00
Nathan Whitaker
12ed9f3649
fix(bundle): parse the allow-import flag, fix example in help text (#29733)
Closes #29729.
2025-06-12 21:44:26 -04:00
Nathan Whitaker
be2bb7d5fb
feat(bundle): add --platform flag to bundle (#29697)
Closes #29650.

Currently passing `--platform=browser` does two things:
- makes us prefer the `"browser"` key in package json over module and
main
- makes us prefer the `"browser"` export condition 
but we may add more things in the future
2025-06-12 20:28:54 -04:00
Nathan Whitaker
7a837f9fdb
feat(bundle, unstable): bundling backed by esbuild (#29470)
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 wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
todo:
- [ ] cleanup cli, decide what flags we want to commit to
- [x] decide what to do about node addons - (you can mark them external
via `--external`)
- [x] move `esbuild_rs` to the `denoland` org
- [x] figure out the dynamic require issue
- [x] figure out how to test this
- [x] clean up / revert all the random changes
2025-06-07 21:20:10 +02:00
Bartek Iwańczuk
ea4506c657
feat(unstable): add --unstable-node-conditions flag for node resolution (#29586)
This commit adds support for `--unstable-node-conditions` flag
that allows to customize "conditional exports" used by Deno.

See https://nodejs.org/api/packages.html#resolving-user-conditions for
more details.

Ref https://github.com/denoland/deno/issues/23757

---------

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2025-06-05 12:32:24 +02:00
Leo Kettmeir
5b0da88619
feat(unstable): deploy subcommand (#29407) 2025-05-30 16:28:49 +00:00
David Sherret
6f831d1035
fix: --frozen flag missing from several subcommands (#29508)
Some checks are pending
ci / publish canary (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 / build wasm32 (push) Blocked by required conditions
Closes https://github.com/denoland/deno/issues/29498
2025-05-29 15:26:24 +00:00
Nayeem Rahman
ab9673dcc1
feat(unstable): --allow-net subdomain wildcards (#29327) 2025-05-29 04:05:37 +01:00
林炳权
cb738ee5da
chore: Rust 1.86.0 (#29435)
Since `rust 1.87.0` reported `undefined symbol:
ring::pbkdf2::PBKDF2_HMAC_SHA1::*` in CI and it was difficult to debug
locally, use `rust 1.86.0` in CI tests for troubleshoot the errors
2025-05-25 23:40:48 +02:00
Phil Hawksworth
ef7090cfa8
fix(cli): Correct a small typo in help output (#29395)
Fixes a typo in the description of the DENO_EMIT_CACHE_MODE help
description.

closes: #29394

Signed-off-by: Phil Hawksworth <phil@deno.com>
2025-05-20 16:42:42 +02:00
David Sherret
c4412ffb13
refactor: add deno_npm_installer crate (#29319)
More changes/improvements will following in follow-up PRs.
2025-05-16 18:11:05 -04:00
Bartek Iwańczuk
2d9a844555
feat(runtime): add SIGUSR2 handler for low memory notifications (#29295)
This commit adds a signal handler for SIGUSR2 that helps reduce the
memory usage of both main worker and web worker by:

1. Triggering `malloc_trim(0)` to release memory back to the system
2. Invoking V8 isolate's `low_memory_notification` function

This is only available on Linux and enabled when `DENO_USR2_MEMORY_TRIM`
env var is specified.

---------

Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
2025-05-16 14:59:47 +02:00
Bartek Iwańczuk
be5396ebf4
feat: Add support for DENO_TRUST_PROXY_HEADERS env var (#29296)
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 wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
If this env var is specified, then `x-deno-client-address` headers are
removed from the served HTTP traffic.
2025-05-15 13:05:50 +02:00
Bartek Iwańczuk
5ea90de199
feat(jupyter): allow to install and maintain multiple kernels (#29249)
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 / 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 / build wasm32 (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
This commit changes the `deno jupyter` subcommand:
- `deno jupyter` now accepts additional `--name` argument to 
allow installing and maintaing multiple kernelsspec - useful when 
one wants to install a stable kernel and a debug/canary kernel
- `deno jupyter --install` now accepts additional `--display` 
argument to allow customizing display name of the kernel - the 
default one is "Deno"
- `deno jupyter --install` no longer blindly installs kernelspec, 
instead it first checks if a kernelspec already exists and if so, 
returns an error suggesting to use `--force` flag
- `deno jupyter --help` no longer shows `--unstable` flag

Closes https://github.com/denoland/deno/issues/29219
Closes https://github.com/denoland/deno/issues/29220
2025-05-13 16:56:16 +00:00
Yusuke Tanaka
9b2b1c41f5
fix(cli): configure v8 isolate with cgroups-constrained memory limit (#29078)
This change configures V8 isolates to respect memory limits imposed by
cgroups on Linux.

It adds support for detecting both cgroups v1 and v2 memory limits,
enabling Deno to properly adapt to containerized environments with
memory constraints. When cgroups information is unavailable or not
applicable, it falls back to using the system's total memory as before.

Closes #29077

## Test

For testing, I created a ubuntu VM with 1Gi memory. Within this VM, set
up a cgroup with 512Mi memory limit, then ran the following script to
see how much heap size limit the V8 isolate had.

```js
import * as v8 from "node:v8";

console.log(v8.getHeapStatistics());
```

### Ubuntu 20.04

In this version of ubuntu, hybrid mode is enabled by default.

```
$ cat /proc/self/cgroup
12:rdma:/
11:blkio:/user.slice
10:devices:/user.slice
9:cpu,cpuacct:/user.slice
8:pids:/user.slice/user-1000.slice/session-3.scope
7:memory:/user.slice/user-1000.slice/session-3.scope
6:perf_event:/
5:freezer:/
4:net_cls,net_prio:/
3:hugetlb:/
2:cpuset:/
1:name=systemd:/user.slice/user-1000.slice/session-3.scope
0::/user.slice/user-1000.slice/session-3.scope
```

Create a new cgroup with 512Mi memory limit and run the above script in
this cgroup:

```
$ sudo cgcreate -g memory:/mygroup
$ sudo cgset -r memory.limit_in_bytes=$((512 * 1024 * 1024)) mygroup
$ sudo cgexec -g memory:mygroup ./deno run main.mjs
{
  total_heap_size: 7745536,
  total_heap_size_executable: 0,
  total_physical_size: 7090176,
  total_available_size: 266348216,
  used_heap_size: 6276752,
  heap_size_limit: 271581184,
  malloced_memory: 303200,
  peak_malloced_memory: 140456,
  does_zap_garbage: 0,
  number_of_native_contexts: 1,
  number_of_detached_contexts: 0,
  total_global_handles_size: 24576,
  used_global_handles_size: 22432,
  external_memory: 3232012
}
```

This indicates that the isolate was informed of cgroup-constrained
memory limit (512Mi) and hence got ~270M heap limit.

### Ubuntu 22.04

In this version of ubuntu, cgroup v2 is used.

```
$ cat /proc/self/cgroup
0::/user.slice/user-1000.slice/session-3.scope
```

Run the above script using `systemd-run`:

```
$ sudo systemd-run --property=MemoryMax=512M --pty bash -c '/home/ubuntu/deno run /home/ubuntu/main.mjs'
{
  total_heap_size: 7745536,
  total_heap_size_executable: 0,
  total_physical_size: 7090176,
  total_available_size: 266348184,
  used_heap_size: 6276784,
  heap_size_limit: 271581184,
  malloced_memory: 303200,
  peak_malloced_memory: 140456,
  does_zap_garbage: 0,
  number_of_native_contexts: 1,
  number_of_detached_contexts: 0,
  total_global_handles_size: 24576,
  used_global_handles_size: 22432,
  external_memory: 3232012
}
```

Again the isolate got ~270M heap limit properly.
Note that it should have had bigger heap limit if the entire system
memory, i.e. 1Gi, had been passed to V8. In fact, if we run the same
script outside the cgroup, it does display larger `heap_size_limit` like
below:

```
$ ./deno run main.mjs
{
  total_heap_size: 7745536,
  total_heap_size_executable: 0,
  total_physical_size: 7090176,
  total_available_size: 546580152,
  used_heap_size: 6276752,
  heap_size_limit: 551813120,
  malloced_memory: 303200,
  peak_malloced_memory: 140456,
  does_zap_garbage: 0,
  number_of_native_contexts: 1,
  number_of_detached_contexts: 0,
  total_global_handles_size: 24576,
  used_global_handles_size: 22432,
  external_memory: 3232012
}
```

---------

Signed-off-by: Yusuke Tanaka <wing0920@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-14 00:07:59 +09:00
David Sherret
e601df6bfb
fix: allow specifying otel config in --env-file (#29240)
Alternative to https://github.com/denoland/deno/pull/28127 that does cli
flag parsing, then env file loading, then resolves config with env vars.

This also fixes several other issues related to env vars in the
--env-file not being used for certain config.

Closes https://github.com/denoland/deno/issues/27851
Closes https://github.com/denoland/deno/issues/29171
Closes https://github.com/denoland/deno/pull/28127
Closes #29256
2025-05-11 21:09:52 -04:00
Marshall Walker
c9d456b74a
fix(cache): added support for the --env-file flag (#29160)
Adds support for the --env-file flag, allowing environment variables
such as DENO_AUTH_TOKENS to be loaded from a file.
2025-05-09 19:03:11 -07:00
David Sherret
92cdce16f0
fix(flags): do not panic parsing invalid --allow-import flag (#29118)
Closes https://github.com/denoland/deno/issues/29116
2025-04-30 16:41:21 -04:00
Nathan Whitaker
6d0035411b
feat(clean): deno clean --except <paths>, remove all cache data except what's needed to run paths (#28424)
Closes https://github.com/denoland/deno/issues/27229.


TODO:
- [x] Tests
- [x] Make some changes to `deno_cache_dir` so we can get the paths for
the local http cache
- [x] Right now this leaves the node modules setup cache in an incorrect
state (removes the symlinks, but doesn't update the setup cache)
- [ ] ~~Handle code cache and other sqlite caches?~~
2025-04-29 22:42:17 +00:00
HasanAlrimawi
e028e26b9c
feat: add --open to deno serve to open server in browser (#25340)
Change:
Supported --open flag with deno serve -> (deno serve --open
somescript.ts/js).
The action that takes place is openning the browser on the address that
the server is running on.

Signed-off-by: HasanAlrimawi <141642411+HasanAlrimawi@users.noreply.github.com>
2025-04-28 21:14:44 +00:00
Bartek Iwańczuk
a33dae6a2a
feat: allow forcing in-memory SQLite dbs (#29026)
This commit adds two env vars:
- "DENO_CACHE_DB_MODE"
- "DENO_KV_DB_MODE"

Both of these env vars accept either "disk" or "memory" values and
control the modes of backing databases for Web Cache API and
"Deno.openKv()" API.

By default both APIs use disk backed DBs, but they can be changed to use
in-memory
DB, making them effectively ephemeral.
2025-04-28 09:06:38 +00:00
Leo Kettmeir
0134f268cb
fix: better error message for bare run in file-like case (#29055)
Fixes #28996
2025-04-26 15:54:41 +02:00
Bartek Iwańczuk
189ccffdb9
feat: Codegen feature flags (#28920)
This commit adds "deno_features" crate that contains definitions of all
unstable features in Deno.

Based on these definitions, both Rust and JS code is generated ensuring
that the two are always in sync.

In addition some of flag handling was rewritten to use the generated
definitions, instead of hand rolling these flag definitions.

---------

Co-authored-by: snek <snek@deno.com>
2025-04-25 08:33:45 +00:00
Nathan Whitaker
6ce1e9b7f7
fix(install): error gracefully if user passes --no-config to deno install <package> (#28965)
Fixes #28090. Fixes #28961.
2025-04-18 22:13:20 +00:00
Yoshiya Hinosawa
83f15ece09
feat(test): create coverage reports when --coverage specified in deno test (#28260)
This PR updates the behavior of `deno test --coverage` option. Now if
`--coverage` option is specified, `deno test` command automatically
shows summary report in the terminal, and generates the lcov report in
`$coverage_dir/lcov.info` and html report in `$coverage_dir/html/`

This change also adds `--coverage-raw-data-only` flag, which prevents
the above reports generated, instead only generates the raw json
coverage data (which is the same as current behavior)
2025-04-18 18:56:14 +09:00
Nathan Whitaker
f411ccd692
feat(lockfile): default to lockfile v5 (#28950)
Closes #28916
2025-04-17 13:27:37 -07:00
Luca Casonato
c12709196c
fix: support vsock in DENO_SERVE_ADDRESS (#28941) 2025-04-17 13:49:47 +02:00
Yoshiya Hinosawa
560e8cf0e3
docs(test): document DENO_COVERAGE_DIR in help message (#28939) 2025-04-17 14:33:51 +09:00
Dan Dascalescu
bfbf9018f4
fix(task): document source of tasks, fix punctuation (#28413)
Signed-off-by: Dan Dascalescu <ddascalescu+github@gmail.com>
2025-04-16 17:29:31 +00:00
Ryan Dahl
1820fee427
docs: fix DENO_TLS_CA_STORE help text (#28124) 2025-04-16 17:18:01 +00:00