|
For server version comparisons (e.g. all 3.4-only features) we should use a library that can handle version numbers correctly, e.g. the "semver" package.
Otherwise, we might run into issues with release candidates or other unusual version strings.
Simple string comparison fails in these cases:
> '3.4.0' > '3.4.0-rc3'
|
false
|
But semver can handle this correctly:
> semver.gt('3.4.0', '3.4.0-rc3')
|
true
|
One place where this happens:
https://github.com/10gen/compass/blob/d244de57b322ae4b3142c13220dec5191fafe0b9/src/internal-packages/crud/lib/component/editable-value.jsx#L73
Need to find all other places where we use simple string comparisons for versions.
|