@@ -4357,7 +4357,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
4357
4357
4358
4358
var BottleneckLight = _interopDefault(__nccwpck_require__(1174));
4359
4359
4360
- const VERSION = "5.1.1 ";
4360
+ const VERSION = "5.2.2 ";
4361
4361
4362
4362
const noop = () => Promise.resolve();
4363
4363
// @ts-expect-error
@@ -9254,7 +9254,7 @@ class SemVer {
9254
9254
version = version.version
9255
9255
}
9256
9256
} else if (typeof version !== 'string') {
9257
- throw new TypeError(`Invalid Version: ${(__nccwpck_require__(3837).inspect)( version)} `)
9257
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}". `)
9258
9258
}
9259
9259
9260
9260
if (version.length > MAX_LENGTH) {
@@ -14973,6 +14973,15 @@ var toMergeMethod = function (method) {
14973
14973
var semverRegex = /^([~^]?)[0-9]+\.[0-9]+\.[0-9]+(-.+)?$/;
14974
14974
var retryDelays = [1, 1, 1, 2, 3, 4, 5, 10, 20, 40, 60].map(function (a) { return a * 1000; });
14975
14975
var timeout = 6 * 60 * 60 * 1000;
14976
+ var validBumpTypes = [
14977
+ 'major',
14978
+ 'premajor',
14979
+ 'minor',
14980
+ 'preminor',
14981
+ 'patch',
14982
+ 'prepatch',
14983
+ 'prerelease',
14984
+ ];
14976
14985
function run() {
14977
14986
return __awaiter(this, void 0, void 0, function () {
14978
14987
var startTime, context, payload, token, allowedActors, allowedUpdateTypes, approve, packageBlockList, packageAllowListRaw, packageAllowList, merge, mergeMethod, pr, Octokit, octokit, readPackageJson, mergeWhenPossible, getPR, compareCommits, approvePR, validVersionChange, comparison, onlyPackageJsonChanged, packageJsonBase, packageJsonPr, diff, allowedPropsChanges, allowedChange, result;
@@ -15202,16 +15211,9 @@ function run() {
15202
15211
if (semver_default().gte(oldVersionExact, newVersionExact)) {
15203
15212
return false;
15204
15213
}
15205
- var allowed = [];
15206
- if (allowedBumpTypes.includes('major')) {
15207
- allowed.push('major');
15208
- }
15209
- if (allowedBumpTypes.includes('minor')) {
15210
- allowed.push('minor');
15211
- }
15212
- if (allowedBumpTypes.includes('patch')) {
15213
- allowed.push('patch');
15214
- }
15214
+ var allowed = allowedBumpTypes.filter(function (type) {
15215
+ return validBumpTypes.includes(type);
15216
+ });
15215
15217
return allowed.includes(semver_default().diff(oldVersionExact, newVersionExact));
15216
15218
};
15217
15219
core.info('Getting PR files');
0 commit comments