ember-codemods / ember-module-migrator

Automated migration for new Ember application layout.
74 stars 15 forks source link

Fix config import rewriting to only affect the root config #52

Closed andyhot closed 7 years ago

andyhot commented 7 years ago

The previous config related PR had a bug when detecting the config folder. It would rewrite imports to files if they happened to exist in a path that contained /config/

This PR includes a fixture that demonstrates this and the fix.

I don't like how makeAbsolute() in lib/utils/path.js and transformer() in lib/transforms/import-declarations.js have become complex, so I'm planning to address that in a following PR.

Since we released a new version today, i think this fix should be included asap

rwjblue commented 7 years ago

Awesome, thank you!