diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-05-28 00:43:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-27 23:43:07 +0000 |
commit | 1667e28a15d9107c2b9cb6e5d130d6ee5f61c6d7 (patch) | |
tree | f6fd7c9915f9519e6729707525403c37129b844b | |
parent | 506c275053c880a4c6c3f49921f99fd41759064f (diff) |
FUTURE(ext/fs): stabilize file system APIs (#23968)
Closes https://github.com/denoland/deno/issues/23906
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
-rw-r--r-- | cli/args/mod.rs | 7 | ||||
-rw-r--r-- | tests/specs/future/unstable_flags/__test__.jsonc | 20 | ||||
-rw-r--r-- | tests/specs/future/unstable_flags/main.js | 4 | ||||
-rw-r--r-- | tests/specs/future/unstable_flags/main.out | 1 | ||||
-rw-r--r-- | tests/specs/future/unstable_flags/worker.js | 5 |
5 files changed, 37 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 706d98852..cd5388459 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -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 } diff --git a/tests/specs/future/unstable_flags/__test__.jsonc b/tests/specs/future/unstable_flags/__test__.jsonc new file mode 100644 index 000000000..d3d02e029 --- /dev/null +++ b/tests/specs/future/unstable_flags/__test__.jsonc @@ -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" + } + } + ] +} diff --git a/tests/specs/future/unstable_flags/main.js b/tests/specs/future/unstable_flags/main.js new file mode 100644 index 000000000..0d86d0d09 --- /dev/null +++ b/tests/specs/future/unstable_flags/main.js @@ -0,0 +1,4 @@ +console.log( + // Undefined without `--unstable-fs` + Deno.build.os === "windows" ? true : typeof Deno.umask === "function", +); diff --git a/tests/specs/future/unstable_flags/main.out b/tests/specs/future/unstable_flags/main.out new file mode 100644 index 000000000..27ba77dda --- /dev/null +++ b/tests/specs/future/unstable_flags/main.out @@ -0,0 +1 @@ +true diff --git a/tests/specs/future/unstable_flags/worker.js b/tests/specs/future/unstable_flags/worker.js new file mode 100644 index 000000000..64b8e07b8 --- /dev/null +++ b/tests/specs/future/unstable_flags/worker.js @@ -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(); |