mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 16:19:12 -05:00
fix: remove leftover Deno.spawn references (#17524)
This commit is contained in:
parent
b71d224d11
commit
83642976bf
5 changed files with 9 additions and 81 deletions
|
@ -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 {
|
||||
|
|
|
@ -29,12 +29,8 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[
|
|||
"removeSignalListener",
|
||||
"shutdown",
|
||||
"umask",
|
||||
"spawnChild",
|
||||
"Child",
|
||||
"ChildProcess",
|
||||
"spawn",
|
||||
"spawnSync",
|
||||
"SpawnOptions",
|
||||
"ChildStatus",
|
||||
"SpawnOutput",
|
||||
"command",
|
||||
|
|
67
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
67
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -1407,71 +1407,6 @@ declare namespace Deno {
|
|||
*/
|
||||
export function upgradeHttpRaw(request: Request): [Deno.Conn, Uint8Array];
|
||||
|
||||
/** **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.
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)]
|
||||
|
|
Loading…
Reference in a new issue