2018-02-12 05:05:29 +00:00
|
|
|
(function() {
|
|
|
|
/**
|
|
|
|
Defines a regex suitable for matching FRESH versions.
|
|
|
|
@module file-contains.js
|
|
|
|
*/
|
|
|
|
// Set up a regex that matches all of the following:
|
2018-02-10 02:32:44 +00:00
|
|
|
|
2018-02-12 05:05:29 +00:00
|
|
|
// - FRESH
|
|
|
|
// - JRS
|
|
|
|
// - FRESCA
|
|
|
|
// - FRESH@1.0.0
|
|
|
|
// - FRESH@1.0
|
|
|
|
// - FRESH@1
|
|
|
|
// - JRS@0.16.0
|
|
|
|
// - JRS@0.16
|
|
|
|
// - JRS@0
|
2018-02-10 02:32:44 +00:00
|
|
|
|
2018-02-12 05:05:29 +00:00
|
|
|
// Don't use a SEMVER regex (eg, NPM's semver-regex) because a) we want to
|
|
|
|
// support partial semvers like "0" or "1.2" and b) we'll expand this later to
|
|
|
|
// support fully scoped FRESH versions.
|
2018-02-10 02:32:44 +00:00
|
|
|
module.exports = function() {
|
|
|
|
return RegExp('^(FRESH|FRESCA|JRS)(?:@(\\d+(?:\\.\\d+)?(?:\\.\\d+)?))?$');
|
|
|
|
};
|
|
|
|
|
|
|
|
}).call(this);
|
|
|
|
|
|
|
|
//# sourceMappingURL=fresh-version-regex.js.map
|