discord.js
discord.js copied to clipboard
feat: no-de-no-de, now with extra buns
Please describe the changes this PR makes and why it should be merged:
This PR brings in out-of-the-box support for:
- Deno
- Bun
- Cloudflare Workers
- Vercel Functions
and whatever else floats your boat.
note: Bun is currently blocked with this PR due to https://github.com/oven-sh/bun/issues/3392, but 🤞 they get that fixed
Status and versioning classification:
- Code changes have been tested against the Discord API, or there are no code changes
- This PR changes the library's interface (methods or parameters added)
- This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Codecov Report
Merging #9683 (be02852) into main (75d91b5) will decrease coverage by
0.42%. The diff coverage is49.52%.
@@ Coverage Diff @@
## main #9683 +/- ##
==========================================
- Coverage 58.20% 57.78% -0.42%
==========================================
Files 227 232 +5
Lines 14902 15062 +160
Branches 1131 1135 +4
==========================================
+ Hits 8673 8703 +30
- Misses 6189 6319 +130
Partials 40 40
| Flag | Coverage Δ | |
|---|---|---|
| builders | 98.69% <ø> (ø) |
|
| proxy | 76.31% <ø> (ø) |
|
| rest | 92.71% <90.90%> (-0.42%) |
:arrow_down: |
| util | 70.55% <12.50%> (-27.94%) |
:arrow_down: |
| ws | 52.38% <14.28%> (-1.48%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/rest/src/lib/CDN.ts | 96.01% <ø> (-1.76%) |
:arrow_down: |
| packages/rest/src/web.ts | 0.00% <0.00%> (ø) |
|
| packages/util/src/functions/runtime.ts | 8.33% <8.33%> (ø) |
|
| packages/util/src/functions/userAgentAppendix.ts | 13.46% <13.46%> (ø) |
|
| packages/ws/src/ws/WebSocketShard.ts | 18.97% <14.28%> (-0.88%) |
:arrow_down: |
| packages/rest/src/lib/RequestManager.ts | 89.47% <81.81%> (-0.64%) |
:arrow_down: |
| packages/rest/src/environment.ts | 100.00% <100.00%> (ø) |
|
| packages/rest/src/lib/REST.ts | 98.87% <100.00%> (-0.04%) |
:arrow_down: |
| packages/rest/src/lib/errors/HTTPError.ts | 100.00% <100.00%> (ø) |
|
| packages/rest/src/lib/handlers/BurstHandler.ts | 91.03% <100.00%> (-0.07%) |
:arrow_down: |
| ... and 6 more |
... and 2 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
For now, to not block this PR moving forward, /ws will keep using the ws module. Once the bun issue is solved, we'll enable using global ws instead
Yes, yes we should make it static instead, or even a variable outside the class. Good catch On Jul 9, 2023, 20:02 +0300, Aura Román @.***>, wrote:
@kyranet commented on this pull request. In packages/ws/src/ws/WebSocketShard.ts:
@@ -83,6 +83,12 @@ export interface SendRateLimitState { export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> { private connection: WebSocket | null = null;
// TODO(vladfrangu): enable this once https://github.com/oven-sh/bun/issues/3392 is solved// private WebSocketConstructor: typeof WebSocket = shouldUseGlobalFetchAndWebSocket()// ? (globalThis as any).WebSocket// : WebSocket;private WebSocketConstructor: typeof WebSocket = WebSocket;Shouldn't we make this static? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
lgtm, just need the last commit message to have the breaking changes list
I hope the changes will be applied asap :) I really need to use it with supabase.
lgtm, just need the last commit message to have the breaking changes list
I'll just mark as blocked so kodiak doesn't do the auto merge but can't I specify the changelog and breaking entries when merging the PR myself?
You can, but you can also squash the commits with the breaking change list in the commit description.
hm does this also fix the undici issue with windows?
That sounds like something to raise to Undici.
hm does this also fix the undici issue with windows?
It should remedy this as it’ll opt to use the native fetch in deno instead of using undici.request.
What's blocking this from being merged, Bun?
im p sure iCrawl has to approve first
@vladfrangu you might need to merge with main, you're out of date