Skip to content

fix(mcp): guard toWellFormed() for Node 18 compatibility#39674

Merged
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:fix-towellformed-node18
Mar 14, 2026
Merged

fix(mcp): guard toWellFormed() for Node 18 compatibility#39674
pavelfeldman merged 1 commit intomicrosoft:mainfrom
pavelfeldman:fix-towellformed-node18

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

Summary

  • String.prototype.toWellFormed() is only available in Node 20+. Guard the call in sanitizeUnicode so it's a no-op on Node 18 instead of crashing.

Follows the same pattern already used in driver.ts.

String.prototype.toWellFormed() is only available in Node 20+.
Make sanitizeUnicode a no-op on Node 18 instead of crashing.
@pavelfeldman pavelfeldman merged commit 47caab2 into microsoft:main Mar 14, 2026
10 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

5327 passed, 172 skipped


Merge workflow run.

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.

2 participants