Skip to content

Commit

Permalink
refactor(tls): import Socket and Server from node:net (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb authored Jan 30, 2025
1 parent ada7c40 commit 09ce665
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/runtime/node/tls/internal/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type tls from "node:tls";
import { createNotImplementedError } from "../../../_internal/utils";
// Relative net import required, see https://github.com/unjs/unenv/issues/353
import { Server as _Server } from "../../net";
import { Server as _Server } from "node:net";

export class Server extends _Server implements tls.Server {
constructor(
Expand Down
3 changes: 1 addition & 2 deletions src/runtime/node/tls/internal/tls-socket.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type tls from "node:tls";
// Relative net import required, see https://github.com/unjs/unenv/issues/353
import { Socket } from "../../net";
import { Socket } from "node:net";
import { createNotImplementedError } from "../../../_internal/utils";

export class TLSSocket extends Socket implements tls.TLSSocket {
Expand Down

0 comments on commit 09ce665

Please sign in to comment.