@@ -5420,21 +5420,21 @@ exports.NpmModuleVersion = void 0;
54205420var NpmModuleVersion;
54215421(function (NpmModuleVersion) {
54225422 function parse(versionStr) {
5423- const match = versionStr.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-beta .([0-9]+))?/);
5423+ const match = versionStr.match(/^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-rc .([0-9]+))?/);
54245424 if (!match) {
54255425 throw new Error(`${versionStr} is not a valid NPM version`);
54265426 }
54275427 return Object.assign({ "major": parseInt(match[1]), "minor": parseInt(match[2]), "patch": parseInt(match[3]) }, (() => {
54285428 const str = match[4];
54295429 return str === undefined ?
54305430 {} :
5431- { "betaPreRelease ": parseInt(str) };
5431+ { "rc ": parseInt(str) };
54325432 })());
54335433 }
54345434 NpmModuleVersion.parse = parse;
54355435 ;
54365436 function stringify(v) {
5437- return `${v.major}.${v.minor}.${v.patch}${v.betaPreRelease === undefined ? "" : `-beta .${v.betaPreRelease }`}`;
5437+ return `${v.major}.${v.minor}.${v.patch}${v.rc === undefined ? "" : `-rc .${v.rc }`}`;
54385438 }
54395439 NpmModuleVersion.stringify = stringify;
54405440 /**
@@ -5447,7 +5447,7 @@ var NpmModuleVersion;
54475447 function compare(v1, v2) {
54485448 const sign = (diff) => diff === 0 ? 0 : (diff < 0 ? -1 : 1);
54495449 const noUndefined = (n) => n !== null && n !== void 0 ? n : Infinity;
5450- for (const level of ["major", "minor", "patch", "betaPreRelease "]) {
5450+ for (const level of ["major", "minor", "patch", "rc "]) {
54515451 if (noUndefined(v1[level]) !== noUndefined(v2[level])) {
54525452 return sign(noUndefined(v1[level]) - noUndefined(v2[level]));
54535453 }
@@ -5456,17 +5456,17 @@ var NpmModuleVersion;
54565456 }
54575457 NpmModuleVersion.compare = compare;
54585458 /*
5459- console.log(compare(parse("3.0.0-beta .3"), parse("3.0.0")) === -1 )
5460- console.log(compare(parse("3.0.0-beta .3"), parse("3.0.0-beta .4")) === -1 )
5461- console.log(compare(parse("3.0.0-beta .3"), parse("4.0.0")) === -1 )
5459+ console.log(compare(parse("3.0.0-rc .3"), parse("3.0.0")) === -1 )
5460+ console.log(compare(parse("3.0.0-rc .3"), parse("3.0.0-rc .4")) === -1 )
5461+ console.log(compare(parse("3.0.0-rc .3"), parse("4.0.0")) === -1 )
54625462 */
54635463 function bumpType(params) {
54645464 const versionAhead = parse(params.versionAheadStr);
54655465 const versionBehind = parse(params.versionBehindStr);
54665466 if (compare(versionBehind, versionAhead) === 1) {
54675467 throw new Error(`Version regression ${versionBehind} -> ${versionAhead}`);
54685468 }
5469- for (const level of ["major", "minor", "patch", "betaPreRelease "]) {
5469+ for (const level of ["major", "minor", "patch", "rc "]) {
54705470 if (versionBehind[level] !== versionAhead[level]) {
54715471 return level;
54725472 }
@@ -9673,7 +9673,7 @@ function getLatestSemVersionedTagFactory(params) {
96739673 function getLatestSemVersionedTag(params) {
96749674 var e_1, _a;
96759675 return __awaiter(this, void 0, void 0, function* () {
9676- const { owner, repo, beta , major } = params;
9676+ const { owner, repo, rcPolicy , major } = params;
96779677 const semVersionedTags = [];
96789678 const { listTags } = listTags_1.listTagsFactory({ octokit });
96799679 try {
@@ -9689,17 +9689,17 @@ function getLatestSemVersionedTagFactory(params) {
96899689 catch (_d) {
96909690 continue;
96919691 }
9692- switch (beta ) {
9693- case "IGNORE BETA ":
9694- if (version.betaPreRelease !== undefined) {
9692+ switch (rcPolicy ) {
9693+ case "IGNORE RC ":
9694+ if (version.rc !== undefined) {
96959695 continue;
96969696 }
96979697 break;
9698- case "ONLY LOOK FOR BETA ":
9699- if (version.betaPreRelease === undefined) {
9698+ case "ONLY LOOK FOR RC ":
9699+ if (version.rc === undefined) {
97009700 continue;
97019701 }
9702- case "BETA OR REGULAR RELEASE":
9702+ case "RC OR REGULAR RELEASE":
97039703 break;
97049704 }
97059705 semVersionedTags.push({ tag, version });
@@ -11287,7 +11287,7 @@ function action(_actionName, params, core) {
1128711287 const octokit = createOctokit_1.createOctokit({ github_token });
1128811288 const { getCommitAhead } = getCommitAhead_1.getCommitAheadFactory({ octokit });
1128911289 const { getLatestSemVersionedTag } = getLatestSemVersionedTag_1.getLatestSemVersionedTagFactory({ octokit });
11290- const { tag: branchBehind } = (_a = (yield getLatestSemVersionedTag({ owner, repo, "beta ": "IGNORE BETA ", "major": undefined }))) !== null && _a !== void 0 ? _a : {};
11290+ const { tag: branchBehind } = (_a = (yield getLatestSemVersionedTag({ owner, repo, "rcPolicy ": "IGNORE RC ", "major": undefined }))) !== null && _a !== void 0 ? _a : {};
1129111291 if (branchBehind === undefined) {
1129211292 core.warning(`It's the first release, not editing the CHANGELOG.md`);
1129311293 return;
@@ -11309,15 +11309,15 @@ function action(_actionName, params, core) {
1130911309 branch,
1131011310 "compare_to_version": "0.0.0"
1131111311 }, core).then(({ version }) => version)));
11312- if (NpmModuleVersion_1.NpmModuleVersion.parse(branchAheadVersion).betaPreRelease !== undefined) {
11313- core.warning(`Version on ${branch} is ${branchAheadVersion} it's a beta release, we do not update the CHANGELOG.md`);
11312+ if (NpmModuleVersion_1.NpmModuleVersion.parse(branchAheadVersion).rc !== undefined) {
11313+ core.warning(`Version on ${branch} is ${branchAheadVersion} it's a release candidate , we do not update the CHANGELOG.md`);
1131411314 return;
1131511315 }
1131611316 const bumpType = NpmModuleVersion_1.NpmModuleVersion.bumpType({
1131711317 "versionAheadStr": branchAheadVersion,
1131811318 "versionBehindStr": branchBehindVersion || "0.0.0"
1131911319 });
11320- assert_1.assert(bumpType !== "betaPreRelease ");
11320+ assert_1.assert(bumpType !== "rc ");
1132111321 if (bumpType === "same") {
1132211322 core.warning(`Version on ${branch} and ${branchBehind} are the same, not editing CHANGELOG.md`);
1132311323 return;
@@ -12287,7 +12287,7 @@ exports.outputNames = [
1228712287 "from_version",
1228812288 "to_version",
1228912289 "is_upgraded_version",
12290- "is_release_beta "
12290+ "is_pre_release "
1229112291];
1229212292function getOutputDescription(inputName) {
1229312293 switch (inputName) {
@@ -12304,7 +12304,7 @@ function getOutputDescription(inputName) {
1230412304 case "from_version": return "Output of is_package_json_version_upgraded, string";
1230512305 case "to_version": return "Output of is_package_json_version_upgraded, string";
1230612306 case "is_upgraded_version": return "Output of is_package_json_version_upgraded, true|false";
12307- case "is_release_beta ": return "Output of is_package_json_version_upgraded, true|false";
12307+ case "is_pre_release ": return "Output of is_package_json_version_upgraded, true|false";
1230812308 }
1230912309}
1231012310exports.getOutputDescription = getOutputDescription;
@@ -14651,8 +14651,8 @@ function action(_actionName, params, core) {
1465114651 const getLatestSemVersionedTagParam = {
1465214652 owner,
1465314653 repo,
14654- "beta ": to_version.betaPreRelease !== undefined ?
14655- "ONLY LOOK FOR BETA " : "IGNORE BETA ",
14654+ "rcPolicy ": to_version.rc !== undefined ?
14655+ "ONLY LOOK FOR RC " : "IGNORE RC ",
1465614656 "major": to_version.major
1465714657 };
1465814658 let wrap = yield getLatestSemVersionedTag(getLatestSemVersionedTagParam);
@@ -14668,13 +14668,13 @@ function action(_actionName, params, core) {
1466814668 core.debug(`Last version was ${NpmModuleVersion_1.NpmModuleVersion.stringify(from_version)}`);
1466914669 const is_upgraded_version = NpmModuleVersion_1.NpmModuleVersion.compare(to_version, from_version) === 1 ? "true" : "false";
1467014670 core.debug(`Is version upgraded: ${is_upgraded_version}`);
14671- const is_release_beta = is_upgraded_version === "false" ? "false" : to_version.betaPreRelease !== undefined ? "true" : "false";
14672- core.debug(`Is release beta : ${is_release_beta }`);
14671+ const is_pre_release = is_upgraded_version === "false" ? "false" : to_version.rc !== undefined ? "true" : "false";
14672+ core.debug(`Is pre release : ${is_pre_release }`);
1467314673 return {
1467414674 "to_version": NpmModuleVersion_1.NpmModuleVersion.stringify(to_version),
1467514675 "from_version": NpmModuleVersion_1.NpmModuleVersion.stringify(from_version),
1467614676 is_upgraded_version,
14677- is_release_beta
14677+ is_pre_release
1467814678 };
1467914679 });
1468014680}
0 commit comments