| 
| bool  | isSemver (const std::string &version) | 
|   | 
| bool  | isDate (const std::string &version) | 
|   | 
| bool  | isCoercibleToSemver (const std::string &version) | 
|   | 
| std::optional< std::string >  | coerceSemver (std::string_view version) | 
|   | Attempt to coerce strings such as "v1.0.2" or 1.0 to valid semantic version strings.  
  | 
|   | 
| bool  | isSemverRange (const std::string &version) | 
|   | Determine if version is a valid semantic version range string.  
  | 
|   | 
| std::pair< int, std::string >  | runSemver (const std::list< std::string > &args) | 
|   | Invokes node-semver by exec.  
  | 
|   | 
| 
static std::string  | cleanRange (const std::string &range) | 
|   | Strip any '*', 'x', or 'X' characters from the range. 
  | 
|   | 
| std::list< std::string >  | semverSat (const std::string &range, const std::list< std::string > &versions) | 
|   | Filter a list of versions by a node-semver semantic version range.  
  | 
|   | 
Interfaces for analyzing version numbers. 
Interfaces for analyzing version numbers 
 
      
        
          | bool versions::isSemverRange  | 
          ( | 
          const std::string &  | 
          version | ) | 
           | 
        
      
 
Determine if version is a valid semantic version range string. 
This is far from a complete check, but it should be sufficient for our usage. This essentially checks that the first token of the string is a valid range, a 4.2.0 - 5.3.1 style range, or a special token. ( See expanded discussion below for futher details ).
Leading and trailing space is ignored.
This will count exact version matches such as 4.2.0 as ranges.
This will count the empty string ( "" ), *, any, and latest as ranges ( aligning with node-semver ).
Limitations: This covers the 99% case to distinguish between a range and "static" version. The main reason to detect this is because from the CLI we can't immediately tell whether <NAME>@<VERSION-OR-SEMVER> is an exact version match ( like a date ), or a real range. This does a "best effort" detection which is suitable for our purposes today.
- Returns
 true iff version is a valid semantic version range string.
- See also
 - flox::resolver::ManifestDescriptor::semver