Update regular expresiion for isLatestPatchSyntax()
This commit is contained in:
parent
898aa0ce4d
commit
83a1653fa3
|
@ -359,16 +359,7 @@ describe('installer tests', () => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
each([
|
each(['3', '3.1', '3.1.x', '3.1.*', '3.1.X', '6.0.2xx']).test(
|
||||||
'3',
|
|
||||||
'3.1',
|
|
||||||
'3.1.x',
|
|
||||||
'3.1.*',
|
|
||||||
'3.1.X',
|
|
||||||
'6.0.2xx',
|
|
||||||
'6.0.2XX',
|
|
||||||
'6.0.2**'
|
|
||||||
]).test(
|
|
||||||
"if version that can be resolved to 'channel' option is supplied (%s), it should set type to 'channel' in version object",
|
"if version that can be resolved to 'channel' option is supplied (%s), it should set type to 'channel' in version object",
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
|
@ -383,15 +374,7 @@ describe('installer tests', () => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
each([
|
each(['6.0', '6.0.x', '6.0.*', '6.0.X', '6.0.2xx']).test(
|
||||||
'6.0',
|
|
||||||
'6.0.x',
|
|
||||||
'6.0.*',
|
|
||||||
'6.0.X',
|
|
||||||
'6.0.2xx',
|
|
||||||
'6.0.2XX',
|
|
||||||
'6.0.2**'
|
|
||||||
]).test(
|
|
||||||
"if version that can be resolved to 'channel' option is supplied and its major tag is >= 6 (%s), it should set type to 'channel' and qualityFlag to 'true' in version object",
|
"if version that can be resolved to 'channel' option is supplied and its major tag is >= 6 (%s), it should set type to 'channel' and qualityFlag to 'true' in version object",
|
||||||
async version => {
|
async version => {
|
||||||
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
const dotnetVersionResolver = new installer.DotnetVersionResolver(
|
||||||
|
|
|
@ -270,7 +270,7 @@ class DotnetVersionResolver {
|
||||||
}
|
}
|
||||||
isLatestPatchSyntax() {
|
isLatestPatchSyntax() {
|
||||||
var _b, _c;
|
var _b, _c;
|
||||||
const majorTag = (_c = (_b = this.inputVersion.match(/^(?<majorTag>\d+)\.\d+\.\d{1}(x|X|\*){2}$/)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.majorTag;
|
const majorTag = (_c = (_b = this.inputVersion.match(/^(?<majorTag>\d+)\.\d+\.\d{1}x{2}$/)) === null || _b === void 0 ? void 0 : _b.groups) === null || _c === void 0 ? void 0 : _c.majorTag;
|
||||||
if (majorTag &&
|
if (majorTag &&
|
||||||
parseInt(majorTag) <
|
parseInt(majorTag) <
|
||||||
DotnetInstallerLimits.LatestPatchSyntaxMinimalMajorTag) {
|
DotnetInstallerLimits.LatestPatchSyntaxMinimalMajorTag) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ export class DotnetVersionResolver {
|
||||||
|
|
||||||
private isLatestPatchSyntax() {
|
private isLatestPatchSyntax() {
|
||||||
const majorTag = this.inputVersion.match(
|
const majorTag = this.inputVersion.match(
|
||||||
/^(?<majorTag>\d+)\.\d+\.\d{1}(x|X|\*){2}$/
|
/^(?<majorTag>\d+)\.\d+\.\d{1}x{2}$/
|
||||||
)?.groups?.majorTag;
|
)?.groups?.majorTag;
|
||||||
if (
|
if (
|
||||||
majorTag &&
|
majorTag &&
|
||||||
|
|
Loading…
Reference in New Issue