BREAKING(types): soft-remove Deno.run() (#25403)

Towards #22079
This commit is contained in:
Asher Gomez 2024-09-05 08:45:55 +10:00 committed by GitHub
parent c32d692a8f
commit 195b17ae12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 58 additions and 368 deletions

View file

@ -130,6 +130,8 @@ class Process {
}
}
// Note: This function was soft-removed in Deno 2. Its types have been removed,
// but its implementation has been kept to avoid breaking changes.
function run({
cmd,
cwd = undefined,
@ -144,11 +146,6 @@ function run({
...new SafeArrayIterator(ArrayPrototypeSlice(cmd, 1)),
];
}
internals.warnOnDeprecatedApi(
"Deno.run()",
(new Error()).stack,
`Use "Deno.Command()" API instead.`,
);
const res = opRun({
cmd: ArrayPrototypeMap(cmd, String),
cwd,