Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: build dist #677

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 27 additions & 15 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -87131,19 +87132,19 @@ 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];
this.logger.info(`Building release for path: ${path}`);
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,
Expand All @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
/**
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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(':')) {
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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`);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -120760,7 +120772,7 @@ module.exports = {};
/***/ ((module) => {

"use strict";
module.exports = {"i8":"14.17.5"};
module.exports = {"i8":"15.0.0"};

/***/ }),

Expand Down