Titanium JIRA Archive
Appcelerator Daemon (DAEMON)

[DAEMON-122] appcd-plugin: Prerelease versions are not loaded by version ranges

GitHub Issuen/a
TypeBug
PriorityCritical
StatusResolved
ResolutionFixed
Resolution Date2017-11-09T18:15:44.000+0000
Affected Version/sAppc Daemon 1.0.0
Fix Version/sAppc Daemon 1.0.0
Componentsappcd-plugin
Labelsn/a
ReporterEwan Harris
AssigneeChris Barber
Created2017-11-07T13:37:10.000+0000
Updated2017-11-09T18:15:45.000+0000

Description

Description

*This is expected imo but filing for discussion* If I version my plugin as 0.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

JSON Source