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

Additional Dependency Warning #19

Merged
merged 1 commit into from
Jun 25, 2018
Merged

Conversation

jherdman
Copy link
Contributor

An extremely lazy solution to #18.

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

Can you also add a check/guard to issue a warning when the parent is using the older version?

Something like the following in index.js:

init() {
  this._super.init && this._super.init.apply(this, arguments);

  let checker = new VersionChecker(this.project);
  let emberVersion = checker.forEmber();

  this.shouldPolyfill = emberVersion.lt('3.4.0-alpha.1');

  let parentChecker = new VersionChecker(this.parent);
  let precompileVersion = checker.for('ember-cli-htmlbars-inline-precompile');

  if (precompileVersion.exists() && precompileVersion.lt('1.0.3')) {
    this.ui.writeWarnLine('Detected a version of ember-cli-htmlbars-inline-precompile that does not support angle bracket invocation, please update to at least 1.0.3.');
  }
}

What do you think?

@jherdman
Copy link
Contributor Author

I think that sounds great! I tried out your suggested change (which, by the way, is something I didn't know that we could do and is totally awesome) in my app and it worked as expected.

@jherdman
Copy link
Contributor Author

Yay! Finally green!

@jherdman
Copy link
Contributor Author

@rwjblue figured I'd poke you on this. Thoughts on merging?

@rwjblue
Copy link
Member

rwjblue commented Jun 25, 2018

Thank you! I must have missed your update after my comment, sorry about that!

@rwjblue rwjblue merged commit 1858507 into ember-polyfills:master Jun 25, 2018
@rwjblue rwjblue added the enhancement New feature or request label Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants