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

Add option to handle use of features marked for deprecation as errors #2950

Merged
merged 5 commits into from Jun 21, 2019

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
Resolves #2945

Description

Previously the procedure when deprecating a feature in Rollup was this

  • Mark it as deprecated in the types
  • In the next major version, add a warning that the feature is deprecated
  • In the major version after that, remove the feature

The problem with this approach is that there is no way for e.g. plugin developers to get a notification about upcoming deprecated features before the next major version is released. Also, deprecation warnings are easily overlooked.

To that end, a new option strictDeprecations is added. When this flag is set to true

  • using a deprecated feature will throw an error
  • upcoming deprecated features that do not show a warning yet will also throw errors when used

My recommendation is for plugin authors to use this flag e.g. as part of their CI workflow.

@lukastaegert lukastaegert force-pushed the gh-2945-improve-deprecation-procedure branch from 549fee1 to b2ccffd Compare June 21, 2019 17:09
@lukastaegert lukastaegert merged commit 1739459 into master Jun 21, 2019
@lukastaegert lukastaegert deleted the gh-2945-improve-deprecation-procedure branch June 21, 2019 17:22
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.

Proposal: Improve feature deprecation procedure
1 participant