cibernox / ember-ast-helpers

Utility belt to level-up your Ember AST transforms
MIT License
40 stars 6 forks source link

Cannot find module '@glimmer/syntax' with 0.4 #21

Open samselikoff opened 6 years ago

samselikoff commented 6 years ago

Latest published seems to be 0.4, but it throws error:

Cannot find module '@glimmer/syntax'

Downgrading to 0.3.5 seemed to get me going.

Should we make 0.4 a pre-release? I couldn't find it in Github.

Let me know if I can help!

cibernox commented 6 years ago

We must make this not rely on any specific version of @glimmer/syntax but use this.syntax from whatever version the app uses

jrjohnson commented 5 years ago

@cibernox how should an addon include @glimmer/syntax? I'm trying to update @fortawesome/ember-font-awesome to 0.4.0, but I get

Template Compiler Error (broccoli-persistent-filter:TemplateCompiler) in dummy/templates/application.hbs

this.syntax.parse is not a function

when running tests. My first guess is that addons don't provide a version of @glimmer/syntax by default, but I'm not sure.

cibernox commented 5 years ago

I need to revisit this, I believe we shouldn't be importing the syntax from anywhere but rather access whatever version is available in the context.

jrjohnson commented 5 years ago

My new idea is to add a dev-dependency on @glimmer/syntax. What I'm not sure about is why this addon doesn't have this already and how I would ensure that apps that consume it do.

jrjohnson commented 5 years ago

Actually looking at some apps @glimmer/syntax doesn't appear with npm ls @glimmer/syntax other that from this package. So I'm not sure this is something that would be available in any context and should probably be provided as a dependency of this library.