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

refactor: use node:events instead of relative path #354

Merged
merged 3 commits into from
Nov 29, 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 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 stream 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
1 change: 1 addition & 0 deletions src/runtime/node/tls/internal/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +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";

export class Server extends _Server implements tls.Server {
Expand Down
1 change: 1 addition & 0 deletions src/runtime/node/tls/internal/tls-socket.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type tls from "node:tls";
// Relative net import required, see https://github.com/unjs/unenv/issues/353
import { Socket } from "../../net";
pi0 marked this conversation as resolved.
Show resolved Hide resolved
import { createNotImplementedError } from "../../../_internal/utils";

Expand Down
1 change: 1 addition & 0 deletions src/runtime/node/tty/internal/read-stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type tty from "node:tty";
// Relative net import required, see https://github.com/unjs/unenv/issues/353
import { Socket } from "../../net";

export class ReadStream extends Socket implements tty.ReadStream {
Expand Down