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

Proposal: Improve feature deprecation procedure #2945

Closed
lukastaegert opened this issue Jun 16, 2019 · 0 comments · Fixed by #2950
Closed

Proposal: Improve feature deprecation procedure #2945

lukastaegert opened this issue Jun 16, 2019 · 0 comments · Fixed by #2950

Comments

@lukastaegert
Copy link
Member

Expected Behavior / Situation

At the moment, deprecating a feature works the following way:

  • TS types are updated immediately
  • In the next major (I know we only had one so far, this is how I currently intend to do it), using the feature will produce a warning, ideally with a hint what to do instead
  • In the major after that, the feature is removed

Actual Behavior / Situation

Other than watching for type changes, there is little that aspiring (plugin) developers can do to get notified of upcoming deprecations. And even once a feature has been deprecated, warnings are easily overlooked.

Modification Proposal

I propose to add a new option strictDeprecations that will

  • throw errors instead of warnings for deprecations
  • throw also for upcoming deprecations

The intention is for (plugin) developers to use it e.g. in their CI to get early feedback about upcoming changes. This flag could also be used internally by Rollup to keep tests up to date and explicitly mark tests for deprecated features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant