Skip to content

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

Merged
darrachequesne merged 1 commit into
socketio:mainfrom
puneetdixit200:fix/5462-preserve-transports-option
May 29, 2026
Merged

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

Conversation

@puneetdixit200
Copy link
Copy Markdown
Contributor

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
@darrachequesne darrachequesne merged commit a3961e0 into socketio:main May 29, 2026
2 of 3 checks passed
@darrachequesne
Copy link
Copy Markdown
Member

Great, thanks 👍

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

2 participants