From 8ab9ca179d0b806995f56d044d65eae17fab5d86 Mon Sep 17 00:00:00 2001 From: Google GitHub Actions Bot <72759630+google-github-actions-bot@users.noreply.github.com> Date: Tue, 13 Dec 2022 15:04:27 -0500 Subject: [PATCH] chore: build dist (#677) Build dist PR --- dist/index.js | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/dist/index.js b/dist/index.js index 73532c5..4d157bf 100644 --- a/dist/index.js +++ b/dist/index.js @@ -86567,6 +86567,7 @@ exports.sleepInMs = sleepInMs; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Manifest = exports.MANIFEST_PULL_REQUEST_TITLE_PATTERN = exports.SNOOZE_LABEL = exports.DEFAULT_SNAPSHOT_LABELS = exports.DEFAULT_RELEASE_LABELS = exports.DEFAULT_LABELS = exports.DEFAULT_COMPONENT_NAME = exports.ROOT_PROJECT_PATH = exports.DEFAULT_RELEASE_PLEASE_MANIFEST = exports.DEFAULT_RELEASE_PLEASE_CONFIG = void 0; const version_1 = __nccwpck_require__(17348); +const commit_1 = __nccwpck_require__(69158); const logger_1 = __nccwpck_require__(68809); const commit_split_1 = __nccwpck_require__(6941); const tag_name_1 = __nccwpck_require__(36503); @@ -86881,7 +86882,7 @@ class Manifest { this.logger.info(`Building candidate release pull request for path: ${path}`); this.logger.debug(`type: ${config.releaseType}`); this.logger.debug(`targetBranch: ${this.targetBranch}`); - let pathCommits = commitsPerPath[path]; + let pathCommits = (0, commit_1.parseConventionalCommits)(commitsPerPath[path], this.logger); // The processCommits hook can be implemented by plugins to // post-process commits. This can be used to perform cleanup, e.g,, sentence // casing all commit messages: @@ -87131,7 +87132,7 @@ class Manifest { const strategiesByPath = await this.getStrategiesByPath(); // Find merged release pull requests const generator = await this.findMergedReleasePullRequests(); - const releases = []; + const candidateReleases = []; for await (const pullRequest of generator) { for (const path in this.repositoryConfig) { const config = this.repositoryConfig[path]; @@ -87139,11 +87140,11 @@ class Manifest { this.logger.debug(`type: ${config.releaseType}`); this.logger.debug(`targetBranch: ${this.targetBranch}`); const strategy = strategiesByPath[path]; - const release = await strategy.buildRelease(pullRequest, { + const releases = await strategy.buildReleases(pullRequest, { groupPullRequestTitlePattern: this.groupPullRequestTitlePattern, }); - if (release) { - releases.push({ + for (const release of releases) { + candidateReleases.push({ ...release, path, pullRequest, @@ -87153,12 +87154,9 @@ class Manifest { release.tag.version.major === 0), }); } - else { - this.logger.info(`No release necessary for path: ${path}`); - } } } - return releases; + return candidateReleases; } /** * Find merged, untagged releases. For each release, create a GitHub release, @@ -87641,8 +87639,6 @@ class ManifestPlugin { * @param {Commit[]} commits The set of commits that will feed into release pull request. * @returns {Commit[]} The modified commit objects. */ - // TODO: for next major version, let's run the default conventional commit parser earlier - // (outside of the strategy classes) and pass in the ConventionalCommit[] objects in. processCommits(commits) { return commits; } @@ -88089,6 +88085,7 @@ function groupCandidatesByType(inScopeCandidates) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.LinkedVersions = void 0; const plugin_1 = __nccwpck_require__(31651); +const commit_1 = __nccwpck_require__(69158); const factory_1 = __nccwpck_require__(75695); const merge_1 = __nccwpck_require__(90514); /** @@ -88129,7 +88126,7 @@ class LinkedVersions extends plugin_1.ManifestPlugin { for (const path in groupStrategies) { const strategy = groupStrategies[path]; const latestRelease = releasesByPath[path]; - const releasePullRequest = await strategy.buildReleasePullRequest(commitsByPath[path], latestRelease); + const releasePullRequest = await strategy.buildReleasePullRequest((0, commit_1.parseConventionalCommits)(commitsByPath[path], this.logger), latestRelease); if (releasePullRequest === null || releasePullRequest === void 0 ? void 0 : releasePullRequest.version) { groupVersions[path] = releasePullRequest.version; } @@ -89083,6 +89080,9 @@ class SentenceCase extends plugin_1.ManifestPlugin { processCommits(commits) { this.logger.info(`SentenceCase processing ${commits.length} commits`); for (const commit of commits) { + // The parsed conventional commit message, without the type: + console.info(commit.bareMessage); + commit.bareMessage = this.toUpperCase(commit.bareMessage); // Check whether commit is in conventional commit format, if it is // we'll split the string by type and description: if (commit.message.includes(':')) { @@ -89465,7 +89465,6 @@ exports.BaseStrategy = void 0; const manifest_1 = __nccwpck_require__(31999); const default_1 = __nccwpck_require__(94073); const default_2 = __nccwpck_require__(71480); -const commit_1 = __nccwpck_require__(69158); const version_1 = __nccwpck_require__(17348); const tag_name_1 = __nccwpck_require__(36503); const logger_1 = __nccwpck_require__(68809); @@ -89587,7 +89586,7 @@ class BaseStrategy { * open a pull request. */ async buildReleasePullRequest(commits, latestRelease, draft, labels = []) { - const conventionalCommits = await this.postProcessCommits((0, commit_1.parseConventionalCommits)(commits, this.logger)); + const conventionalCommits = await this.postProcessCommits(commits); this.logger.info(`Considering: ${conventionalCommits.length} commits`); if (conventionalCommits.length === 0) { this.logger.info(`No commits for path: ${this.path}, skipping`); @@ -89735,6 +89734,7 @@ class BaseStrategy { * Given a merged pull request, build the candidate release. * @param {PullRequest} mergedPullRequest The merged release pull request. * @returns {Release} The candidate release. + * @deprecated Use buildReleases() instead. */ async buildRelease(mergedPullRequest, options) { var _a; @@ -89813,6 +89813,18 @@ class BaseStrategy { sha: mergedPullRequest.sha, }; } + /** + * Given a merged pull request, build the candidate releases. + * @param {PullRequest} mergedPullRequest The merged release pull request. + * @returns {Release} The candidate release. + */ + async buildReleases(mergedPullRequest, options) { + const release = await this.buildRelease(mergedPullRequest, options); + if (release) { + return [release]; + } + return []; + } isPublishedVersion(_version) { return true; } @@ -120760,7 +120772,7 @@ module.exports = {}; /***/ ((module) => { "use strict"; -module.exports = {"i8":"14.17.5"}; +module.exports = {"i8":"15.0.0"}; /***/ }),