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

fix: use case converter for json component serialization #7464

Merged

Conversation

suneettipirneni
Copy link
Member

@suneettipirneni suneettipirneni commented Feb 14, 2022

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

Fixes a bug where components that were converted snake case would have their properties overwritten with undefined when spreading.

Note: this library has been tested against strings like URL and it serializes it into snake case properly.

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

@suneettipirneni suneettipirneni changed the title fix: use case-converter for json component serialization fix: use case converter for json component serialization Feb 14, 2022
packages/discord.js/src/util/Components.js Outdated Show resolved Hide resolved
packages/discord.js/typings/index.d.ts Outdated Show resolved Hide resolved
packages/discord.js/src/util/Transformers.js Outdated Show resolved Hide resolved
@monbrey monbrey mentioned this pull request Feb 15, 2022
@kyranet kyranet linked an issue Feb 15, 2022 that may be closed by this pull request
Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking fine as-is, but maybe we want to use a built-in for that (see comment) instead.

packages/discord.js/src/util/Transformers.js Outdated Show resolved Hide resolved
@iCrawl iCrawl merged commit 2d45544 into discordjs:main Feb 16, 2022
@suneettipirneni suneettipirneni deleted the fix/json-component-serialization branch July 6, 2022 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Footer not showing
6 participants