This is not a full-fledged and fully correct `require`/CJS support
for `node:worker_threads`, but unlocks certain scenarios that
were not working at all previously.
This commit adds initial support for connecting Unix socket over
TLS in `node:tls.connect()` API
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
This PR builds on top of https://github.com/denoland/deno_core/pull/1167
that provided 16% perf improvement for structured clone algorithm by avoid round-trip
serialization and deserialization.
This was applied to the internal `structuredClone` helper, as well as
for `MessagePort.postMessage` which is what Web worker
and `node:worker_thread` APIs are using.
Notable changes:
- Introduces a separate op between `Deno.open` and `node:fs.open`.
- Removes redundant `existenceCheckRequired` and `Deno.lstatSync` calls,
as the op layer already handles that when `options.create_new` is true
and uses synchronous I/O when `O_SYNC` is passed.
- Allows passing custom flags to the op (e.g. `O_SYNC`).
- Addresses `prefer-primordials` lint rule.
- Allows
[parallel/test-fs-open.js](https://github.com/nodejs/node/blob/v23.9.0/test/parallel/test-fs-open.js)
test to pass. There are also several tests that have passed before that
I added to the config.toml.
Improves compatibility with Node.js by validating the input parameters,
accepting Buffer type paths, and converting thrown errors correctly.
This PR also addresses `prefer-primordials` lint rule. These changes
allow parallel/test-fs-unlink-type-check.js test to pass.
Towards https://github.com/denoland/deno/issues/29972,
https://github.com/denoland/deno/issues/24236.
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>
Proxy traps should never be invoked on `console.log()`. This PR aligns
Deno's behaviour with other runtimes like Chrome, Firefox and Node. This
fixes the linked issue where it wasn't possible to call `console.log()`
on vite's module graph without an error being thrown.
Fixes https://github.com/denoland/deno/issues/30229
tunnels now automatically reconnect and migrate. also use `shutdown` in
telemetry instead of `flush` because it times out after 5s, which is
important if the tunnel connection is hanged for some reason.
1. Removes the access check callback, which was kind of confusing.
1. Requires `CheckedPath` for everything in the `FileSystem` trait to
ensure we're always checking permissions.
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>
Currently `fs.exists` and `fs.existsSync` throws error when invalid path
is given to the input.
The expected behavior is to:
- Call the callback with false on `fs.exists`.
- Return false on `fs.existsSync`.
Towards #29972, #24236
…9515)"
This reverts commit 248d038ef6.
Reverting for now as it causes programs to not exit properly, see
https://github.com/denoland/deno/issues/29590.
While we are working on a proper fix it's better to revert it
and not flush OTEL data in some situations.