Skip to content

Commit

Permalink
refactor: node package import
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Nov 29, 2024
1 parent 7a9f230 commit fc0604f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/runtime/node/http/internal/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type http from "node:http";
import { Socket } from "node:net";
// Relative import required, see https://github.com/unjs/unenv/issues/353
import { Readable } from "../../stream/internal/readable";
import { rawHeaders } from "../../../_internal/utils";

Expand Down
1 change: 1 addition & 0 deletions src/runtime/node/http/internal/response.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type http from "node:http";
import type { Socket } from "node:net";
import { Callback } from "../../../_internal/types";
// Relative stream import required, see https://github.com/unjs/unenv/issues/353
import { Writable } from "../../stream";

// Docs: https://nodejs.org/api/http.html#http_class_http_serverresponse
Expand Down
1 change: 1 addition & 0 deletions src/runtime/node/net/internal/socket.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type * as net from "node:net";
import { Callback, BufferEncoding } from "../../../_internal/types";
// Relative stream import required, see https://github.com/unjs/unenv/issues/353
import { Duplex } from "../../stream/internal/duplex";

// Docs: https://nodejs.org/api/net.html#net_class_net_socket
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/node/stream/internal/readable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type * as stream from "node:stream";
import type { BufferEncoding, Callback } from "../../../_internal/types";
import { createNotImplementedError } from "../../../_internal/utils";
import { EventEmitter } from "../../events";
import { EventEmitter } from "node:events";

// Docs: https://nodejs.org/api/stream.html#stream_readable_streams
// Implementation: https://github.com/nodejs/node/blob/master/lib/internal/streams/readable.js
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/node/stream/internal/writable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type * as stream from "node:stream";
import type { BufferEncoding, Callback } from "../../../_internal/types";

import { EventEmitter } from "../../events";
import { EventEmitter } from "node:events";

// Docs: https://nodejs.org/api/stream.html#stream_writable_streams
// Implementation: https://github.com/nodejs/node/blob/master/lib/internal/streams/writable.js
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/node/tls/internal/tls-socket.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type tls from "node:tls";
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 fc0604f

Please sign in to comment.