Skip to content

Commit 6a05e01

Browse files
chore: build dist (#560)
chore: build dist release-please-action
1 parent bab175e commit 6a05e01

1 file changed

Lines changed: 39 additions & 27 deletions

File tree

dist/index.js

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -80208,14 +80208,15 @@ exports.getReleaserTypes = getReleaserTypes;
8020880208
// See the License for the specific language governing permissions and
8020980209
// limitations under the License.
8021080210
Object.defineProperty(exports, "__esModule", ({ value: true }));
80211-
exports.GitHub = exports.GH_GRAPHQL_URL = exports.GH_API_URL = void 0;
80211+
exports.sleepInMs = exports.GitHub = exports.GH_GRAPHQL_URL = exports.GH_API_URL = void 0;
8021280212
const code_suggester_1 = __nccwpck_require__(77103);
8021380213
const rest_1 = __nccwpck_require__(55375);
8021480214
const request_1 = __nccwpck_require__(36234);
8021580215
const graphql_1 = __nccwpck_require__(88467);
8021680216
const request_error_1 = __nccwpck_require__(10537);
8021780217
const errors_1 = __nccwpck_require__(93637);
8021880218
const MAX_ISSUE_BODY_SIZE = 65536;
80219+
const MAX_SLEEP_SECONDS = 20;
8021980220
exports.GH_API_URL = 'https://api.github.com';
8022080221
exports.GH_GRAPHQL_URL = 'https://api.github.com';
8022180222
const logger_1 = __nccwpck_require__(68809);
@@ -80253,7 +80254,9 @@ class GitHub {
8025380254
}
8025480255
return files;
8025580256
});
80256-
this.graphqlRequest = wrapAsync(async (opts, maxRetries = 1) => {
80257+
this.graphqlRequest = wrapAsync(async (opts, options) => {
80258+
var _a;
80259+
let maxRetries = (_a = options === null || options === void 0 ? void 0 : options.maxRetries) !== null && _a !== void 0 ? _a : 5;
8025780260
let seconds = 1;
8025880261
while (maxRetries >= 0) {
8025980262
try {
@@ -80267,13 +80270,17 @@ class GitHub {
8026780270
if (err.status !== 502) {
8026880271
throw err;
8026980272
}
80270-
logger_1.logger.trace('received 502 error, retrying');
80273+
if (maxRetries === 0) {
80274+
logger_1.logger.warn('ran out of retries and response is required');
80275+
throw err;
80276+
}
80277+
logger_1.logger.info(`received 502 error, ${maxRetries} attempts remaining`);
8027180278
}
8027280279
maxRetries -= 1;
8027380280
if (maxRetries >= 0) {
8027480281
logger_1.logger.trace(`sleeping ${seconds} seconds`);
80275-
await sleepInMs(1000 * seconds);
80276-
seconds *= 2;
80282+
await (0, exports.sleepInMs)(1000 * seconds);
80283+
seconds = Math.min(seconds * 2, MAX_SLEEP_SECONDS);
8027780284
}
8027880285
}
8027980286
logger_1.logger.trace('ran out of retries');
@@ -80882,7 +80889,7 @@ class GitHub {
8088280889
targetBranch,
8088380890
states,
8088480891
maxFilesChanged: 64,
80885-
}, 3);
80892+
});
8088680893
if (!((_a = response === null || response === void 0 ? void 0 : response.repository) === null || _a === void 0 ? void 0 : _a.pullRequests)) {
8088780894
logger_1.logger.warn(`Could not find merged pull requests for branch ${targetBranch} - it likely does not exist.`);
8088880895
return null;
@@ -81199,6 +81206,7 @@ const wrapAsync = (fn, errorHandler) => {
8119981206
};
8120081207
};
8120181208
const sleepInMs = (ms) => new Promise(resolve => setTimeout(resolve, ms));
81209+
exports.sleepInMs = sleepInMs;
8120281210
//# sourceMappingURL=github.js.map
8120381211

8120481212
/***/ }),
@@ -81922,6 +81930,7 @@ function extractReleaserConfig(config) {
8192281930
releaseType: config['release-type'],
8192381931
bumpMinorPreMajor: config['bump-minor-pre-major'],
8192481932
bumpPatchForMinorPreMajor: config['bump-patch-for-minor-pre-major'],
81933+
versioning: config['versioning'],
8192581934
changelogSections: config['changelog-sections'],
8192681935
changelogPath: config['changelog-path'],
8192781936
changelogHost: config['changelog-host'],
@@ -82076,7 +82085,9 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
8207682085
// only look at the last 250 or so commits to find the latest tag - we
8207782086
// don't want to scan the entire repository history if this repo has never
8207882087
// been released
82079-
const generator = github.mergeCommitIterator(targetBranch, { maxResults: 250 });
82088+
const generator = github.mergeCommitIterator(targetBranch, {
82089+
maxResults: 250,
82090+
});
8208082091
for await (const commitWithPullRequest of generator) {
8208182092
commitShas.add(commitWithPullRequest.sha);
8208282093
const mergedPullRequest = commitWithPullRequest.pullRequest;
@@ -82147,29 +82158,30 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
8214782158
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
8214882159
}
8214982160
function mergeReleaserConfig(defaultConfig, pathConfig) {
82150-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
82161+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
8215182162
return {
8215282163
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
8215382164
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
8215482165
bumpPatchForMinorPreMajor: (_d = pathConfig.bumpPatchForMinorPreMajor) !== null && _d !== void 0 ? _d : defaultConfig.bumpPatchForMinorPreMajor,
82155-
changelogSections: (_e = pathConfig.changelogSections) !== null && _e !== void 0 ? _e : defaultConfig.changelogSections,
82156-
changelogPath: (_f = pathConfig.changelogPath) !== null && _f !== void 0 ? _f : defaultConfig.changelogPath,
82157-
changelogHost: (_g = pathConfig.changelogHost) !== null && _g !== void 0 ? _g : defaultConfig.changelogHost,
82158-
changelogType: (_h = pathConfig.changelogType) !== null && _h !== void 0 ? _h : defaultConfig.changelogType,
82159-
releaseAs: (_j = pathConfig.releaseAs) !== null && _j !== void 0 ? _j : defaultConfig.releaseAs,
82160-
skipGithubRelease: (_k = pathConfig.skipGithubRelease) !== null && _k !== void 0 ? _k : defaultConfig.skipGithubRelease,
82161-
draft: (_l = pathConfig.draft) !== null && _l !== void 0 ? _l : defaultConfig.draft,
82162-
prerelease: (_m = pathConfig.prerelease) !== null && _m !== void 0 ? _m : defaultConfig.prerelease,
82163-
component: (_o = pathConfig.component) !== null && _o !== void 0 ? _o : defaultConfig.component,
82164-
packageName: (_p = pathConfig.packageName) !== null && _p !== void 0 ? _p : defaultConfig.packageName,
82165-
versionFile: (_q = pathConfig.versionFile) !== null && _q !== void 0 ? _q : defaultConfig.versionFile,
82166-
extraFiles: (_r = pathConfig.extraFiles) !== null && _r !== void 0 ? _r : defaultConfig.extraFiles,
82167-
includeComponentInTag: (_s = pathConfig.includeComponentInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeComponentInTag,
82168-
includeVInTag: (_t = pathConfig.includeVInTag) !== null && _t !== void 0 ? _t : defaultConfig.includeVInTag,
82169-
tagSeparator: (_u = pathConfig.tagSeparator) !== null && _u !== void 0 ? _u : defaultConfig.tagSeparator,
82170-
pullRequestTitlePattern: (_v = pathConfig.pullRequestTitlePattern) !== null && _v !== void 0 ? _v : defaultConfig.pullRequestTitlePattern,
82171-
separatePullRequests: (_w = pathConfig.separatePullRequests) !== null && _w !== void 0 ? _w : defaultConfig.separatePullRequests,
82172-
skipSnapshot: (_x = pathConfig.skipSnapshot) !== null && _x !== void 0 ? _x : defaultConfig.skipSnapshot,
82166+
versioning: (_e = pathConfig.versioning) !== null && _e !== void 0 ? _e : defaultConfig.versioning,
82167+
changelogSections: (_f = pathConfig.changelogSections) !== null && _f !== void 0 ? _f : defaultConfig.changelogSections,
82168+
changelogPath: (_g = pathConfig.changelogPath) !== null && _g !== void 0 ? _g : defaultConfig.changelogPath,
82169+
changelogHost: (_h = pathConfig.changelogHost) !== null && _h !== void 0 ? _h : defaultConfig.changelogHost,
82170+
changelogType: (_j = pathConfig.changelogType) !== null && _j !== void 0 ? _j : defaultConfig.changelogType,
82171+
releaseAs: (_k = pathConfig.releaseAs) !== null && _k !== void 0 ? _k : defaultConfig.releaseAs,
82172+
skipGithubRelease: (_l = pathConfig.skipGithubRelease) !== null && _l !== void 0 ? _l : defaultConfig.skipGithubRelease,
82173+
draft: (_m = pathConfig.draft) !== null && _m !== void 0 ? _m : defaultConfig.draft,
82174+
prerelease: (_o = pathConfig.prerelease) !== null && _o !== void 0 ? _o : defaultConfig.prerelease,
82175+
component: (_p = pathConfig.component) !== null && _p !== void 0 ? _p : defaultConfig.component,
82176+
packageName: (_q = pathConfig.packageName) !== null && _q !== void 0 ? _q : defaultConfig.packageName,
82177+
versionFile: (_r = pathConfig.versionFile) !== null && _r !== void 0 ? _r : defaultConfig.versionFile,
82178+
extraFiles: (_s = pathConfig.extraFiles) !== null && _s !== void 0 ? _s : defaultConfig.extraFiles,
82179+
includeComponentInTag: (_t = pathConfig.includeComponentInTag) !== null && _t !== void 0 ? _t : defaultConfig.includeComponentInTag,
82180+
includeVInTag: (_u = pathConfig.includeVInTag) !== null && _u !== void 0 ? _u : defaultConfig.includeVInTag,
82181+
tagSeparator: (_v = pathConfig.tagSeparator) !== null && _v !== void 0 ? _v : defaultConfig.tagSeparator,
82182+
pullRequestTitlePattern: (_w = pathConfig.pullRequestTitlePattern) !== null && _w !== void 0 ? _w : defaultConfig.pullRequestTitlePattern,
82183+
separatePullRequests: (_x = pathConfig.separatePullRequests) !== null && _x !== void 0 ? _x : defaultConfig.separatePullRequests,
82184+
skipSnapshot: (_y = pathConfig.skipSnapshot) !== null && _y !== void 0 ? _y : defaultConfig.skipSnapshot,
8217382185
};
8217482186
}
8217582187
/**
@@ -114386,7 +114398,7 @@ module.exports = {};
114386114398
/***/ ((module) => {
114387114399

114388114400
"use strict";
114389-
module.exports = {"i8":"13.20.0"};
114401+
module.exports = {"i8":"13.21.0"};
114390114402

114391114403
/***/ }),
114392114404

0 commit comments

Comments
 (0)