Commit graph

17 commits

Author SHA1 Message Date
Bartek Iwańczuk
22d1d98af3
fix: use 'deno_signals' crate for signal handling (#30204)
Follow up to https://github.com/denoland/deno/pull/30029.

Definition of signal numbers/names were moved from `ext/os` to
`ext/signals`.

All occurrences of `tokio::signal` API were replaced with helpers from
`deno_signals` helpers. Additionally clippy lints were added to ensure `tokio::signal`
is not used by accident.

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

Co-authored-by: snek <the@snek.dev>
2025-07-29 15:00:46 +02:00
David Sherret
32baa286b7
refactor: update to deno_path_util 0.5.2 (#30211) 2025-07-27 08:44:29 -04:00
snek
88f16236b1
fix: new signal handling (#30029)
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 / publish canary (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
Set up a new centralized signal handling path, which emulates the
default unless something is explicitly registered to prevent it.

Fixes: https://github.com/denoland/deno/issues/29590

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-07-09 09:01:27 +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
Bartek Iwańczuk
f781796402
feat: Deno.execPath() no longer requires --allow-read permission (#29620)
This commit changes `Deno.execPath()` API to no longer require
read permission.

This change is dictated by the fact that in common scenarios, requiring
read permission is less secure than not requiring permissions - if
a user wants to spawn a Deno subprocess using the current executable,
they would do something like:

```
new Deno.Command(Deno.execPath(), { args: ["eval", "1+1"] }).outputSync();
```

To run this program, currently one needs to pass `--allow-read
--allow-run=deno` flags.
It's possible to limit scope of `--allow-read` flag, but it's really
cumbersome to do,
so most users will opt to give a blanket `--allow-read` permission.

Not requiring read permissions allows the above program to be run with
just `--allow-run=deno` flag.

This change is in similar to relaxing of permissions in `Deno.cwd()` API
done in https://github.com/denoland/deno/pull/27192.

Ref
https://github.com/denoland/deno/issues/20061#issuecomment-2942497783
2025-06-25 20:57:35 +02:00
Efe
147b067db5
fix(ext/os): silently ignore invalid utf-8 characters in os vars (#29571) 2025-06-10 17:52:38 -04:00
Bartek Iwańczuk
32db2db121
fix(ext/node): createInterface doesn't require env permission (#29472)
Closes https://github.com/denoland/deno/issues/29441
2025-05-28 11:59:26 +02:00
Cyan
5cd03feb0d
chore: optimize op_runtime_cpu_usage and op_runtime_memory_usage (#29179)
Ref https://github.com/denoland/deno/pull/27217

> `op_runtime_cpu_usage` can be optimized by accepting a `&mut [u32]`
instead of returning a serde tuple but it can be done as a follow up.

Accept a `&mut [u32]` instead of serde tuple for `op_runtime_cpu_usage`
and `op_runtime_memory_usage`

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2025-05-09 16:00:35 +05:30
Bartek Iwańczuk
4d1f47a915
feat: Allow access to NO_COLOR env var without --allow-env (#29090)
Since `Deno.noColor` exists, it makes sense to allow accessing
`NO_COLOR` env var without `--allow-env` permission.
2025-04-29 10:12:48 -04:00
snek
2221cf3e7c
feat: deno_core 0.344.0 (#29089)
- new ops init api
  - fix op order
- remove deno_os_worker since extensions must now match the snapshot
exactly
- isatty test change
2025-04-29 13:15:08 +02:00
Divy Srivastava
e0813f2255
fix(ext/node): throw NotCapable on process.env accessor (#28280)
Fixes https://github.com/denoland/deno/issues/28125

Additionally "FORCE_COLOR" env var can now be accessed 
without `--allow-env` check.
---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2025-04-28 14:28:01 +00:00
Dan
e612d572f8
fix(deno_os): allow running WebWorker without snapshots (#28975)
This addresses [#28680](https://github.com/denoland/deno/issues/28680)
where the esm modules are not found when instantiating a WebWorker with
snapshots disabled.

This is an alternative solution to another PR,
https://github.com/denoland/deno/pull/28693
2025-04-24 10:39:38 -07:00
snek
d4ee94962f
feat: upgrade deno_core and V8 (#28562)
includes V8 upgrade to 135
2025-03-21 00:19:44 +01:00
Cyan
e6dda60d5c
feat: implement process.cpuUsage (Deno.cpuUsage) (#27217) 2025-01-30 17:23:05 +05:30
Divy Srivastava
5c64146bea
fix(ext/node): clear tz cache when setting process.env.TZ (#27826) 2025-01-28 18:13:41 +05:30
Bartek Iwańczuk
395628026f
fix(ext/os): pass SignalState to web worker (#27741)
Closes https://github.com/denoland/deno/issues/27717

Made a mistake in https://github.com/denoland/deno/pull/27655 and
didn't add the `SignalStore` for web worker.
2025-01-20 19:43:15 +05:30
Bartek Iwańczuk
974e2f44b2
refactor: add 'deno_os' crate (#27655)
This commit creates "deno_os" extension crate and moves
numerous ops from "runtime/" crate to the new crate.
2025-01-14 17:29:36 +01:00
Renamed from runtime/ops/os/mod.rs (Browse further)