Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(net/unstable): move get-network-address module to unstable-get-network-address #5949

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _tools/check_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion http/file_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion net/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 1 addition & 4 deletions net/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand All @@ -19,4 +17,3 @@
*/

export * from "./get_available_port.ts";
export * from "./get_network_address.ts";
Original file line number Diff line number Diff line change
Expand Up @@ -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()!;
*
Expand All @@ -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")!;
*
Expand Down
Original file line number Diff line number Diff line change
@@ -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";

Expand Down