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

Remove error throwing for svelte guarded features. #64

Merged
merged 1 commit into from
May 22, 2018

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented May 22, 2018

Adding the error is error prone due to the ability to include arbitrary JS in conditionals, and provides a false sense of security due to the fact that a deprecated feature flag could be used in many locations other than a conditional.

This changes the strategy for svelte features to:

  • always replace the imported deprecated flag with its boolean value
  • never add an arbitrary error
  • always remove feature source import statements that have no specifiers (previously only done in prod builds)

Adding the error is error prone due to the ability to include arbitrary
JS in conditionals, and provides a false sense of security due to the
fact that a deprecated feature flag could be used in many locations
other than a conditional.

This changes the strategy for svelte features to:

* **always** replace the imported deprecated flag with its boolean value
* **never** add an arbitrary error
* **always** remove feature source import statements that have no
  specifiers (previously only done in prod builds)
@rwjblue rwjblue merged commit c2a9d77 into ember-cli:master May 22, 2018
@rwjblue rwjblue deleted the remove-error-throwing-for-svelte branch May 22, 2018 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants