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

Native WebSockets in node 20 #53684

Closed
PuruVJ opened this issue Jul 2, 2024 · 3 comments
Closed

Native WebSockets in node 20 #53684

PuruVJ opened this issue Jul 2, 2024 · 3 comments
Labels
feature request Issues that request new features to be added to Node.js. good first issue Issues that are suitable for first-time contributors. http Issues or PRs related to the http subsystem. v20.x v20.x Issues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch.

Comments

@PuruVJ
Copy link

PuruVJ commented Jul 2, 2024

What is the problem this feature will solve?

We are working on a library and wish to keep its minimum LTS at v20. It uses WebSockets, and is used in both browser and NodeJS. To use the native implementations as much as possible, it'd be great to have WebSockets backported to node 20 as well. I had a conversation with @mcollina and he suggested exposing WebSockets on node:http

What is the feature you are proposing to solve the problem?

Expose WebSocket on node:http

import { WebSocket } from 'node:http';

What alternatives have you considered?

Do nothing and use npm packages like ws/isomorphic-ws

@PuruVJ PuruVJ added the feature request Issues that request new features to be added to Node.js. label Jul 2, 2024
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Jul 2, 2024
@RedYetiDev RedYetiDev added http Issues or PRs related to the http subsystem. v20.x v20.x Issues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch. labels Jul 2, 2024
@mcollina
Copy link
Member

mcollina commented Jul 2, 2024

@KhafraDev wdyt?

I think this would be good to do.

We should:

  1. add it to v22.
  2. backport the change to v20.

cc @nodejs/http

@RedYetiDev RedYetiDev moved this from Awaiting Triage to Triaged in Node.js feature requests Jul 2, 2024
@mcollina mcollina added the good first issue Issues that are suitable for first-time contributors. label Jul 2, 2024
@anfibiacreativa
Copy link
Contributor

I'm gonna take this with @manekinekko

@RedYetiDev
Copy link
Member

Fixed by #53721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. good first issue Issues that are suitable for first-time contributors. http Issues or PRs related to the http subsystem. v20.x v20.x Issues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch.
Projects
None yet
Development

No branches or pull requests

5 participants
@mcollina @anfibiacreativa @RedYetiDev @PuruVJ and others