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

Conversation

Projects
None yet
4 participants
@locks
Copy link
Contributor

locks commented Aug 11, 2017

  • Add behaviour
  • Test behaviour

@locks locks force-pushed the locks:ember-string-skip branch from 107a235 to aaa7b97 Aug 16, 2017

@villander

This comment has been minimized.

Copy link
Contributor

villander commented Aug 17, 2017

@locks what the test? use case

I want help you on this

@rwjblue

This comment has been minimized.

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 locks force-pushed the locks:ember-string-skip branch from aaa7b97 to 92af5a7 Aug 17, 2017

@locks

This comment has been minimized.

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 force-pushed the locks:ember-string-skip branch from 92af5a7 to 9706afd Aug 22, 2017

@locks locks changed the title Passes option to skip Ember.String processing Blacklists `@ember/string` if dependency is present Aug 22, 2017

@locks locks force-pushed the locks:ember-string-skip branch from 9706afd to a48b58c Aug 22, 2017

index.js Outdated
@@ -253,14 +253,19 @@ module.exports = {
},

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

This comment has been minimized.

@rwjblue

rwjblue Aug 29, 2017

Member

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

This comment has been minimized.

@locks

locks Aug 29, 2017

Author Contributor

Addressed, was that what you had in mind?

This comment has been minimized.

@rwjblue

rwjblue Aug 29, 2017

Member

Ya, thank you

@locks locks force-pushed the locks:ember-string-skip branch 3 times, most recently from 299dcb3 to 0b7db5b Aug 30, 2017

@locks

This comment has been minimized.

Copy link
Contributor Author

locks commented Sep 1, 2017

We are G.T.G.™

@locks locks referenced this pull request Sep 1, 2017

Closed

v1.0.0 #2

3 of 3 tasks complete

@locks locks force-pushed the locks:ember-string-skip branch 3 times, most recently from a139106 to 9aa47fb Sep 1, 2017

@locks locks referenced this pull request Sep 2, 2017

Open

[RFC 236] Ember.String Deprecation for @ember/string #15624

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

return checker.isAbove('0.0.0');

This comment has been minimized.

@Turbo87

Turbo87 Nov 8, 2017

Contributor

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

This comment has been minimized.

@rwjblue

rwjblue Nov 8, 2017

Member

Ya, confirm. But only recently IIRC.

Blacklists `@ember/string` modules if package is present
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.

@locks locks force-pushed the locks:ember-string-skip branch from 9aa47fb to fde084c Nov 8, 2017

@rwjblue

rwjblue approved these changes Nov 8, 2017

@rwjblue rwjblue merged commit f579f1b into babel:master Nov 8, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@locks locks deleted the locks:ember-string-skip branch Nov 8, 2017

@rwjblue rwjblue added the enhancement label Nov 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment