summaryrefslogtreecommitdiff
path: root/ext/net
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-09-07 09:01:36 +1000
committerGitHub <noreply@github.com>2024-09-06 23:01:36 +0000
commita9ed06b8324d4b139aea516d045bdbd091f15be9 (patch)
treef6bf30f56ed898cff310c34c7cf70a50651de622 /ext/net
parent5bac4075c38c34ba53ce86e8ce6912d3be38c4bb (diff)
BREAKING(net): remove `Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid` (#25446)
Towards #22079 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Diffstat (limited to 'ext/net')
-rw-r--r--ext/net/01_net.js34
-rw-r--r--ext/net/02_tls.js9
-rw-r--r--ext/net/lib.deno_net.d.ts35
3 files changed, 1 insertions, 77 deletions
diff --git a/ext/net/01_net.js b/ext/net/01_net.js
index 12a0a6bf2..b636ec67a 100644
--- a/ext/net/01_net.js
+++ b/ext/net/01_net.js
@@ -101,13 +101,6 @@ class Conn {
#writable;
constructor(rid, remoteAddr, localAddr) {
- if (internals.future) {
- ObjectDefineProperty(this, "rid", {
- __proto__: null,
- enumerable: false,
- value: undefined,
- });
- }
ObjectDefineProperty(this, internalRidSymbol, {
__proto__: null,
enumerable: false,
@@ -118,15 +111,6 @@ class Conn {
this.#localAddr = localAddr;
}
- get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.Conn.rid",
- new Error().stack,
- "Use `Deno.Conn` instance methods instead.",
- );
- return this.#rid;
- }
-
get remoteAddr() {
return this.#remoteAddr;
}
@@ -223,15 +207,6 @@ class TcpConn extends Conn {
this.#rid = rid;
}
- get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.TcpConn.rid",
- new Error().stack,
- "Use `Deno.TcpConn` instance methods instead.",
- );
- return this.#rid;
- }
-
setNoDelay(noDelay = true) {
return op_set_nodelay(this.#rid, noDelay);
}
@@ -253,15 +228,6 @@ class UnixConn extends Conn {
});
this.#rid = rid;
}
-
- get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.UnixConn.rid",
- new Error().stack,
- "Use `Deno.UnixConn` instance methods instead.",
- );
- return this.#rid;
- }
}
class Listener {
diff --git a/ext/net/02_tls.js b/ext/net/02_tls.js
index 0ea5e8ca2..c06c64747 100644
--- a/ext/net/02_tls.js
+++ b/ext/net/02_tls.js
@@ -37,15 +37,6 @@ class TlsConn extends Conn {
this.#rid = rid;
}
- get rid() {
- internals.warnOnDeprecatedApi(
- "Deno.TlsConn.rid",
- new Error().stack,
- "Use `Deno.TlsConn` instance methods instead.",
- );
- return this.#rid;
- }
-
handshake() {
return op_tls_handshake(this.#rid);
}
diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts
index 382a3ab8d..f87f132ac 100644
--- a/ext/net/lib.deno_net.d.ts
+++ b/ext/net/lib.deno_net.d.ts
@@ -83,14 +83,6 @@ declare namespace Deno {
readonly localAddr: A;
/** The remote address of the connection. */
readonly remoteAddr: A;
- /**
- * The resource ID of the connection.
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- */
- readonly rid: number;
/** Shuts down (`shutdown(2)`) the write side of the connection. Most
* callers should just use `close()`. */
closeWrite(): Promise<void>;
@@ -123,14 +115,6 @@ declare namespace Deno {
* not happened yet. Calling this method is optional; the TLS handshake
* will be completed automatically as soon as data is sent or received. */
handshake(): Promise<TlsHandshakeInfo>;
- /**
- * The resource ID of the connection.
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- */
- readonly rid: number;
}
/** @category Network */
@@ -359,14 +343,6 @@ declare namespace Deno {
setNoDelay(noDelay?: boolean): void;
/** Enable/disable keep-alive functionality. */
setKeepAlive(keepAlive?: boolean): void;
- /**
- * The resource ID of the connection.
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- */
- readonly rid: number;
}
/** @category Network */
@@ -376,16 +352,7 @@ declare namespace Deno {
}
/** @category Network */
- export interface UnixConn extends Conn<UnixAddr> {
- /**
- * The resource ID of the connection.
- *
- * @deprecated This will be removed in Deno 2.0. See the
- * {@link https://docs.deno.com/runtime/manual/advanced/migrate_deprecations | Deno 1.x to 2.x Migration Guide}
- * for migration instructions.
- */
- readonly rid: number;
- }
+ export interface UnixConn extends Conn<UnixAddr> {}
/** Connects to the hostname (default is "127.0.0.1") and port on the named
* transport (default is "tcp"), and resolves to the connection (`Conn`).