-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Issue Description
When an API project uses a deprecated reactioncommerce plugin, the reaction update command fails. When the CLI checks for version mismatch between the local plugin version and the latest remote plugin versions it compares the version of all local plugins to the remote ones. The problem arises when a project uses a deprecated plugin that's not present in the latest reactioncommerce API. Example of the that is the @reactioncommerce/api-plugin-payments-stripe.
If a the local project uses the @reactioncommerce/api-plugin-payments-stripe, when we check for the version of the plugin on the remote project here:
Line 118 in 7ab5268
| outdated: compareVersions.compare(cleanVersion(remoteDependencies[name]), cleanVersion(version), ">") |
We get the following error:
Error: Invalid argument not valid semver ('' received)
This happens because the version of @reactioncommerce/api-plugin-payments-stripe on the remote project resolves to an empty string.
Instead of failing, the update command should display a warning message that the local project depends on a deprecated official plugin.
Steps to Reproduce
- Create a local project that uses the
@reactioncommerce/api-plugin-payments-stripeplugin - Run the
reaction updatecommand for this project - The command fails with the error message mentioned previously in the issue