diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-12-09 16:43:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 16:43:36 +0100 |
commit | cb6700fa5aac03fb3e082f9ed2e01d74238e6a99 (patch) | |
tree | da3edbc7b283deaeff970ba06e32c02bbfbfe010 /runtime/js/40_spawn.js | |
parent | 6541a0a9fd818424688003c617e4a84c3cf7d34d (diff) |
unstable: remove Deno.spawn, Deno.spawnSync, Deno.spawnChild APIs (#16893)
This commit removes three unstable Deno APIs:
- "Deno.spawn()"
- "Deno.spawnSync()"
- "Deno.spawnChild()"
These APIs were replaced by a unified "Deno.Command" API.
Diffstat (limited to 'runtime/js/40_spawn.js')
-rw-r--r-- | runtime/js/40_spawn.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/js/40_spawn.js b/runtime/js/40_spawn.js index 863063e3f..ea6b409a3 100644 --- a/runtime/js/40_spawn.js +++ b/runtime/js/40_spawn.js @@ -60,7 +60,7 @@ function createSpawnChild(opFn) { return function spawnChild(command, options = {}) { - return spawnChildInner(opFn, command, "Deno.spawnChild()", options); + return spawnChildInner(opFn, command, "Deno.Command().spawn()", options); }; } @@ -219,10 +219,11 @@ return function spawn(command, options) { if (options?.stdin === "piped") { throw new TypeError( - "Piped stdin is not supported for this function, use 'Deno.spawnChild()' instead", + "Piped stdin is not supported for this function, use 'Deno.Command().spawn()' instead", ); } - return spawnChildInner(opFn, command, "Deno.spawn()", options).output(); + return spawnChildInner(opFn, command, "Deno.Command().output()", options) + .output(); }; } @@ -241,7 +242,7 @@ } = {}) { if (stdin === "piped") { throw new TypeError( - "Piped stdin is not supported for this function, use 'Deno.spawnChild()' instead", + "Piped stdin is not supported for this function, use 'Deno.Command().spawn()' instead", ); } const result = opFn({ |