Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
367c901b
Unverified
Commit
367c901b
authored
3 years ago
by
allan johns
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
chore: rez versioning regex (#11634)
parent
496c2d05
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/versioning/index.spec.ts
+2
-0
2 additions, 0 deletions
lib/versioning/index.spec.ts
lib/versioning/rez/index.ts
+59
-0
59 additions, 0 deletions
lib/versioning/rez/index.ts
lib/versioning/versioning-metadata.spec.ts
+2
-1
2 additions, 1 deletion
lib/versioning/versioning-metadata.spec.ts
with
63 additions
and
1 deletion
lib/versioning/index.spec.ts
+
2
−
0
View file @
367c901b
...
@@ -33,6 +33,8 @@ describe('versioning/index', () => {
...
@@ -33,6 +33,8 @@ describe('versioning/index', () => {
const
vers
=
allVersioning
.
getVersionings
();
const
vers
=
allVersioning
.
getVersionings
();
const
loadedVers
=
loadModules
(
__dirname
);
const
loadedVers
=
loadModules
(
__dirname
);
// TODO: revert rez in #10930
delete
loadedVers
.
rez
;
expect
(
Array
.
from
(
vers
.
keys
())).
toEqual
(
Object
.
keys
(
loadedVers
));
expect
(
Array
.
from
(
vers
.
keys
())).
toEqual
(
Object
.
keys
(
loadedVers
));
for
(
const
name
of
vers
.
keys
())
{
for
(
const
name
of
vers
.
keys
())
{
...
...
This diff is collapsed.
Click to expand it.
lib/versioning/rez/index.ts
0 → 100644
+
59
−
0
View file @
367c901b
// istanbul ignore file: requires (#10930)
// original rez regex written in python (#11634)
// version_range_regex = (
// # Match a version number (e.g. 1.0.0)
// r" ^(?P<version>{version_group})$"
// "|"
// # Or match an exact version number (e.g. ==1.0.0)
// " ^(?P<exact_version>"
// " ==" # Required == operator
// " (?P<exact_version_group>{version_group})?"
// " )$"
// "|"
// # Or match an inclusive bound (e.g. 1.0.0..2.0.0)
// " ^(?P<inclusive_bound>"
// " (?P<inclusive_lower_version>{version_group})?"
// " \.\." # Required .. operator
// " (?P<inclusive_upper_version>{version_group})?"
// " )$"
// "|"
// # Or match a lower bound (e.g. 1.0.0+)
// " ^(?P<lower_bound>"
// " (?P<lower_bound_prefix>>|>=)?" # Bound is exclusive?
// " (?P<lower_version>{version_group})?"
// " (?(lower_bound_prefix)|\+)" # + only if bound is not exclusive
// " )$"
// "|"
// # Or match an upper bound (e.g. <=1.0.0)
// " ^(?P<upper_bound>"
// " (?P<upper_bound_prefix><(?={version_group})|<=)?" # Bound is exclusive?
// " (?P<upper_version>{version_group})?"
// " )$"
// "|"
// # Or match a range in ascending order (e.g. 1.0.0+<2.0.0)
// " ^(?P<range_asc>"
// " (?P<range_lower_asc>"
// " (?P<range_lower_asc_prefix>>|>=)?" # Lower bound is exclusive?
// " (?P<range_lower_asc_version>{version_group})?"
// " (?(range_lower_asc_prefix)|\+)?" # + only if lower bound is not exclusive
// " )(?P<range_upper_asc>"
// " (?(range_lower_asc_version),?|)" # , only if lower bound is found
// " (?P<range_upper_asc_prefix><(?={version_group})|<=)" # <= only if followed by a version group
// " (?P<range_upper_asc_version>{version_group})?"
// " )"
// " )$"
// "|"
// # Or match a range in descending order (e.g. <=2.0.0,1.0.0+)
// " ^(?P<range_desc>"
// " (?P<range_upper_desc>"
// " (?P<range_upper_desc_prefix><|<=)?" # Upper bound is exclusive?
// " (?P<range_upper_desc_version>{version_group})?"
// " (?(range_upper_desc_prefix)|\+)?" # + only if upper bound is not exclusive
// " )(?P<range_lower_desc>"
// " (?(range_upper_desc_version),|)" # Comma is not optional because we don't want to recognize something like "<4>3"
// " (?P<range_lower_desc_prefix><(?={version_group})|>=?)" # >= or > only if followed by a version group
// " (?P<range_lower_desc_version>{version_group})?"
// " )"
// " )$"
// ).format(version_group=version_group)
This diff is collapsed.
Click to expand it.
lib/versioning/versioning-metadata.spec.ts
+
2
−
1
View file @
367c901b
...
@@ -26,7 +26,8 @@ describe('versioning/versioning-metadata', () => {
...
@@ -26,7 +26,8 @@ describe('versioning/versioning-metadata', () => {
(
item
)
=>
!
item
.
includes
(
'
.
'
)
&&
!
item
.
startsWith
(
'
_
'
)
(
item
)
=>
!
item
.
includes
(
'
.
'
)
&&
!
item
.
startsWith
(
'
_
'
)
);
);
for
(
const
versioning
of
allVersioning
)
{
// TODO: revert rez in #10930
for
(
const
versioning
of
allVersioning
.
filter
((
v
)
=>
v
!==
'
rez
'
))
{
const
versioningObj
=
require
(
`./
${
versioning
}
`
);
const
versioningObj
=
require
(
`./
${
versioning
}
`
);
expect
(
versioningObj
.
id
).
toEqual
(
versioning
);
expect
(
versioningObj
.
id
).
toEqual
(
versioning
);
expect
(
versioningObj
.
displayName
).
toBeDefined
();
expect
(
versioningObj
.
displayName
).
toBeDefined
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment