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

refactor: fully integrate /ws into mainlib #10420

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Qjuh
Copy link
Contributor

@Qjuh Qjuh commented Jul 31, 2024

Please describe the changes this PR makes and why it should be merged:

BREAKING CHANGE: This removes the compatibility layer of WebSocketManager to integrate @discordjs/ws fully into mainlib discord.js without wrapping it.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

Copy link

vercel bot commented Jul 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 2:32pm
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 2:32pm

packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/sharding/ShardClientUtil.js Outdated Show resolved Hide resolved
packages/discord.js/src/sharding/ShardClientUtil.js Outdated Show resolved Hide resolved
packages/discord.js/src/structures/ClientPresence.js Outdated Show resolved Hide resolved
packages/discord.js/src/structures/ClientPresence.js Outdated Show resolved Hide resolved
packages/discord.js/src/structures/Guild.js Show resolved Hide resolved
@didinele
Copy link
Member

@Qjuh You should also search for "deprecate" in the codebase and remove what is related to WS. I've been working on removing stuff from other parts of the codebase, but it's probably best if stuff like https://github.com/discordjs/discord.js/blob/5eabec14d45ef7bdd7f610e84234eb63e726eacd/packages/discord.js/src/errors/ErrorCodes.js was addressed by this PR.

@didinele
Copy link
Member

For future ref, this should be merged after #10421 - probably cleaner that way.

@Qjuh Qjuh force-pushed the refactor/remove-ws-layer branch from 53ecdaa to e28aee4 Compare July 31, 2024 12:20
@Qjuh Qjuh marked this pull request as ready for review July 31, 2024 14:28
@Qjuh Qjuh requested a review from a team as a code owner July 31, 2024 14:28
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.48%. Comparing base (cda8d88) to head (7ca7247).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10420   +/-   ##
=======================================
  Coverage   35.48%   35.48%           
=======================================
  Files         228      228           
  Lines       14308    14308           
  Branches     1254     1254           
=======================================
  Hits         5077     5077           
  Misses       9187     9187           
  Partials       44       44           
Flag Coverage Δ
guide 0.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Qjuh Qjuh requested a review from didinele August 1, 2024 13:45
@Qjuh Qjuh requested a review from TAEMBO August 2, 2024 07:03
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Outdated Show resolved Hide resolved
packages/discord.js/src/client/Client.js Show resolved Hide resolved
packages/discord.js/src/util/Events.js Show resolved Hide resolved
@vladfrangu
Copy link
Member

This needs a rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review in Progress
Development

Successfully merging this pull request may close these issues.

6 participants