From 845a6f8d9799f3de089247f6b41569d900e63a6b Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 25 Jan 2024 07:48:48 +1100 Subject: [PATCH] refactor: use granular `--unstable-*` CLI flags (#4232) * refactor: use granular `--unstable-*` CLI flags * tweak --- async/delay.ts | 3 +-- console/_tools/compare_with_rust.ts | 4 ++-- deno.json | 4 ++-- fs/expand_glob_test.ts | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/async/delay.ts b/async/delay.ts index 5caaaa6ac..2e8449966 100644 --- a/async/delay.ts +++ b/async/delay.ts @@ -25,8 +25,7 @@ export interface DelayOptions { * // ... * ``` * - * To allow the process to continue to run as long as the timer exists. Requires - * `--unstable` flag. + * To allow the process to continue to run as long as the timer exists. * * ```ts * import { delay } from "https://deno.land/std@$STD_VERSION/async/delay.ts"; diff --git a/console/_tools/compare_with_rust.ts b/console/_tools/compare_with_rust.ts index a52185adb..889ad3a7c 100644 --- a/console/_tools/compare_with_rust.ts +++ b/console/_tools/compare_with_rust.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -// Run this test with `deno test --unstable -A compare_with_rust.ts` +// Run this test with `deno test --unstable-ffi -A compare_with_rust.ts` import { unicodeWidth } from "../unicode_width.ts"; import { fromFileUrl } from "../../path/mod.ts"; @@ -21,7 +21,7 @@ Deno.test("fast-check equality with unicode_width Rust crate", async (t) => { const toCString = (str: string) => new TextEncoder().encode(str + "\0"); - // @ts-ignore type-check errors if unavailable due to lack of --unstable flag + // @ts-ignore type-check errors if unavailable due to lack of --unstable-ffi flag let dylib: Deno.DynamicLibrary<{ unicode_width: { parameters: ["buffer"]; result: "usize" }; }>; diff --git a/deno.json b/deno.json index d2102bdac..6f5ac3cc2 100644 --- a/deno.json +++ b/deno.json @@ -12,7 +12,7 @@ "automation/": "https://raw.githubusercontent.com/denoland/automation/0.10.0/" }, "tasks": { - "test": "DENO_NO_DEPRECATION_WARNINGS=1 deno test --doc --unstable --allow-all --parallel --coverage --trace-ops", + "test": "DENO_NO_DEPRECATION_WARNINGS=1 deno test --unstable-http --unstable-webgpu --doc --allow-all --parallel --coverage --trace-ops", "test:browser": "git grep --name-only \"This module is browser compatible.\" | grep -v deno.json | grep -v .github/workflows | grep -v _tools | xargs deno check --config browser-compat.tsconfig.json", "fmt:licence-headers": "deno run --allow-read --allow-write ./_tools/check_licence.ts", "lint:deprecations": "deno run --allow-read --allow-net --allow-env=HOME ./_tools/check_deprecation.ts", @@ -22,7 +22,7 @@ "lint": "deno lint && deno task fmt:licence-headers --check && deno task lint:deprecations && deno task lint:doc-imports && deno task lint:circular && deno task lint:tools-types", "typos": "typos -c ./.github/workflows/typos.toml", "build:crypto": "deno task --cwd crypto/_wasm wasmbuild", - "wasmbuild": "deno run --unstable -A https://deno.land/x/wasmbuild@0.15.5/main.ts --js-ext mjs --sync", + "wasmbuild": "deno run -A https://deno.land/x/wasmbuild@0.15.5/main.ts --js-ext mjs --sync", "cov:gen": "deno coverage coverage --lcov --output=cov.lcov", "cov:view": "deno coverage --html coverage", "ok": "deno task lint && deno fmt --check && deno task test:browser && deno task test" diff --git a/fs/expand_glob_test.ts b/fs/expand_glob_test.ts index d1ca2394f..e0198985b 100644 --- a/fs/expand_glob_test.ts +++ b/fs/expand_glob_test.ts @@ -235,7 +235,7 @@ Deno.test("expandGlobSync() accepts includeDirs option set to false", function ( Deno.test("expandGlob() throws permission error without fs permissions", async function () { const exampleUrl = new URL("testdata/expand_wildcard.js", import.meta.url); const command = new Deno.Command(Deno.execPath(), { - args: ["run", "--quiet", "--unstable", "--no-lock", exampleUrl.toString()], + args: ["run", "--quiet", "--no-lock", exampleUrl.toString()], }); const { code, success, stdout, stderr } = await command.output(); const decoder = new TextDecoder();