1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 00:21:05 -05:00

feat: Deprecate Deno.run API in favor of Deno.Command (#17630) (#18866)

This commit adds `@deprecated` comments to `Deno.run` API declarations.
Since stabilization of `Deno.Command` API in [Deno
v1.31](https://deno.com/blog/v1.31#api-stabilizations), `Deno.Command`
is the preferred (more reliable) API to interact with subprocesses.
This is the preparation for the removal of `Deno.run` API in Deno 2.0.
This commit is contained in:
Bartek Iwańczuk 2023-04-27 02:11:23 +02:00 committed by GitHub
parent f4e442da4d
commit 09b6dbc0a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3691,7 +3691,10 @@ declare namespace Deno {
options?: { recursive: boolean },
): FsWatcher;
/** Options which can be used with {@linkcode Deno.run}.
/**
* @deprecated Use {@linkcode Deno.Command} instead.
*
* Options which can be used with {@linkcode Deno.run}.
*
* @category Sub Process */
export interface RunOptions {
@ -3749,7 +3752,10 @@ declare namespace Deno {
stdin?: "inherit" | "piped" | "null" | number;
}
/** The status resolved from the `.status()` method of a
/**
* @deprecated Use {@linkcode Deno.Command} instead.
*
* The status resolved from the `.status()` method of a
* {@linkcode Deno.Process} instance.
*
* If `success` is `true`, then `code` will be `0`, but if `success` is
@ -3769,6 +3775,8 @@ declare namespace Deno {
};
/**
* * @deprecated Use {@linkcode Deno.Command} instead.
*
* Represents an instance of a sub process that is returned from
* {@linkcode Deno.run} which can be used to manage the sub-process.
*
@ -3925,7 +3933,10 @@ declare namespace Deno {
handler: () => void,
): void;
/** Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`,
/**
* @deprecated Use {@linkcode Deno.Command} instead.
*
* Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`,
* an array of program arguments, the first of which is the binary.
*
* ```ts