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

fix: don't include websockets in node bundle #1869

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jan 19, 2023

The WebSockets implementation is included in the bundle for Node.js even though it isn't used, the esbuild bundle analyser explains why it's included:

lib/websocket/websocket.js
This file is included in the bundle because:

Entry point index-fetch.js contains:
require("./lib/fetch");

Required file lib/fetch/index.js contains:
require("../../index");

Required file index.js contains:
require("./lib/websocket/websocket");

So required file lib/websocket/websocket.js is included in the bundle.

Ref #1868 (comment)

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2023

Codecov Report

Base: 90.35% // Head: 90.35% // No change to project coverage 👍

Coverage data is based on head (9f19e48) compared to base (2d2512c).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1869   +/-   ##
=======================================
  Coverage   90.35%   90.35%           
=======================================
  Files          70       70           
  Lines        6042     6042           
=======================================
  Hits         5459     5459           
  Misses        583      583           
Impacted Files Coverage Δ
lib/fetch/index.js 84.83% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@KhafraDev KhafraDev merged commit 22d2f70 into nodejs:main Jan 19, 2023
@merceyz merceyz deleted the merceyz/fix/websockets-node-bundle branch January 19, 2023 23:33
anonrig pushed a commit to anonrig/undici that referenced this pull request Apr 4, 2023
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Jul 21, 2023
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
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.

3 participants