diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-09-27 12:35:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 12:35:37 -0700 |
commit | fbddd5a2ebfb11dd376a751e9fc4cf09a6286ada (patch) | |
tree | 75c13ee9f26f61fe8c1d6f80df2580a523177c1b /runtime/web_worker.rs | |
parent | a8d1ab52761516b7f9b6069d6e433254794ed48c (diff) |
fix(node): Pass NPM_PROCESS_STATE to subprocesses via temp file instead of env var (#25896)
Fixes https://github.com/denoland/deno/issues/25401. Fixes
https://github.com/denoland/deno/issues/25841. Fixes
https://github.com/denoland/deno/issues/25891.
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r-- | runtime/web_worker.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 7b69a9798..8892d5bc6 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -1,6 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use crate::inspector_server::InspectorServer; use crate::ops; +use crate::ops::process::NpmProcessStateProviderRc; use crate::ops::worker_host::WorkersTable; use crate::shared::maybe_transpile_source; use crate::shared::runtime; @@ -383,6 +384,7 @@ pub struct WebWorkerOptions { pub strace_ops: Option<Vec<String>>, pub close_on_idle: bool, pub maybe_worker_metadata: Option<WorkerMetadata>, + pub npm_process_state_provider: Option<NpmProcessStateProviderRc>, } impl WebWorker { @@ -507,7 +509,9 @@ impl WebWorker { ops::permissions::deno_permissions::init_ops_and_esm( options.permission_desc_parser.clone(), ), - ops::process::deno_process::init_ops_and_esm(), + ops::process::deno_process::init_ops_and_esm( + options.npm_process_state_provider, + ), ops::signal::deno_signal::init_ops_and_esm(), ops::tty::deno_tty::init_ops_and_esm(), ops::http::deno_http_runtime::init_ops_and_esm(), |