Repository navigation
Conversation
…rver The ESM wrapper shipped with uWebSockets.js v20.71.0 imports './index.js', which does not exist in the package, so the echo server used by websocket-benchmark.mjs has failed with ERR_MODULE_NOT_FOUND since the bump from v20.70.0 in nodejs#5856. Load the CommonJS entry point through createRequire instead. It resolves to uws.js, which is unchanged across the versions pinned so far. Refs: uNetworking/uWebSockets.js#1356
v20.72.0 ships index.js (CommonJS) and a generated index.mjs that imports it, so `import uws from 'uWebSockets.js'` resolves again and the echo server used by websocket-benchmark.mjs starts. Bump the pin and go back to the plain import; the createRequire workaround for v20.71.0 is no longer needed. Refs: uNetworking/uWebSockets.js#1356
gesposito
marked this pull request as ready for review
November 25, 2026 11:12
uWebSockets.js to v20.72.0
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6247 +/- ##
==========================================
- Coverage 91.77% 91.77% -0.01%
==========================================
Files 113 113
Lines 44875 44880 +5
==========================================
+ Hits 41186 41190 +4
- Misses 3689 3690 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This relates to...
Rationale
benchmarks/websocket-echo-server.mjscannot start onmain:In v20.71.0 the package's
ESM_wrapper.mjsimports./index.js, which is not in the package, soimport uws from 'uWebSockets.js'throws. Without the echo server,benchmarks/websocket-benchmark.mjshas nothing to connect to. The WebSocket benchmark is not run in CI, so the bump did not fail anything.uWebSockets.js v20.72.0, released on 2026-11-24, fixes this. The package now ships
index.jsas its CommonJS entry point and a generatedindex.mjsthat imports it.Changes
Bump the uWebSockets.js pin in
benchmarks/package.jsonfrom v20.71.0 to v20.72.0.The first commit on this branch worked around v20.71.0 by loading the package through
createRequire. The second commit reverts that, so the net change is the pin alone.Features
N/A
Bug Fixes
websocket-benchmark.mjsstarts again.Breaking Changes and Deprecations
N/A
Status
Tested on Node.js 24.22.1 (darwin arm64). With v20.72.0 installed: started
node websocket-echo-server.mjs, then rannode websocket-benchmark.mjsagainst it; it completes and reports results for undici, undici stream and ws. With v20.71.0 the same steps fail with the error above.eslintpasses.