diff --git a/src/js/node/net.ts b/src/js/node/net.ts index 481375da79..f7190c516e 100644 --- a/src/js/node/net.ts +++ b/src/js/node/net.ts @@ -352,14 +352,10 @@ const ServerHandlers: SocketHandler = { const options = self[bunSocketServerOptions]; const { pauseOnConnect, connectionListener, [kSocketClass]: SClass, requestCert, rejectUnauthorized } = options; - const _socket = new SClass( - SClass === require("node:tls").TLSSocket - ? { - minVersion: self.minVersion, - maxVersion: self.maxVersion, - } - : {}, - ); + const _socket = new SClass({ + minVersion: self.minVersion, + maxVersion: self.maxVersion, + }); _socket.isServer = true; _socket.server = self; diff --git a/src/js/node/tls.ts b/src/js/node/tls.ts index c1c13fc48d..4cf743ca86 100644 --- a/src/js/node/tls.ts +++ b/src/js/node/tls.ts @@ -383,7 +383,6 @@ var InternalSecureContext = class SecureContext { throw $ERR_TLS_INVALID_PROTOCOL_VERSION(minVersionName, "minimum"); } } - console.log("minVersionName", minVersionName, new Error().stack); this.minVersion = TLS_VERSION_MAP[minVersionName]; if (maxVersionName) { diff --git a/test/integration/bun-types/fixture/env.ts b/test/integration/bun-types/fixture/env.ts index 5ac301905c..f2ec9e1eec 100644 --- a/test/integration/bun-types/fixture/env.ts +++ b/test/integration/bun-types/fixture/env.ts @@ -33,9 +33,7 @@ declare global { } } expectType(Bun.env.BAZ).is<"BAZ">(); -expectType(process.env.BAZ).is<"BAZ">(); expectType(import.meta.env.BAZ).is<"BAZ">(); -expectType(node_env.BAZ).is<"BAZ">(); expectType(bun_env.BAZ).is<"BAZ">(); expectType(Bun.env.OTHER).is(); @@ -44,16 +42,14 @@ expectType(import.meta.env.OTHER).is(); expectType(node_env.OTHER).is(); expectType(bun_env.OTHER).is(); -function isAllSame(a: T, b: T, c: T, d: T, e: T) { - return a === b && b === c && c === d && d === e; -} +declare function isAllSame(...args: T[]): void; //prettier-ignore { isAllSame <"FOO"> (process.env.FOO, Bun.env.FOO, import.meta.env.FOO, node_env.FOO, bun_env.FOO); isAllSame <"BAR"> (process.env.BAR, Bun.env.BAR, import.meta.env.BAR, node_env.BAR, bun_env.BAR); - isAllSame <"BAZ"> (process.env.BAZ, Bun.env.BAZ, import.meta.env.BAZ, node_env.BAZ, bun_env.BAZ); + isAllSame <"BAZ"> ( Bun.env.BAZ, import.meta.env.BAZ, bun_env.BAZ); // process.env doesn't extend import.meta.env isAllSame (process.env.OTHER, Bun.env.OTHER, import.meta.env.OTHER, node_env.OTHER, bun_env.OTHER); }