miragejs / ember-cli-mirage

An Ember Addon to easily add Mirage JS to your Ember app.
http://ember-cli-mirage.com
MIT License
863 stars 441 forks source link

Filter out `ShimModelClass` instances when running `discoverEmberDataModels` #2569

Closed gilest closed 6 months ago

gilest commented 9 months ago

Maybe a naive fix, but I was making a fork to try privately anyway 🤷🏻

Believe this will be a blocker to upgrading to v3 for any apps which have non-Model files in their app/models/ tree. This can be caused by addons so it's not always possible to resolve within an app without significant effort.

Fixes #2556

Ref:

gilest commented 7 months ago

@SergeAstapov what are your thoughts on this fix? 🙂

chancancode commented 7 months ago

FWIW, I ran into the same issue and applied the patch locally, and at least in my case, didn't run into issues (e.g. non-ED model brought by addons that happens to have a isModel property)

SergeAstapov commented 6 months ago

Thank you @gilest!

gilest commented 6 months ago

Please cut a release when you get a chance 🥺

zeppelin commented 6 months ago

@SergeAstapov This seems to fix the issue with model discoverability in out apps. Could you please cut a release? 🙏

SergeAstapov commented 6 months ago

sorry for delays, this is published as v3.0.3. Thank you @gilest!