BREAKING CHANGE: remove Deno.OpenMode (#4884)

This commit removes Deno.OpenMode along with overloaded variants
of Deno.open() and Deno.openSync() that used OpenMode.
This commit is contained in:
Bartek Iwańczuk 2020-04-25 00:45:55 +02:00 committed by GitHub
parent 0cb1bb98cc
commit 4a8d25646a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 113 additions and 198 deletions

View file

@ -229,7 +229,10 @@ unitTest(
async function runRedirectStdoutStderr(): Promise<void> {
const tempDir = await makeTempDir();
const fileName = tempDir + "/redirected_stdio.txt";
const file = await open(fileName, "w");
const file = await open(fileName, {
create: true,
write: true,
});
const p = run({
cmd: [
@ -261,7 +264,7 @@ unitTest(
const fileName = tempDir + "/redirected_stdio.txt";
const encoder = new TextEncoder();
await writeFile(fileName, encoder.encode("hello"));
const file = await open(fileName, "r");
const file = await open(fileName);
const p = run({
cmd: ["python", "-c", "import sys; assert 'hello' == sys.stdin.read();"],