Skip to content
Snippets Groups Projects
Unverified Commit 367c901b authored by allan johns's avatar allan johns Committed by GitHub
Browse files

chore: rez versioning regex (#11634)

parent 496c2d05
No related branches found
No related tags found
No related merge requests found
...@@ -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()) {
......
// 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)
...@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment