Skip to content

Support for in-repo-addon files in app/ (not addon/)? #19

@raycohen

Description

@raycohen

I have a large ember app with several in-repo-addons that use the app/components/ folder for component implementation files, rather than having the implemenetation in addon/components/ and the re-export in app/components

When I run the ember-native-class-codemod against our in-repo app, I get errors like

 ERR lib/restaurants/app/components/second-component.js Transformation error (Cannot read property 'replace' of undefined)
TypeError: Cannot read property 'replace' of undefined
    at replace (/Users/rcohen/code/spikes/ember-lib/fake-dashboard/node_modules/ember-codemods-telemetry-helpers/lib/utils/telemetry.js:46:30)
    at _generateModuleKey (/Users/rcohen/code/spikes/ember-lib/fake-dashboard/node_modules/ember-codemods-telemetry-helpers/lib/utils/telemetry.js:39:19)
  ...

that appear to be because the logic in getModulePathFor only supports converting files in the addon folder.

Would a PR be welcome that handles getting the module path for files in in-repo-addons app folders?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions