@@ -4,61 +4,61 @@ lazy_static! {
44 /// Any character used in a semver range
55 pub static ref RANGE_CHARS : Regex = Regex :: new( r"^(~|\^|\*|>=?|<=?)" ) . unwrap( ) ;
66 /// "1.2.3"
7- pub static ref EXACT : Regex = Regex :: new( r"^\d +\.\d +\.\d +$" ) . unwrap( ) ;
7+ pub static ref EXACT : Regex = Regex :: new( r"^[0-9] +\.[0-9] +\.[0-9] +$" ) . unwrap( ) ;
88 /// "1.2.3-alpha" || "1.2.3-rc.1"
9- pub static ref EXACT_TAG : Regex = Regex :: new( r"^\d +\.\d +\.\d +\-[a-z0-9.-_]+$" ) . unwrap( ) ;
9+ pub static ref EXACT_TAG : Regex = Regex :: new( r"^[0-9] +\.[0-9] +\.[0-9] +\-[a-z0-9.-_]+$" ) . unwrap( ) ;
1010 /// "^1.2.3"
11- pub static ref CARET : Regex = Regex :: new( r"^\^(\d +\.\d +\.\d +)$" ) . unwrap( ) ;
11+ pub static ref CARET : Regex = Regex :: new( r"^\^([0-9] +\.[0-9] +\.[0-9] +)$" ) . unwrap( ) ;
1212 /// "^1.2.3-alpha" || "^1.2.3-rc.1"
13- pub static ref CARET_TAG : Regex = Regex :: new( r"^\^(\d +\.\d +\.\d +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
13+ pub static ref CARET_TAG : Regex = Regex :: new( r"^\^([0-9] +\.[0-9] +\.[0-9] +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
1414 /// "~1.2.3"
15- pub static ref TILDE : Regex = Regex :: new( r"^~(\d +\.\d +\.\d +)$" ) . unwrap( ) ;
15+ pub static ref TILDE : Regex = Regex :: new( r"^~([0-9] +\.[0-9] +\.[0-9] +)$" ) . unwrap( ) ;
1616 /// "~1.2.3-alpha" || "~1.2.3-rc.1"
17- pub static ref TILDE_TAG : Regex = Regex :: new( r"^~(\d +\.\d +\.\d +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
17+ pub static ref TILDE_TAG : Regex = Regex :: new( r"^~([0-9] +\.[0-9] +\.[0-9] +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
1818 /// ">1.2.3"
19- pub static ref GT : Regex = Regex :: new( r"^>(\d +\.\d +\.\d +)$" ) . unwrap( ) ;
19+ pub static ref GT : Regex = Regex :: new( r"^>([0-9] +\.[0-9] +\.[0-9] +)$" ) . unwrap( ) ;
2020 /// ">1.2.3-alpha" || ">1.2.3-rc.1"
21- pub static ref GT_TAG : Regex = Regex :: new( r"^>(\d +\.\d +\.\d +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
21+ pub static ref GT_TAG : Regex = Regex :: new( r"^>([0-9] +\.[0-9] +\.[0-9] +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
2222 /// ">=1.2.3"
23- pub static ref GTE : Regex = Regex :: new( r"^>=(\d +\.\d +\.\d +)$" ) . unwrap( ) ;
23+ pub static ref GTE : Regex = Regex :: new( r"^>=([0-9] +\.[0-9] +\.[0-9] +)$" ) . unwrap( ) ;
2424 /// ">=1.2.3-alpha" || ">=1.2.3-rc.1"
25- pub static ref GTE_TAG : Regex = Regex :: new( r"^>=(\d +\.\d +\.\d +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
25+ pub static ref GTE_TAG : Regex = Regex :: new( r"^>=([0-9] +\.[0-9] +\.[0-9] +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
2626 /// "<1.2.3"
27- pub static ref LT : Regex = Regex :: new( r"^<(\d +\.\d +\.\d +)$" ) . unwrap( ) ;
27+ pub static ref LT : Regex = Regex :: new( r"^<([0-9] +\.[0-9] +\.[0-9] +)$" ) . unwrap( ) ;
2828 /// "<1.2.3-alpha" || "<1.2.3-rc.1"
29- pub static ref LT_TAG : Regex = Regex :: new( r"^<(\d +\.\d +\.\d +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
29+ pub static ref LT_TAG : Regex = Regex :: new( r"^<([0-9] +\.[0-9] +\.[0-9] +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
3030 /// "<=1.2.3"
31- pub static ref LTE : Regex = Regex :: new( r"^<=(\d +\.\d +\.\d +)$" ) . unwrap( ) ;
31+ pub static ref LTE : Regex = Regex :: new( r"^<=([0-9] +\.[0-9] +\.[0-9] +)$" ) . unwrap( ) ;
3232 /// "<=1.2.3-alpha" || "<=1.2.3-rc.1"
33- pub static ref LTE_TAG : Regex = Regex :: new( r"^<=(\d +\.\d +\.\d +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
33+ pub static ref LTE_TAG : Regex = Regex :: new( r"^<=([0-9] +\.[0-9] +\.[0-9] +)\-[a-z0-9.-_]+$" ) . unwrap( ) ;
3434 /// "^1.2"
35- pub static ref CARET_MINOR : Regex = Regex :: new( r"^\^(\d +\.\d +)$" ) . unwrap( ) ;
35+ pub static ref CARET_MINOR : Regex = Regex :: new( r"^\^([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
3636 /// "~1.2"
37- pub static ref TILDE_MINOR : Regex = Regex :: new( r"^~(\d +\.\d +)$" ) . unwrap( ) ;
37+ pub static ref TILDE_MINOR : Regex = Regex :: new( r"^~([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
3838 /// ">1.2"
39- pub static ref GT_MINOR : Regex = Regex :: new( r"^>(\d +\.\d +)$" ) . unwrap( ) ;
39+ pub static ref GT_MINOR : Regex = Regex :: new( r"^>([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
4040 /// ">=1.2"
41- pub static ref GTE_MINOR : Regex = Regex :: new( r"^>=(\d +\.\d +)$" ) . unwrap( ) ;
41+ pub static ref GTE_MINOR : Regex = Regex :: new( r"^>=([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
4242 /// "<1.2"
43- pub static ref LT_MINOR : Regex = Regex :: new( r"^<(\d +\.\d +)$" ) . unwrap( ) ;
43+ pub static ref LT_MINOR : Regex = Regex :: new( r"^<([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
4444 /// "<=1.2"
45- pub static ref LTE_MINOR : Regex = Regex :: new( r"^<=(\d +\.\d +)$" ) . unwrap( ) ;
45+ pub static ref LTE_MINOR : Regex = Regex :: new( r"^<=([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
4646 /// "^1"
47- pub static ref CARET_MAJOR : Regex = Regex :: new( r"^\^(\d +)$" ) . unwrap( ) ;
47+ pub static ref CARET_MAJOR : Regex = Regex :: new( r"^\^([0-9] +)$" ) . unwrap( ) ;
4848 /// "~1"
49- pub static ref TILDE_MAJOR : Regex = Regex :: new( r"^~(\d +)$" ) . unwrap( ) ;
49+ pub static ref TILDE_MAJOR : Regex = Regex :: new( r"^~([0-9] +)$" ) . unwrap( ) ;
5050 /// ">1"
51- pub static ref GT_MAJOR : Regex = Regex :: new( r"^>(\d +)$" ) . unwrap( ) ;
51+ pub static ref GT_MAJOR : Regex = Regex :: new( r"^>([0-9] +)$" ) . unwrap( ) ;
5252 /// ">=1"
53- pub static ref GTE_MAJOR : Regex = Regex :: new( r"^>=(\d +)$" ) . unwrap( ) ;
53+ pub static ref GTE_MAJOR : Regex = Regex :: new( r"^>=([0-9] +)$" ) . unwrap( ) ;
5454 /// "<1"
55- pub static ref LT_MAJOR : Regex = Regex :: new( r"^<(\d +)$" ) . unwrap( ) ;
55+ pub static ref LT_MAJOR : Regex = Regex :: new( r"^<([0-9] +)$" ) . unwrap( ) ;
5656 /// "<=1"
57- pub static ref LTE_MAJOR : Regex = Regex :: new( r"^<=(\d +)$" ) . unwrap( ) ;
57+ pub static ref LTE_MAJOR : Regex = Regex :: new( r"^<=([0-9] +)$" ) . unwrap( ) ;
5858 /// "1"
59- pub static ref MAJOR : Regex = Regex :: new( r"^(\d +)$" ) . unwrap( ) ;
59+ pub static ref MAJOR : Regex = Regex :: new( r"^([0-9] +)$" ) . unwrap( ) ;
6060 /// "1.2"
61- pub static ref MINOR : Regex = Regex :: new( r"^(\d +\.\d +)$" ) . unwrap( ) ;
61+ pub static ref MINOR : Regex = Regex :: new( r"^([0-9] +\.[0-9] +)$" ) . unwrap( ) ;
6262 /// "npm:"
6363 pub static ref ALIAS : Regex = Regex :: new( r"^npm:.+" ) . unwrap( ) ;
6464 /// "file:"
0 commit comments