-
-
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: return entries instead of values in toJSON method #9345
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@Shiva953 is attempting to deploy a commit to the discordjs Team on Vercel. A member of the Team first needs to authorize it. |
Well it's a braking change, so you should mention about it |
Can you please Elaborate on what I should mention? |
The status classification |
Done👍 |
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.
Makes sense, but yes, very breaking
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.
Tests needs updating
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://discord-js-guide-git-fork-shiva953-feature-discordjs.vercel.app/guide/home/introduction |
Codecov Report
@@ Coverage Diff @@
## main #9345 +/- ##
=======================================
Coverage 60.14% 60.14%
=======================================
Files 234 234
Lines 16241 16241
Branches 1234 1234
=======================================
Hits 9768 9768
Misses 6429 6429
Partials 44 44
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Signed-off-by: RedGuy12 <paul@reid-family.org>
Please describe the changes this PR makes and why it should be merged:
This PR modifies the toJSON method in the collection package to return entries instead of just values. Currently, the toJSON method only returns values from the collection, which makes it impossible to create a new collection from the JSON output.
To fix this issue, this PR modifies the toJSON method to return entries instead of just values. This will preserve the keys and allow the creation of a new collection/map from the returned data. (FIXES #9310 ).
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)
- (Status Classification) This PR includes breaking changes (method(s) removed or renamed, parameters moved or removed)
Please review this PR and let me know if any changes are required.