[DAEMON-122] appcd-plugin: Prerelease versions are not loaded by version ranges
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2017-11-09T18:15:44.000+0000 |
Affected Version/s | Appc Daemon 1.0.0 |
Fix Version/s | Appc Daemon 1.0.0 |
Components | appcd-plugin |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Chris Barber |
Created | 2017-11-07T13:37:10.000+0000 |
Updated | 2017-11-09T18:15:45.000+0000 |
Description
Description
*This is expected imo but filing for discussion* If I version my plugin as0.1.0-0
then executing appcd exec /myplugin/0.1.X/
or appcd exec /myplugin/^0.1.0/
will not find my plugin. Executing {appcd exec /myplugin/^0.1.0-0/}} will. This is because semver will never view a prerelease as valid in a non-prerelease version range.
/latest will work, and will load the prerelease version
$node
> const semver = require('semver');
> const versions =['1.0.0', '1.1.0-0', '1.1.0-1'];
> versions.sort(semver.rcompare);
[ '1.1.0-1', '1.1.0-0', '1.0.0' ]
This is important as it makes how we version things problematic. If we do prereleases then if consumers decide to call with 0.1.X or similar, then they will never get prereleases plugins, and we don't want them calling latest as that will just lead to problems
Comments
No comments