rokucommunity / ropm

A package manager for the Roku platform.
MIT License
31 stars 5 forks source link

fix!: Avoiding version postfix if there is only one version of module installed #46

Closed pawelhertman closed 2 years ago

pawelhertman commented 3 years ago

Without this change even if there is just one major version of a module in the dependency list, it will be locally (ROPM module name) postfixed (like _v1). However the list set as ModuleManager.noprefixRopmAliases doesn't contain such postfixes therefore the "noprefix" option works only for modules that were aliased (because they can be matched in RopmModule.createEdits due to no version postfix).

The question is what should be the behaviour when an NPM module is set as "noprefix" but there are its two major versions in use. I would say an error should be thrown. Anyway, it wasn't handled so far so I ignored it.

pawelhertman commented 2 years ago

I just understood why keeping postfix is required - in the end code (frontend app) you have to know how to call a specific function after it's prefixed. So the issue with unworking noprefix still remains. I will come back to this topic once I'm back from holiday.

TwitchBronBron commented 2 years ago

@pawelhertman do you have any ideas what could be causing the noprefix issue? Are you working to find a fix still or have you moved on to other things?

pawelhertman commented 2 years ago

@TwitchBronBron it is because the code is trying to find a name of the package provided in noprefix config while the list to search contains versioned names of packages. Sorry for no more code updates but in our project we decided to drop ROPM usage because there were too many features missing