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

Migrate away from old style shims #79

Closed
webark opened this issue Jun 28, 2017 · 10 comments
Closed

Migrate away from old style shims #79

webark opened this issue Jun 28, 2017 · 10 comments

Comments

@webark
Copy link
Contributor

webark commented Jun 28, 2017

I recently upgraded to the ember shims beta that uses the new module import syntax, and was getting deprication errors due to the use of things like import Component from 'ember-component';

I suggest that we switch to using the default global Ember import, and then we could possibly do the constant destructuring. What are you're thoughts @knownasilya @rwwagner90 ?

@webark
Copy link
Contributor Author

webark commented Jun 28, 2017

wanted to get feed back before issuing a PR.

@knownasilya
Copy link
Owner

I'm for that. In general I use the defaults.

webark added a commit to webark/ember-toggle that referenced this issue Jun 28, 2017
…nd reverting to the standard syntax with destructuing. Closes knownasilya#79
@RobbieTheWagner
Copy link
Collaborator

@webark I'd really prefer to keep using shims. We should switch them out for the new ones when they drop.

@webark
Copy link
Contributor Author

webark commented Jun 28, 2017

hmm.. ok. This is just the only addon in my project that is using them and throwing the deprecation warning.

@RobbieTheWagner
Copy link
Collaborator

I just don't think we should migrate backwards away from shims, when the point of migrating to shims was to be ready for module unification.

@webark
Copy link
Contributor Author

webark commented Jun 28, 2017

ya. the only issue with switching them to the new ones when they land, which is looks like it will be in beta for 2.15, is that, and just quoting the meeting notes,

i think the short answer is that addons don't use the shims. Someone should make an addon babel plugin to convert to the globals API. Addons can't guarantee the version of shims it will be used with.

which makes sense if I'm reading it right. https://github.com/emberjs/core-notes/blob/master/ember-cli/2017-06/june-15.md

@webark
Copy link
Contributor Author

webark commented Jun 29, 2017

though longterm it looks like, at least ones the moudle api lands, then will want addon devs to be using the new shims/module syntax https://github.com/emberjs/rfcs/blob/master/text/0176-javascript-module-api.md#addons

@RobbieTheWagner
Copy link
Collaborator

@webark we definitely want to use the modules when they drop. I'm okay with temporarily moving back I suppose, but we'll need to move back to modules again soon.

@knownasilya
Copy link
Owner

https://github.com/netguru/eslint-plugin-ember/blob/master/docs/rules/no-old-shims.md looks like that rule can be used with eslint --fix. @webark have time to take a stab?

@webark
Copy link
Contributor Author

webark commented Jul 12, 2017

ya, i can look into that today.

webark added a commit to webark/ember-toggle that referenced this issue Jul 12, 2017
…-babel 6.6 rather then a beta version of the shims

Closes knownasilya#79
webark added a commit to webark/ember-toggle that referenced this issue Jul 12, 2017
…-babel 6.6 rather then a beta version of the shims

Closes knownasilya#79
webark added a commit to webark/ember-toggle that referenced this issue Jul 12, 2017
…-babel 6.6 rather then a beta version of the shims

Closes knownasilya#79
knownasilya pushed a commit that referenced this issue Jul 13, 2017
…-babel 6.6 rather then a beta version of the shims (#81)

Closes #79
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 a pull request may close this issue.

3 participants