From 7330da1038904c0be5b21c80ca440bebc07335ed Mon Sep 17 00:00:00 2001 From: chris48s Date: Mon, 26 Sep 2022 19:49:26 +0100 Subject: [PATCH] Add `rc` to pre-release identifiers (#8435) Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com> --- services/color-formatters.js | 2 +- services/color-formatters.spec.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/color-formatters.js b/services/color-formatters.js index 5cf6da7c712be..154710ef8df42 100644 --- a/services/color-formatters.js +++ b/services/color-formatters.js @@ -23,7 +23,7 @@ function version(version) { if (first === 'v') { first = version[1] } - if (first === '0' || /alpha|beta|snapshot|dev|pre/i.test(version)) { + if (first === '0' || /alpha|beta|snapshot|dev|pre|rc/i.test(version)) { return 'orange' } else { return 'blue' diff --git a/services/color-formatters.spec.js b/services/color-formatters.spec.js index 8c282fd61b478..14b119783e72f 100644 --- a/services/color-formatters.spec.js +++ b/services/color-formatters.spec.js @@ -88,6 +88,7 @@ describe('Color formatters', function () { given('6.0-SNAPSHOT'), given('1.0.1-dev'), given('2.1.6-prerelease'), + given('2.1.6-RC1'), ]).expect('orange') expect(() => version(null)).to.throw(