-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat: no-de-no-de, now with extra buns #9683
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
0df7602
to
1cb29b7
Compare
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 oven-sh/bun#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. |
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. |
It should remedy this as it’ll opt to use the native fetch in deno instead of using undici.request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's blocking this from being merged, Bun?
im p sure iCrawl has to approve first |
BREAKING CHANGE: The REST and RequestManager classes now extend AsyncEventEmitter from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility between Node, Deno, Bun, CF Workers, Vercel Functions, etc. BREAKING CHANGE: DefaultUserAgentAppendix has been adapted to support multiple different platforms (previously mentioned Deno, Bun, CF Workers, etc) BREAKING CHANGE: the entry point for `@discordjs/rest` will now differ in non-node-like environments (CF Workers, etc.)
@vladfrangu you might need to merge with main, you're out of date |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@discordjs/rest](https://discord.js.org) ([source](https://github.com/discordjs/discord.js)) | dependencies | major | [`^1.1.0` -> `^2.0.0`](https://renovatebot.com/diffs/npm/@discordjs%2frest/1.7.1/2.0.0) | --- ### Release Notes <details> <summary>discordjs/discord.js</summary> ### [`v2.0.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/rest/CHANGELOG.md#discordjsrest200-httpsgithubcomdiscordjsdiscordjscomparediscordjsrest171discordjsrest200---2023-07-31) [Compare Source](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.1...@discordjs/rest@2.0.0) #### Features - No-de-no-de, now with extra buns ([#​9683](discordjs/discord.js#9683)) ([386f206](discordjs/discord.js@386f206)) - **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility between Node, Deno, Bun, CF Workers, Vercel Functions, etc. - **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple different platforms (previously mentioned Deno, Bun, CF Workers, etc) - **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ in non-node-like environments (CF Workers, etc.) - **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com> - **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com> - **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com> - User avatar decorations ([#​8914](discordjs/discord.js#8914)) ([8d97017](discordjs/discord.js@8d97017)) - Support new username system ([#​9512](discordjs/discord.js#9512)) ([1ab60f9](discordjs/discord.js@1ab60f9)) #### Refactor - **REST:** Remove double classing ([#​9722](discordjs/discord.js#9722)) ([8f4256d](discordjs/discord.js@8f4256d)) - **BREAKING CHANGE:** `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST` - **BREAKING CHANGE:** `REST#raw` has been removed in favor of `REST#queueRequest` - **BREAKING CHANGE:** `REST#getAgent` has been removed in favor of `REST#agent` <!----> - chore: update for /rest changes <!----> - **rest:** Switch api to fetch-like and provide strategies ([#​9416](discordjs/discord.js#9416)) ([cdaa0a3](discordjs/discord.js@cdaa0a3)) - **BREAKING CHANGE:** NodeJS v18+ is required when using node due to the use of global `fetch` - **BREAKING CHANGE:** The raw method of REST now returns a web compatible `Respone` object. - **BREAKING CHANGE:** The `parseResponse` utility method has been updated to operate on a web compatible `Response` object. - **BREAKING CHANGE:** Many underlying internals have changed, some of which were exported. - **BREAKING CHANGE:** `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC43NC4yIiwidXBkYXRlZEluVmVyIjoiMzQuNzQuMiJ9--> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/327 Co-authored-by: Renovate Bot <renovate@vylpes.com> Co-committed-by: Renovate Bot <renovate@vylpes.com>
Please describe the changes this PR makes and why it should be merged:
This PR brings in out-of-the-box support for:
and whatever else floats your boat.
note: Bun is currently blocked with this PR due to oven-sh/bun#3392, but 🤞 they get that fixed
Status and versioning classification: