mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
FUTURE(ext/fs): stabilize file system APIs (#23968)
Closes https://github.com/denoland/deno/issues/23906 --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
parent
506c275053
commit
1667e28a15
5 changed files with 37 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
20
tests/specs/future/unstable_flags/__test__.jsonc
Normal file
20
tests/specs/future/unstable_flags/__test__.jsonc
Normal file
|
@ -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
tests/specs/future/unstable_flags/main.js
Normal file
4
tests/specs/future/unstable_flags/main.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
console.log(
|
||||
// Undefined without `--unstable-fs`
|
||||
Deno.build.os === "windows" ? true : typeof Deno.umask === "function",
|
||||
);
|
1
tests/specs/future/unstable_flags/main.out
Normal file
1
tests/specs/future/unstable_flags/main.out
Normal file
|
@ -0,0 +1 @@
|
|||
true
|
5
tests/specs/future/unstable_flags/worker.js
Normal file
5
tests/specs/future/unstable_flags/worker.js
Normal file
|
@ -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();
|
Loading…
Add table
Reference in a new issue