Skip to content
New issue

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

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

Already on GitHub? # to your account

update command fails when project uses deprecated official plugin #156

Open
tedraykov opened this issue Oct 24, 2022 · 0 comments · May be fixed by #157
Open

update command fails when project uses deprecated official plugin #156

tedraykov opened this issue Oct 24, 2022 · 0 comments · May be fixed by #157
Labels
bug Something isn't working

Comments

@tedraykov
Copy link
Collaborator

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:

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

  1. Create a local project that uses the @reactioncommerce/api-plugin-payments-stripe plugin
  2. Run the reaction update command for this project
  3. The command fails with the error message mentioned previously in the issue
@tedraykov tedraykov added the bug Something isn't working label Oct 24, 2022
@tedraykov tedraykov linked a pull request Oct 24, 2022 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant