-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
http: expose websocket in nodehttp #53721
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
Merged
nodejs-github-bot
merged 27 commits into
nodejs:main
from
anfibiacreativa:feat/expose-websockets-in-nodehttp
Jul 8, 2024
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
4083955
http: expose websockets
anfibiacreativa 9dd678b
test: add test for exposing websocket in http
anfibiacreativa a2e4f84
http: add dynamic loading on first usage
anfibiacreativa 0d5d120
test: extend test to compare strict with global
anfibiacreativa e4b6558
http: refactor to lazyload classes more effectively
anfibiacreativa 576bdb0
test: update test/parallel/test-http-import-websocket.js
anfibiacreativa ecfd5ec
http: refactor lazy loading function
anfibiacreativa 9b65b5b
docs: add websocket reference to http doc
anfibiacreativa 804276c
fix: fix linting errors from ci
anfibiacreativa 6e1cb1d
http: prevent global override
anfibiacreativa a9c915e
docs: put placeholder version
anfibiacreativa c80014b
http: add return in scope
anfibiacreativa b529947
docs: fix linter errors
anfibiacreativa 29e1861
http: update with suggestion to rename var
anfibiacreativa 067782d
http: update return accordingly
anfibiacreativa fc9a869
docs: remove escaping
anfibiacreativa 9aa63b0
docs: add link at the bottom of the page
anfibiacreativa 20789fb
fix: fix linter docs
anfibiacreativa b5e0931
http: revert suggestion to fix errors
anfibiacreativa d3df897
fix: revert broken link
anfibiacreativa 4d5f180
http: import all unidici in the lazy function
anfibiacreativa 0c2c82b
http: remove additional export
anfibiacreativa aeed701
http: remove unnecessary declaration that was used in module.exports
anfibiacreativa 7209a89
http: replace ternary
anfibiacreativa c928a97
http: rename function
anfibiacreativa cf3e9a7
http: rename function invocation
anfibiacreativa 5ca86a1
http: fix typo in name function
anfibiacreativa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const assert = require('assert'); | ||
const { | ||
WebSocket: NodeHttpWebSocket, | ||
CloseEvent: NodeHttpCloseEvent, | ||
MessageEvent: NodeHttpMessageEvent | ||
} = require('node:http'); | ||
|
||
// Compare with global objects | ||
assert.strictEqual(NodeHttpWebSocket, WebSocket); | ||
assert.strictEqual(NodeHttpCloseEvent, CloseEvent); | ||
assert.strictEqual(NodeHttpMessageEvent, MessageEvent); | ||
anfibiacreativa marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.