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: improve dependencies handling of @libp2p in pnpm #2200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

weboko
Copy link
Collaborator

@weboko weboko commented Jan 10, 2025

Problem

pnpm gets confused with peerDependencies js-waku has and misses @libp2p/bootstrap package.

Solution

This PR removes peerDependencies as they are making pnpm misbehave with how it resolves dependencies.
There is no problem with pnpm as I see, it's more of a problem with peerDeps getting out of sync with other deps while libp2p goes through upgrade.

Notes

@waku/sdk is published under 0.0.30-1c0c5ee.0 version with this fix.

As for peerDependencies - removing them to prevent any confusion. Let's add them back once requested by consumers.

Copy link

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 86.63 KB (0%) 1.8 s (0%) 11.7 s (+12.65% 🔺) 13.4 s
Waku Simple Light Node 136.82 KB (0%) 2.8 s (0%) 8.3 s (-44.3% 🔽) 11 s
ECIES encryption 22.88 KB (0%) 458 ms (0%) 4.2 s (+27.29% 🔺) 4.7 s
Symmetric encryption 22.37 KB (0%) 448 ms (0%) 3.4 s (-14.04% 🔽) 3.9 s
DNS discovery 70.54 KB (0%) 1.5 s (0%) 7.4 s (-24.85% 🔽) 8.8 s
Peer Exchange discovery 71.82 KB (0%) 1.5 s (0%) 6.9 s (-21.01% 🔽) 8.3 s
Local Peer Cache Discovery 65.17 KB (0%) 1.4 s (0%) 6.2 s (-13.07% 🔽) 7.5 s
Privacy preserving protocols 76.16 KB (0%) 1.6 s (0%) 6 s (-30.09% 🔽) 7.5 s
Waku Filter 80.98 KB (0%) 1.7 s (0%) 8.8 s (-11.93% 🔽) 10.4 s
Waku LightPush 75.72 KB (0%) 1.6 s (0%) 7.9 s (-13.49% 🔽) 9.4 s
History retrieval protocols 77.63 KB (0%) 1.6 s (0%) 6.9 s (-26.5% 🔽) 8.4 s
Deterministic Message Hashing 7.39 KB (0%) 148 ms (0%) 1.6 s (+20.44% 🔺) 1.7 s

@weboko weboko changed the title fix: improve dependencies to @libp2p fix: improve dependencies handling of @libp2p in pnpm Jan 10, 2025
@weboko weboko marked this pull request as ready for review January 10, 2025 10:41
@weboko weboko requested a review from a team as a code owner January 10, 2025 10:41
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.

bug: @libp2p/bootstrap and @libp2p/interface peer dependencies not correctly added
1 participant