Skip to content

feat(preconditions): export all core preconditions #322

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

Merged
merged 2 commits into from
Nov 13, 2021
Merged

feat(preconditions): export all core preconditions #322

merged 2 commits into from
Nov 13, 2021

Conversation

Lioness100
Copy link
Contributor

This PR will allow extensions of core preconditions via CorePreconditions.*. See also #320.
The code changes themselves are self-explanatory. One change that will affect users is that ClientPermissionsCorePrecondition will now be accessible via CorePreconditions.ClientPermissions.

export type { CooldownContext } from './preconditions/Cooldown';
export { CorePrecondition as ClientPermissionsCorePrecondition } from './preconditions/ClientPermissions';
Copy link
Member

Choose a reason for hiding this comment

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

Restore this please, because otherwise this would be a breaking change.

Then add above the exports line:

/**
 * @deprecated. Please use `CorePreconditions.ClientPermissions`. `ClientPermissionsCorePrecondition` will be removed in v3.0.0
 */

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was thinking about doing that but didn't know what constituted as a breaking change. This would be an incredibly silly thing to bump to v3 over LMAO. 👍

Copy link
Member

Choose a reason for hiding this comment

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

Basically anything that well.. could break someones code.. is a breaking change. If someone is using this import, they updated to the latest minor version (that till will be) either by choice or through caret semver and then run their bot it shouldn't crash because it can't find an import. That would happen when removing this, ergo it's a breaking change.

@favna favna changed the title fix(preconditions): export all core preconditions feat(preconditions): export all core preconditions Nov 13, 2021
@favna favna merged commit 5a4898f into sapphiredev:main Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants