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

remove websocket experimental warning #3311

Merged
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
9 changes: 0 additions & 9 deletions lib/web/websocket/websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ const { types } = require('node:util')
const { ErrorEvent, CloseEvent } = require('./events')
const { SendQueue } = require('./sender')

let experimentalWarned = false

// https://websockets.spec.whatwg.org/#interface-definition
class WebSocket extends EventTarget {
#events = {
Expand All @@ -56,13 +54,6 @@ class WebSocket extends EventTarget {
const prefix = 'WebSocket constructor'
webidl.argumentLengthCheck(arguments, 1, prefix)

if (!experimentalWarned) {
experimentalWarned = true
process.emitWarning('WebSockets are experimental, expect them to change at any time.', {
code: 'UNDICI-WS'
})
}

const options = webidl.converters['DOMString or sequence<DOMString> or WebSocketInit'](protocols, prefix, 'options')

url = webidl.converters.USVString(url, prefix, 'url')
Expand Down
5 changes: 1 addition & 4 deletions test/node-test/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { tspl } = require('@matteo.collina/tspl')
const removeEscapeColorsRE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g

test('debug#websocket', { skip: !process.versions.icu }, async t => {
const assert = tspl(t, { plan: 8 })
const assert = tspl(t, { plan: 6 })
const child = spawn(
process.execPath,
[join(__dirname, '../fixtures/websocket.js')],
Expand All @@ -22,9 +22,6 @@ test('debug#websocket', { skip: !process.versions.icu }, async t => {
const chunks = []
const assertions = [
/(WEBSOCKET [0-9]+:) (connecting to)/,
// Skip the chunk that comes with the experimental warning
/(\[UNDICI-WS\])/,
/\(Use `node --trace-warnings \.\.\.` to show where the warning was created\)/,
/(WEBSOCKET [0-9]+:) (connected to)/,
/(WEBSOCKET [0-9]+:) (sending request)/,
/(WEBSOCKET [0-9]+:) (connection opened)/,
Expand Down
Loading