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

Blacklists @ember/string if dependency is present #176

Merged
merged 1 commit into from
Nov 8, 2017
Merged

Blacklists @ember/string if dependency is present #176

merged 1 commit into from
Nov 8, 2017

Conversation

locks
Copy link
Contributor

@locks locks commented Aug 11, 2017

  • Add behaviour
  • Test behaviour

@villander
Copy link
Contributor

@locks what the test? use case

I want help you on this

@rwjblue
Copy link
Member

rwjblue commented Aug 17, 2017

@locks - Looks good, I just released the polyfill with the required changes, can you rebase and update the minimum version?

@locks
Copy link
Contributor Author

locks commented Aug 17, 2017

@villander we need to check that we are actually detecting @ember/string in dependencies and passing the appropriate option to the babel plugin.

@locks locks changed the title Passes option to skip Ember.String processing Blacklists @ember/string if dependency is present Aug 22, 2017
index.js Outdated
@@ -253,14 +253,19 @@ module.exports = {
},

_getEmberModulesAPIPolyfill(config) {
const blacklist = { '@ember/debug': ['assert', 'deprecate', 'warn'] };
Copy link
Member

Choose a reason for hiding this comment

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

Can you extract the logic here into a _getEmberModulesAPIBlacklist() method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed, was that what you had in mind?

Copy link
Member

Choose a reason for hiding this comment

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

Ya, thank you

@locks
Copy link
Contributor Author

locks commented Sep 1, 2017

We are G.T.G.™

index.js Outdated
_emberStringDependencyPresent() {
let checker = new VersionChecker(this.parent).for('@ember/string', 'npm');

return checker.isAbove('0.0.0');
Copy link
Member

Choose a reason for hiding this comment

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

why .isAbove()? I think there is an .exists() now 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Ya, confirm. But only recently IIRC.

If the `@ember/string` package is present in the dependencies it
means that we should not convert the imports for those modules
into globals, because the modules will be provided by the package
itself.
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.

4 participants