File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
src/data-extensions-editor
test/unit-tests/data-extensions-editor Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ import { basename, extname } from "../common/path";
77// - Added version named group which does not capture the v prefix
88// - Removed the ^ and $ anchors
99// - Made the minor and patch versions optional
10+ // - Added a hyphen to the start of the version
11+ // - Added a dot as a valid separator between the version and the label
12+ // - Made the patch version optional even if a label is given
1013// This will match any semver string at the end of a larger string
1114const semverRegex =
12- / [ v = \s ] * (?< version > ( [ 0 - 9 ] + ) ( \. ( [ 0 - 9 ] + ) (?: \. ( [ 0 - 9 ] + ) (?: - ? ( (?: [ 0 - 9 ] + | \d * [ a - z A - Z - ] [ a - z A - Z 0 - 9 - ] * ) (?: \. (?: [ 0 - 9 ] + | \d * [ a - z A - Z - ] [ a - z A - Z 0 - 9 - ] * ) ) * ) ) ? (?: \+ ( [ 0 - 9 A - Z a - z - ] + (?: \. [ 0 - 9 A - Z a - z - ] + ) * ) ) ? ) ? ) ? ) / g;
15+ / - [ v = \s ] * (?< version > ( [ 0 - 9 ] + ) ( \. ( [ 0 - 9 ] + ) (?: ( \. ( [ 0 - 9 ] + ) ) ? (?: [ - . ] ? ( (?: [ 0 - 9 ] + | \d * [ a - z A - Z - ] [ a - z A - Z 0 - 9 - ] * ) (?: \. (?: [ 0 - 9 ] + | \d * [ a - z A - Z - ] [ a - z A - Z 0 - 9 - ] * ) ) * ) ) ? (?: \+ ( [ 0 - 9 A - Z a - z - ] + (?: \. [ 0 - 9 A - Z a - z - ] + ) * ) ) ? ) ? ) ? ) / g;
1316
1417export interface Library {
1518 name : string ;
Original file line number Diff line number Diff line change @@ -45,6 +45,46 @@ describe("parseLibraryFilename", () => {
4545 name : "spring-boot" ,
4646 version : "3.1.0-rc2" ,
4747 } ,
48+ {
49+ filename : "org.eclipse.sisu.plexus-0.9.0.M2.jar" ,
50+ name : "org.eclipse.sisu.plexus" ,
51+ version : "0.9.0.M2" ,
52+ } ,
53+ {
54+ filename : "org.eclipse.sisu.inject-0.9.0.M2.jar" ,
55+ name : "org.eclipse.sisu.inject" ,
56+ version : "0.9.0.M2" ,
57+ } ,
58+ {
59+ filename : "slf4j-api-1.7.36.jar" ,
60+ name : "slf4j-api" ,
61+ version : "1.7.36" ,
62+ } ,
63+ {
64+ filename : "guava-30.1.1-jre.jar" ,
65+ name : "guava" ,
66+ version : "30.1.1-jre" ,
67+ } ,
68+ {
69+ filename : "caliper-1.0-beta-3.jar" ,
70+ name : "caliper" ,
71+ version : "1.0-beta-3" ,
72+ } ,
73+ {
74+ filename : "protobuf-java-4.0.0-rc-2.jar" ,
75+ name : "protobuf-java" ,
76+ version : "4.0.0-rc-2" ,
77+ } ,
78+ {
79+ filename : "jetty-util-9.4.51.v20230217.jar" ,
80+ name : "jetty-util" ,
81+ version : "9.4.51.v20230217" ,
82+ } ,
83+ {
84+ filename : "jetty-servlet-9.4.51.v20230217.jar" ,
85+ name : "jetty-servlet" ,
86+ version : "9.4.51.v20230217" ,
87+ } ,
4888 ] ;
4989
5090 test . each ( testCases ) (
You can’t perform that action at this time.
0 commit comments