Skip to content

fix(engine.io-client): preserve caller transport options#5501

Open
puneetdixit200 wants to merge 1 commit into
socketio:mainfrom
puneetdixit200:fix/5462-preserve-transports-option
Open

fix(engine.io-client): preserve caller transport options#5501
puneetdixit200 wants to merge 1 commit into
socketio:mainfrom
puneetdixit200:fix/5462-preserve-transports-option

Conversation

@puneetdixit200
Copy link
Copy Markdown

Summary

  • clone Socket constructor options before mapping transport names to constructors
  • pass the cloned options through the options-only overload as well
  • add a regression test for both URI and options-only construction

Fixes #5462

Tests

  • npm run compile --workspace=engine.io-parser
  • npm run compile --workspace=engine.io
  • npm run compile --workspace=engine.io-client
  • npm run format:check --workspace=engine.io-client
  • npm run test:node --workspace=engine.io-client -- --grep "caller's transports option"
  • npm run test:node --workspace=engine.io-client -- --grep "Socket"
  • npm run test:node --workspace=engine.io-client
  • git diff --check

@puneetdixit200 puneetdixit200 force-pushed the fix/5462-preserve-transports-option branch from 7b19c51 to 87d7026 Compare May 23, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

socket.io-client - transports options array modified from [string] to [object] by io constructor

1 participant