ember-codemods / ember-module-migrator

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

Migrate pods with undefined podModulePrefix #67

Closed Subtletree closed 6 years ago

Subtletree commented 6 years ago

When no podModulePrefix is specified in environment.js then podModulePrefix is undefined rather than 'pods' or ''.

NullVoxPopuli commented 6 years ago

looks good -- my only concern is that existing tests were modified. why the config additions?

Subtletree commented 6 years ago

Previously when podModulePrefix = '', config files weren't being migrated correctly but there was no tests to catch it.

'config': {
  'foo': {
    'baz.sh': 'yolo'
  }
},

was being transformed into:

{
   config: {
+    baz.sh: "yolo"
     foo: {
-      baz.sh: "yolo"
     }
   }
 }
if (!arePodsNamespaced) {
  ...
  if (type === undefined){
    // was getting modified here
  }
}
NullVoxPopuli commented 6 years ago

oh ok. cool :+1:

rwjblue commented 6 years ago

Thank you!