cordova-lib icon indicating copy to clipboard operation
cordova-lib copied to clipboard

fix: platform & plugin prelease package support

Open erisu opened this issue 1 year ago • 1 comments

Platforms affected

n/a

Motivation and Context

  • Support installing plugins to all prerelease identifiers as long as it still satisfies with semver.
  • Improve the warning of installing a prerelease platform for all prerelease identifiers.

Description

  • Use semver to detect if the platform is a prerelease instead of using regular expression against specific tags.
  • Update semver.satisfies to include prerelease version. This allows plugins to install on prerelease platforms as long as the platform's version still satisfies with the minimum version.

Testing

  • cordova platform add
  • cordova plugin add

Checklist

  • [x] I've run the tests to see all new and existing tests pass
  • [x] I added automated test coverage as appropriate for this change
  • [ ] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [ ] I've updated the documentation if necessary

erisu avatar Oct 27 '24 06:10 erisu

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 87.91%. Comparing base (3381125) to head (9e26e62). Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
src/cordova/platform/addHelper.js 33.33% 2 Missing :warning:
src/plugman/install.js 66.66% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #935      +/-   ##
==========================================
- Coverage   87.95%   87.91%   -0.05%     
==========================================
  Files          46       46              
  Lines        2134     2134              
==========================================
- Hits         1877     1876       -1     
- Misses        257      258       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Oct 27 '24 06:10 codecov-commenter