summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/integration/run_tests.rs10
-rw-r--r--cli/tsc/diagnostics.rs4
-rw-r--r--cli/tsc/dts/lib.deno.unstable.d.ts67
-rw-r--r--runtime/js/90_deno_ns.js3
-rw-r--r--runtime/ops/spawn.rs6
5 files changed, 9 insertions, 81 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 2494df881..fd6e6588c 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -202,7 +202,7 @@ itest!(_044_bad_resource {
exit_code: 1,
});
-// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
+// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
itest!(_045_proxy {
args: "run -L debug --unstable --allow-net --allow-env --allow-run --allow-read --reload --quiet run/045_proxy_test.ts",
output: "run/045_proxy_test.ts.out",
@@ -537,7 +537,7 @@ itest!(_088_dynamic_import_already_evaluating {
output: "run/088_dynamic_import_already_evaluating.ts.out",
});
-// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
+// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
itest!(_089_run_allow_list {
args: "run --unstable --allow-run=curl run/089_run_allow_list.ts",
output: "run/089_run_allow_list.ts.out",
@@ -625,7 +625,7 @@ itest!(private_field_presence_no_check {
output: "run/private_field_presence.ts.out",
});
-// TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
+// TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
itest!(lock_write_fetch {
args:
"run --quiet --allow-read --allow-write --allow-env --allow-run --unstable run/lock_write_fetch/main.ts",
@@ -1916,7 +1916,7 @@ fn dont_cache_on_check_fail() {
mod permissions {
use test_util as util;
- // TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
+ // TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
#[test]
fn with_allow() {
for permission in &util::PERMISSION_VARIANTS {
@@ -1935,7 +1935,7 @@ mod permissions {
}
}
- // TODO(bartlomieju): remove --unstable once Deno.spawn is stabilized
+ // TODO(bartlomieju): remove --unstable once Deno.Command is stabilized
#[test]
fn without_allow() {
for permission in &util::PERMISSION_VARIANTS {
diff --git a/cli/tsc/diagnostics.rs b/cli/tsc/diagnostics.rs
index b3026d934..ffb4a946d 100644
--- a/cli/tsc/diagnostics.rs
+++ b/cli/tsc/diagnostics.rs
@@ -29,12 +29,8 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[
"removeSignalListener",
"shutdown",
"umask",
- "spawnChild",
"Child",
"ChildProcess",
- "spawn",
- "spawnSync",
- "SpawnOptions",
"ChildStatus",
"SpawnOutput",
"command",
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts
index 12186c0b3..5ffde749b 100644
--- a/cli/tsc/dts/lib.deno.unstable.d.ts
+++ b/cli/tsc/dts/lib.deno.unstable.d.ts
@@ -1409,71 +1409,6 @@ declare namespace Deno {
/** **UNSTABLE**: New API, yet to be vetted.
*
- * @deprecated Use the Deno.Command API instead.
- *
- * Options which can be set when calling {@linkcode Deno.spawn},
- * {@linkcode Deno.spawnSync}, and {@linkcode Deno.spawnChild}.
- *
- * @category Sub Process
- */
- export interface SpawnOptions {
- /** Arguments to pass to the process. */
- args?: string[];
- /**
- * The working directory of the process.
- *
- * If not specified, the `cwd` of the parent process is used.
- */
- cwd?: string | URL;
- /**
- * Clear environmental variables from parent process.
- *
- * Doesn't guarantee that only `env` variables are present, as the OS may
- * set environmental variables for processes.
- *
- * @default {false}
- */
- clearEnv?: boolean;
- /** Environmental variables to pass to the subprocess. */
- env?: Record<string, string>;
- /**
- * Sets the child process’s user ID. This translates to a setuid call in the
- * child process. Failure in the set uid call will cause the spawn to fail.
- */
- uid?: number;
- /** Similar to `uid`, but sets the group ID of the child process. */
- gid?: number;
- /**
- * An {@linkcode AbortSignal} that allows closing the process using the
- * corresponding {@linkcode AbortController} by sending the process a
- * SIGTERM signal.
- *
- * Not supported in {@linkcode Deno.spawnSync}.
- */
- signal?: AbortSignal;
-
- /** How `stdin` of the spawned process should be handled.
- *
- * Defaults to `"null"`. */
- stdin?: "piped" | "inherit" | "null";
- /** How `stdout` of the spawned process should be handled.
- *
- * Defaults to `"piped". */
- stdout?: "piped" | "inherit" | "null";
- /** How `stderr` of the spawned process should be handled.
- *
- * Defaults to `"piped"`. */
- stderr?: "piped" | "inherit" | "null";
-
- /** Skips quoting and escaping of the arguments on windows. This option
- * is ignored on non-windows platforms.
- *
- * @default {false} */
- windowsRawArguments?: boolean;
- }
-
- /** **UNSTABLE**: New API, yet to be vetted.
- *
* Create a child process.
*
* If any stdio options are not set to `"piped"`, accessing the corresponding
@@ -1634,7 +1569,7 @@ declare namespace Deno {
* corresponding {@linkcode AbortController} by sending the process a
* SIGTERM signal.
*
- * Not supported in {@linkcode Deno.spawnSync}.
+ * Not supported in {@linkcode Deno.Command.outputSync}.
*/
signal?: AbortSignal;
diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js
index f18593df7..d2c76e003 100644
--- a/runtime/js/90_deno_ns.js
+++ b/runtime/js/90_deno_ns.js
@@ -146,9 +146,6 @@
funlockSync: __bootstrap.fs.funlockSync,
Child: __bootstrap.spawn.Child,
ChildProcess: __bootstrap.spawn.ChildProcess,
- spawnChild: __bootstrap.spawn.spawnChild,
- spawn: __bootstrap.spawn.spawn,
- spawnSync: __bootstrap.spawn.spawnSync,
Command: __bootstrap.spawn.Command,
serve: __bootstrap.flash.serve,
upgradeHttp: __bootstrap.http.upgradeHttp,
diff --git a/runtime/ops/spawn.rs b/runtime/ops/spawn.rs
index e5bf10cf0..e5454371e 100644
--- a/runtime/ops/spawn.rs
+++ b/runtime/ops/spawn.rs
@@ -193,7 +193,7 @@ fn create_command(
args: SpawnArgs,
api_name: &str,
) -> Result<std::process::Command, AnyError> {
- super::check_unstable(state, "Deno.spawn");
+ super::check_unstable(state, "Deno.Command");
state
.borrow_mut::<PermissionsContainer>()
.check_run(&args.cmd, api_name)?;
@@ -223,12 +223,12 @@ fn create_command(
#[cfg(unix)]
if let Some(gid) = args.gid {
- super::check_unstable(state, "Deno.spawn.gid");
+ super::check_unstable(state, "Deno.CommandOptions.gid");
command.gid(gid);
}
#[cfg(unix)]
if let Some(uid) = args.uid {
- super::check_unstable(state, "Deno.spawn.uid");
+ super::check_unstable(state, "Deno.CommandOptions.uid");
command.uid(uid);
}
#[cfg(unix)]