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

feat: deprecate ActionRow.from() #8504

Merged
merged 3 commits into from Aug 18, 2022

Conversation

Syjalo
Copy link
Contributor

@Syjalo Syjalo commented Aug 16, 2022

Please describe the changes this PR makes and why it should be merged:
This PR adds a depreciation warning for ActionRow.from()

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

@vercel
Copy link

vercel bot commented Aug 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
discord-js ✅ Ready (Inspect) Visit Preview Aug 18, 2022 at 7:04AM (UTC)

Copy link
Member

@Jiralite Jiralite left a comment

Choose a reason for hiding this comment

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

Simply adding this after the class will do the trick:

const { deprecate } = require('node:util');

// ...

ActionRow.from = deprecate(
  ActionRow.from,
  'ActionRow.from() is deprecated. Use ActionRowBuilder.from() instead.',
);

Note the change of the deprecation message to be consistent with the Formatters class.

packages/discord.js/src/structures/ActionRow.js Outdated Show resolved Hide resolved
@Jiralite Jiralite added this to the discord.js v14.3 milestone Aug 16, 2022
@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #8504 (ae01afa) into main (d97cd93) will decrease coverage by 3.08%.
The diff coverage is n/a.

❗ Current head ae01afa differs from pull request most recent head 401fdf8. Consider uploading reports for the commit 401fdf8 to get more accurate results

@@            Coverage Diff             @@
##             main    #8504      +/-   ##
==========================================
- Coverage   89.37%   86.29%   -3.09%     
==========================================
  Files          66       87      +21     
  Lines        7343     8362    +1019     
  Branches      899     1105     +206     
==========================================
+ Hits         6563     7216     +653     
- Misses        776     1103     +327     
- Partials        4       43      +39     
Flag Coverage Δ
builders 100.00% <ø> (ø)
collection 100.00% <ø> (ø)
proxy 73.28% <ø> (ø)
rest 92.53% <ø> (ø)
utilities 100.00% <ø> (ø)
voice 64.08% <ø> (?)
ws 59.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/voice/src/util/Secretbox.ts 33.33% <0.00%> (ø)
packages/voice/src/networking/VoiceUDPSocket.ts 90.47% <0.00%> (ø)
packages/voice/src/audio/AudioPlayer.ts 80.55% <0.00%> (ø)
packages/voice/src/util/entersState.ts 100.00% <0.00%> (ø)
packages/voice/src/audio/AudioPlayerError.ts 0.00% <0.00%> (ø)
...ackages/voice/src/util/generateDependencyReport.ts 0.00% <0.00%> (ø)
packages/voice/src/util/demuxProbe.ts 93.33% <0.00%> (ø)
packages/voice/src/util/util.ts 100.00% <0.00%> (ø)
packages/voice/src/VoiceConnection.ts 81.28% <0.00%> (ø)
packages/voice/src/audio/TransformerGraph.ts 74.60% <0.00%> (ø)
... and 11 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vercel vercel bot temporarily deployed to Preview August 18, 2022 07:04 Inactive
@kodiakhq kodiakhq bot merged commit f9c25dd into discordjs:main Aug 18, 2022
@Syjalo Syjalo deleted the deprecate-ActionRow.from() branch August 18, 2022 09:07
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.

None yet

5 participants