diff --git a/_tools/check_docs.ts b/_tools/check_docs.ts index 840132e06b04..80b5bd3831db 100644 --- a/_tools/check_docs.ts +++ b/_tools/check_docs.ts @@ -59,6 +59,7 @@ const ENTRY_POINTS = [ "../media_types/mod.ts", "../msgpack/mod.ts", "../net/mod.ts", + "../net/unstable_get_network_address.ts", "../path/mod.ts", "../path/posix/mod.ts", "../path/windows/mod.ts", diff --git a/http/file_server.ts b/http/file_server.ts index f686198fdd9e..9e1cb9d8f8b0 100644 --- a/http/file_server.ts +++ b/http/file_server.ts @@ -51,7 +51,7 @@ import { ByteSliceStream } from "@std/streams/byte-slice-stream"; import { parseArgs } from "@std/cli/parse-args"; import denoConfig from "./deno.json" with { type: "json" }; import { format as formatBytes } from "@std/fmt/bytes"; -import { getNetworkAddress } from "@std/net/get-network-address"; +import { getNetworkAddress } from "@std/net/unstable-get-network-address"; import { HEADER } from "./unstable_header.ts"; import { METHOD } from "./unstable_method.ts"; diff --git a/net/deno.json b/net/deno.json index c4b2deccb7fc..f78a4efc5c10 100644 --- a/net/deno.json +++ b/net/deno.json @@ -4,6 +4,6 @@ "exports": { ".": "./mod.ts", "./get-available-port": "./get_available_port.ts", - "./get-network-address": "./get_network_address.ts" + "./unstable-get-network-address": "./unstable_get_network_address.ts" } } diff --git a/net/mod.ts b/net/mod.ts index 009017d44a42..0d975ddc07e6 100644 --- a/net/mod.ts +++ b/net/mod.ts @@ -4,9 +4,7 @@ * Network utilities. * * ```ts no-assert no-eval - * import { getNetworkAddress, getAvailablePort } from "@std/net"; - * - * console.log(`My network IP address is ${getNetworkAddress()}`); + * import { getAvailablePort } from "@std/net"; * * const command = new Deno.Command(Deno.execPath(), { * args: ["test.ts", "--port", getAvailablePort().toString()], @@ -19,4 +17,3 @@ */ export * from "./get_available_port.ts"; -export * from "./get_network_address.ts"; diff --git a/net/get_network_address.ts b/net/unstable_get_network_address.ts similarity index 91% rename from net/get_network_address.ts rename to net/unstable_get_network_address.ts index bbad8546946d..07c72532db8f 100644 --- a/net/get_network_address.ts +++ b/net/unstable_get_network_address.ts @@ -17,7 +17,7 @@ * * @example Get the IPv4 network address (default) * ```ts no-assert no-eval - * import { getNetworkAddress } from "@std/net/get-network-address"; + * import { getNetworkAddress } from "@std/net/unstable-get-network-address"; * * const hostname = getNetworkAddress()!; * @@ -26,7 +26,7 @@ * * @example Get the IPv6 network address * ```ts no-assert no-eval - * import { getNetworkAddress } from "@std/net/get-network-address"; + * import { getNetworkAddress } from "@std/net/unstable-get-network-address"; * * const hostname = getNetworkAddress("IPv6")!; * diff --git a/net/get_network_address_test.ts b/net/unstable_get_network_address_test.ts similarity index 97% rename from net/get_network_address_test.ts rename to net/unstable_get_network_address_test.ts index d22312722c3b..36c578a4d428 100644 --- a/net/get_network_address_test.ts +++ b/net/unstable_get_network_address_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. -import { getNetworkAddress } from "./get_network_address.ts"; +import { getNetworkAddress } from "./unstable_get_network_address.ts"; import { stub } from "@std/testing/mock"; import { assertEquals } from "@std/assert";