release-please 13.15.1 → 13.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [13.16.0](https://github.com/googleapis/release-please/compare/v13.15.1...v13.16.0) (2022-05-06)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* allow configuring separate-pull-requests per component ([#1412](https://github.com/googleapis/release-please/issues/1412)) ([d274421](https://github.com/googleapis/release-please/commit/d2744219fbbd6c58a10b177a824fb3715039162a))
|
|
13
|
+
|
|
7
14
|
### [13.15.1](https://github.com/googleapis/release-please/compare/v13.15.0...v13.15.1) (2022-05-05)
|
|
8
15
|
|
|
9
16
|
|
package/build/src/manifest.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface ReleaserConfig {
|
|
|
39
39
|
includeVInTag?: boolean;
|
|
40
40
|
pullRequestTitlePattern?: string;
|
|
41
41
|
tagSeparator?: string;
|
|
42
|
+
separatePullRequests?: boolean;
|
|
42
43
|
changelogSections?: ChangelogSection[];
|
|
43
44
|
changelogPath?: string;
|
|
44
45
|
changelogType?: ChangelogNotesType;
|
|
@@ -75,6 +76,7 @@ interface ReleaserConfigJson {
|
|
|
75
76
|
'changelog-type'?: ChangelogNotesType;
|
|
76
77
|
'changelog-host'?: string;
|
|
77
78
|
'pull-request-title-pattern'?: string;
|
|
79
|
+
'separate-pull-requests'?: boolean;
|
|
78
80
|
'tag-separator'?: string;
|
|
79
81
|
'extra-files'?: string[];
|
|
80
82
|
'version-file'?: string;
|
|
@@ -125,7 +127,6 @@ export interface ManifestConfig extends ReleaserConfigJson {
|
|
|
125
127
|
'last-release-sha'?: string;
|
|
126
128
|
'always-link-local'?: boolean;
|
|
127
129
|
plugins?: PluginType[];
|
|
128
|
-
'separate-pull-requests'?: boolean;
|
|
129
130
|
'group-pull-request-title-pattern'?: string;
|
|
130
131
|
'release-search-depth'?: number;
|
|
131
132
|
'commit-search-depth'?: number;
|
package/build/src/manifest.js
CHANGED
|
@@ -715,6 +715,7 @@ function extractReleaserConfig(config) {
|
|
|
715
715
|
changelogType: config['changelog-type'],
|
|
716
716
|
pullRequestTitlePattern: config['pull-request-title-pattern'],
|
|
717
717
|
tagSeparator: config['tag-separator'],
|
|
718
|
+
separatePullRequests: config['separate-pull-requests'],
|
|
718
719
|
};
|
|
719
720
|
}
|
|
720
721
|
/**
|
|
@@ -873,7 +874,7 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix,
|
|
|
873
874
|
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
|
|
874
875
|
}
|
|
875
876
|
function mergeReleaserConfig(defaultConfig, pathConfig) {
|
|
876
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
877
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
877
878
|
return {
|
|
878
879
|
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
|
|
879
880
|
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
|
|
@@ -893,6 +894,7 @@ function mergeReleaserConfig(defaultConfig, pathConfig) {
|
|
|
893
894
|
includeVInTag: (_s = pathConfig.includeVInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeVInTag,
|
|
894
895
|
tagSeparator: (_t = pathConfig.tagSeparator) !== null && _t !== void 0 ? _t : defaultConfig.tagSeparator,
|
|
895
896
|
pullRequestTitlePattern: (_u = pathConfig.pullRequestTitlePattern) !== null && _u !== void 0 ? _u : defaultConfig.pullRequestTitlePattern,
|
|
897
|
+
separatePullRequests: (_v = pathConfig.separatePullRequests) !== null && _v !== void 0 ? _v : defaultConfig.separatePullRequests,
|
|
896
898
|
};
|
|
897
899
|
}
|
|
898
900
|
/**
|
|
@@ -38,11 +38,20 @@ class Merge extends plugin_1.ManifestPlugin {
|
|
|
38
38
|
return candidates;
|
|
39
39
|
}
|
|
40
40
|
logger_1.logger.info(`Merging ${candidates.length} pull requests`);
|
|
41
|
+
const [inScopeCandidates, outOfScopeCandidates] = candidates.reduce((collection, candidate) => {
|
|
42
|
+
if (candidate.config.separatePullRequests) {
|
|
43
|
+
collection[1].push(candidate);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
collection[0].push(candidate);
|
|
47
|
+
}
|
|
48
|
+
return collection;
|
|
49
|
+
}, [[], []]);
|
|
41
50
|
const releaseData = [];
|
|
42
51
|
const labels = new Set();
|
|
43
52
|
let rawUpdates = [];
|
|
44
53
|
let rootRelease = null;
|
|
45
|
-
for (const candidate of
|
|
54
|
+
for (const candidate of inScopeCandidates) {
|
|
46
55
|
const pullRequest = candidate.pullRequest;
|
|
47
56
|
rawUpdates = rawUpdates.concat(...pullRequest.updates);
|
|
48
57
|
for (const label of pullRequest.labels) {
|
|
@@ -72,6 +81,7 @@ class Merge extends plugin_1.ManifestPlugin {
|
|
|
72
81
|
releaseType,
|
|
73
82
|
},
|
|
74
83
|
},
|
|
84
|
+
...outOfScopeCandidates,
|
|
75
85
|
];
|
|
76
86
|
}
|
|
77
87
|
}
|
|
@@ -79,6 +79,7 @@ export declare abstract class BaseStrategy implements Strategy {
|
|
|
79
79
|
*/
|
|
80
80
|
getComponent(): Promise<string | undefined>;
|
|
81
81
|
getDefaultComponent(): Promise<string | undefined>;
|
|
82
|
+
protected getBranchComponent(): Promise<string | undefined>;
|
|
82
83
|
getPackageName(): Promise<string | undefined>;
|
|
83
84
|
getDefaultPackageName(): Promise<string | undefined>;
|
|
84
85
|
protected normalizeComponent(component: string | undefined): string;
|
|
@@ -73,6 +73,9 @@ class BaseStrategy {
|
|
|
73
73
|
var _a;
|
|
74
74
|
return this.normalizeComponent((_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName()));
|
|
75
75
|
}
|
|
76
|
+
async getBranchComponent() {
|
|
77
|
+
return this.component || (await this.getDefaultComponent());
|
|
78
|
+
}
|
|
76
79
|
async getPackageName() {
|
|
77
80
|
var _a;
|
|
78
81
|
return (_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName());
|
|
@@ -143,8 +146,9 @@ class BaseStrategy {
|
|
|
143
146
|
const newVersionTag = new tag_name_1.TagName(newVersion, this.includeComponentInTag ? component : undefined, this.tagSeparator, this.includeVInTag);
|
|
144
147
|
logger_1.logger.debug('pull request title pattern:', this.pullRequestTitlePattern);
|
|
145
148
|
const pullRequestTitle = pull_request_title_1.PullRequestTitle.ofComponentTargetBranchVersion(component || '', this.targetBranch, newVersion, this.pullRequestTitlePattern);
|
|
146
|
-
const
|
|
147
|
-
|
|
149
|
+
const branchComponent = await this.getBranchComponent();
|
|
150
|
+
const branchName = branchComponent
|
|
151
|
+
? branch_name_1.BranchName.ofComponentTargetBranch(branchComponent, this.targetBranch)
|
|
148
152
|
: branch_name_1.BranchName.ofTargetBranch(this.targetBranch);
|
|
149
153
|
const releaseNotesBody = await this.buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits);
|
|
150
154
|
if (this.changelogEmpty(releaseNotesBody)) {
|
package/package.json
CHANGED