-
Notifications
You must be signed in to change notification settings - Fork 39
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
Unable to detect V2 Addons #381
Comments
Hey @wagenet! Thank you for issue, sorry for delayed response. |
implemented named slots context autocomplete my-component ```hbs {{yield (hash Foo=(component "Bar")) to="body"}} ``` component-usage ```hbs <MyComponent> <:body as |k|> <k - {k.Foo autocomplete} > </body> </MyComponent> ```
# [2.23.0](lifeart/ember-language-server@v2.22.0...v2.23.0) (2022-04-21) ### Features * named slots context autocomplete ([#381](lifeart#381)) ([ab8b888](lifeart@ab8b888))
I think this issue was accidentally closed, by some commit that referenced it wrongly. Seems the repo migration messed up some things here, see home the commit @lifeart can we re-open this please? Could you also shed some light into the current status. Like this test seems to suggest v2 addons are supported, but I am still seeing expected ELS features to not work inside a v2 addon (template-lint integration for example). |
Is it this line that ties it into ember-cli-build.js? If this is about identifying which packages are Ember apps or addons (v1 or v2), I think the detection would need to be like this: const isEmberAddon = packageJson.keywords?.includes('ember-addon');
const isEmberApp = 'ember' in packageJson && !isEmberAddon;
const addonVersion = Number(packageJson['ember-addon']?.version ?? 1);
const isEmberV1Addon = isEmberAddon && addonVersion === 1;
const isEmberV2Addon = isEmberAddon && addonVersion === 2; |
Hi @simonihmig! Thank you for re-visiting it!
To detect addon version we use this code:
|
I don't really have any understanding of the codebase tbh, but isn't this part basically saying that we add a package if it has a package.json and is a GlimmerX project, or if it has I have just tried ELS with https://github.com/CrowdStrike/ember-headless-form, but I think any other v2 addon codbease would work as well. I am adding a
|
This is because it looks for the presence of ember-cli-build.js, which is not present in V2 Addons. I'd like ELS so I at least get template linting support in VSCode.
The text was updated successfully, but these errors were encountered: