From b8e3f4c71dae5b43a03e8cfb36e71865e8eeaabf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 28 Sep 2022 15:36:06 +0200 Subject: feat: Stabilize Deno.hostname() API (#15932) --- cli/diagnostics.rs | 1 - cli/dts/lib.deno.ns.d.ts | 14 ++++++++++++++ cli/dts/lib.deno.unstable.d.ts | 17 ----------------- 3 files changed, 14 insertions(+), 18 deletions(-) (limited to 'cli') diff --git a/cli/diagnostics.rs b/cli/diagnostics.rs index c15832869..d947aaa2b 100644 --- a/cli/diagnostics.rs +++ b/cli/diagnostics.rs @@ -40,7 +40,6 @@ const UNSTABLE_DENO_PROPS: &[&str] = &[ "createHttpClient", "futime", "futimeSync", - "hostname", "kill", "listen", "listenDatagram", diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index f3e6b1376..a9de9abe0 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -161,6 +161,20 @@ declare namespace Deno { */ export function memoryUsage(): MemoryUsage; + /** + * Get the `hostname` of the machine the Deno process is running on. + * + * ```ts + * console.log(Deno.hostname()); + * ``` + * + * Requires `allow-sys` permission. + * + * @tags allow-sys + * @category Runtime Environment + */ + export function hostname(): string; + /** Reflects the `NO_COLOR` environment variable at program start. * * See: https://no-color.org/ diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index 54b328196..98cae94a4 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -940,23 +940,6 @@ declare namespace Deno { }, >(opt: T): Process; - /** **UNSTABLE**: New API, yet to be vetted. - * - * Get the `hostname` of the machine the Deno process is running on. - * - * ```ts - * console.log(Deno.hostname()); - * ``` - * - * Requires `allow-sys` permission. - * Additional consideration is still necessary around the permissions - * required. - * - * @tags allow-sys - * @category Runtime Environment - */ - export function hostname(): string; - /** **UNSTABLE**: New API, yet to be vetted. * * A custom HttpClient for use with `fetch`. -- cgit v1.2.3