Skip to content

Commit

Permalink
FUTURE(ext/fs): stabilize file system APIs (denoland#23968)
Browse files Browse the repository at this point in the history
Closes denoland#23906

---------

Co-authored-by: Asher Gomez <[email protected]>
  • Loading branch information
bartlomieju and iuioiua committed May 27, 2024
1 parent 506c275 commit 1667e28
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1754,6 +1754,13 @@ impl CliOptions {
.unwrap_or_default();

from_config_file.extend_from_slice(&self.flags.unstable_config.features);

if *DENO_FUTURE {
from_config_file.extend_from_slice(&[
deno_runtime::deno_fs::UNSTABLE_FEATURE_NAME.to_string(),
]);
}

from_config_file
}

Expand Down
20 changes: 20 additions & 0 deletions tests/specs/future/unstable_flags/__test__.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"steps": [
{
// Notice `--unstable-*` flags are not needed anymore
"args": "run -A main.js",
"output": "main.out",
"envs": {
"DENO_FUTURE": "1"
}
},
{
// Notice `--unstable-*` flags are not needed anymore
"args": "run -A worker.js",
"output": "main.out",
"envs": {
"DENO_FUTURE": "1"
}
}
]
}
4 changes: 4 additions & 0 deletions tests/specs/future/unstable_flags/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
console.log(
// Undefined without `--unstable-fs`
Deno.build.os === "windows" ? true : typeof Deno.umask === "function",
);
1 change: 1 addition & 0 deletions tests/specs/future/unstable_flags/main.out
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
true
5 changes: 5 additions & 0 deletions tests/specs/future/unstable_flags/worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { delay } from "../../../util/std/async/delay.ts";

const worker = new Worker(import.meta.resolve("./main.js"), { type: "module" });
await delay(1_000);
worker.terminate();

0 comments on commit 1667e28

Please sign in to comment.