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

breaking(plugin): stop adding the decorators option into Babel plugin #135

Merged

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Mar 28, 2019

In the most recent versions of ember-cli-babel we started including
the legacy decorators transform by default. When used with this plugin,
this causes breakage, because both plugins are adding conflicting
internal babel plugins.

In general, this is problematic, because the filter-imports plugin is
making assumptions about which version of decorators will be used. It
would instead make more sense to allow the user to choose which version
they want by adding and configuring the
@babel/plugin-proposal-decorators package themselves.

This PR removes the plugin, and adds the proposal package for local
testing. Users of the package should already be required to add the
decorators transform if they are filtering decorators, so this shouldn't
be an issue in general, but this is technically breaking so I think it
would make sense to bump a major version.

In the most recent versions of `ember-cli-babel` we started including
the legacy decorators transform by default. When used with this plugin,
this causes breakage, because both plugins are adding _conflicting_
internal babel plugins.

In general, this is problematic, because the `filter-imports` plugin is
making assumptions about which version of decorators will be used. It
would instead make more sense to allow the user to choose which version
they want by adding and configuring the
`@babel/plugin-proposal-decorators` package themselves.

This PR removes the plugin, and adds the proposal package for local
testing. Users of the package _should_ already be required to add the
decorators transform if they are filtering decorators, so this shouldn't
be an issue in general, but this is _technically_ breaking so I think it
would make sense to bump a major version.
@rwjblue
Copy link
Member

rwjblue commented Apr 9, 2019

@pzuraq - Looks like this needs a rebase...

@layershifter layershifter changed the title [BUGFIX][BREAKING] Stop adding the decorators Babel plugin breaking(plugin): stop adding the decorators option into Babel plugin Apr 12, 2019
@layershifter
Copy link
Collaborator

❤️ ❤️ ❤️

@layershifter layershifter merged commit f0bc062 into ember-cli:master Apr 12, 2019
@layershifter
Copy link
Collaborator

Was released in [email protected] 🎉

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