-
-
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
refactor(REST): remove double classing #9722
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
suneettipirneni
suggested changes
Jul 17, 2023
vladfrangu
requested changes
Jul 17, 2023
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`
Codecov Report
@@ Coverage Diff @@
## main #9722 +/- ##
==========================================
- Coverage 57.66% 57.51% -0.16%
==========================================
Files 232 232
Lines 15093 15030 -63
Branches 1135 1126 -9
==========================================
- Hits 8703 8644 -59
+ Misses 6350 6346 -4
Partials 40 40
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
suneettipirneni
approved these changes
Jul 24, 2023
vladfrangu
approved these changes
Jul 24, 2023
sdanialraza
approved these changes
Jul 24, 2023
Jiralite
approved these changes
Jul 25, 2023
didinele
approved these changes
Jul 25, 2023
Vylpes
pushed a commit
to Vylpes/vylbot-app
that referenced
this pull request
Aug 7, 2023
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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please describe the changes this PR makes and why it should be merged:
We weren't exactly sure why this existed, it added extra complexity for no real reason. The diff is a little unfortunate, sorry.
In order to help a little bit with this and my own sanity when doing this, all types were moved to a types util file.
BREAKING CHANGE:
REST
andRequestManager
have been combined, most of the properties, methods, and events from both classes can now be found onREST
BREAKING CHANGE:
REST#raw
has been removed in favor ofREST#queueRequest
BREAKING CHANGE:
REST#getAgent
has been removed in favor ofREST#agent
This also fixes some issues that popped up in node 16 due to globals not being present.
Status and versioning classification: