ember-render-modifiers
ember-render-modifiers copied to clipboard
Move to addon v2
~~This addon is already in ember-auto-import v2 so it should not be a breaking change.~~
:warning: This is breaking change
Yes this addon is already ember-auto-import v2 but ember app must be [email protected] minimum to fix the @glimmer/validator issue (cf https://github.com/emberjs/ember-render-modifiers/pull/66#issuecomment-1277354436)
This is based on addon v2 with yarn monorepo setup. It follows
- https://github.com/embroider-build/addon-blueprint
- https://github.com/embroider-build/embroider/blob/main/PORTING-ADDONS-TO-V2.md
I'm stuck with this PR.
There is an issue with @glimmer/validator which I'll try to sum up.
Ember embed it's own @glimmer/validator version as devDependencies.
So ember-source as a package doesn't have an explicit dependency on @glimmer/validator.
On the other side, since https://github.com/emberjs/ember-render-modifiers/pull/54, ember-render-modifier is dependent on @glimmer/validator.
In classic (non-embroider) build, @glimmer/validator is somehow resolved as the Ember internal dependency.
Embroider, on the other hand, relies on explicit npm dependency and expects @glimmer/validator to be explicity provided by ember-source.
This result in @glimmer/validator loaded twice (in Ember itself and from the addon)

Here is a list of things I've tried and do not work at the moment:
- Declare
@glimmer/validatoras optional peerDependencies - Use yarn
resolutionsto force only 1 version of@glimmer/validator - Tweak
@embroider/shared-internalsember-standard-modules.tsto addemberVirtualPackages.add('@glimmer/validator')
https://github.com/ef4/ember-auto-import/pull/541 might solve the issue
https://github.com/ef4/ember-auto-import/pull/541 might solve the issue
I confirm this is working. I'm waiting for a new release of ember-auto-import
@ctjhoa minor, I think we don't need packages/ember-render-modifiers/config/environment.js file at all
@SergeAstapov time for re-review?