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

[BUGFIX release] Improve class based tranform deprecation message #19555

Merged
merged 1 commit into from
May 26, 2021

Conversation

chancancode
Copy link
Member

@chancancode chancancode commented May 25, 2021

This was quite difficult to track down since it doesn't tell you which plugin is causing the issue. It only reports the name of the template which is not actually relevant.

@@ -102,28 +107,29 @@ function wrapLegacyPluginIfNeeded(_plugin: PluginFunc | LegacyPluginClass): Plug
let pluginInstantiated = false;

return {
name: _plugin.constructor && _plugin.constructor.name,
name: plugin.name,
Copy link
Member Author

@chancancode chancancode May 25, 2021

Choose a reason for hiding this comment

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

Pretty sure this was a bug previously: if plugin is a class, then plugin.constructor would have been Function, so this would always be the string "Function".

Copy link
Member Author

Choose a reason for hiding this comment

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

(Hopefully the name wasn't used to deduplicate plugins!)

@chancancode chancancode force-pushed the class-based-transform-deprecation branch from 42c0b83 to e28a201 Compare May 25, 2021 17:17
@rwjblue rwjblue merged commit 6ac1c6b into master May 26, 2021
@rwjblue rwjblue deleted the class-based-transform-deprecation branch May 26, 2021 13: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.

3 participants