Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support transforming addons where package.name != addon.moduleName #37

Open
hmajoros opened this issue Feb 24, 2021 · 0 comments · May be fixed by #38
Open

support transforming addons where package.name != addon.moduleName #37

hmajoros opened this issue Feb 24, 2021 · 0 comments · May be fixed by #38

Comments

@hmajoros
Copy link

We have a lot of addons where the name field in the package.json is different than the addon's moduleName (we like to prefix the package.json with @linkedin/, for example). This leads to issues because the codemod's telemetry helpers use package.name and moduleName for setting telemetry data and looking up telemetry data later on

in gatherTelemetry (link), the telemetry object is generated using window.require.entries, which uses the ember-cli moduleName prefix.
in getModulePathFor (link), the lookup of telemetry data is using the package.name from the package.json

After talking with @rwjblue, he suggested that we should try to use moduleName first, and fallback to name if a moduleName does not exist, something like:

addonInstance.moduleName() || addonInstance.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant