release-please 13.14.0 → 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 +22 -0
- package/build/src/bin/release-please.d.ts +1 -0
- package/build/src/bin/release-please.js +6 -0
- package/build/src/manifest.d.ts +4 -1
- package/build/src/manifest.js +17 -13
- package/build/src/plugins/cargo-workspace.d.ts +2 -4
- package/build/src/plugins/cargo-workspace.js +0 -6
- package/build/src/plugins/merge.js +11 -1
- package/build/src/plugins/node-workspace.js +1 -2
- package/build/src/plugins/workspace.js +1 -0
- package/build/src/strategies/base.d.ts +3 -0
- package/build/src/strategies/base.js +8 -2
- package/build/src/strategies/php-yoshi.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
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
|
+
|
|
14
|
+
### [13.15.1](https://github.com/googleapis/release-please/compare/v13.15.0...v13.15.1) (2022-05-05)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **cargo-workspace:** stop defaulting to updating all components ([#1414](https://github.com/googleapis/release-please/issues/1414)) ([532637c](https://github.com/googleapis/release-please/commit/532637c399d38962e1c0a8622656d61e0fe7e405))
|
|
20
|
+
* node-workspace should not bump versions for peer dependencies ([#1413](https://github.com/googleapis/release-please/issues/1413)) ([cc4eaaa](https://github.com/googleapis/release-please/commit/cc4eaaa864b7a6444e4dc72d1c75a596932d7b62)), closes [#1403](https://github.com/googleapis/release-please/issues/1403)
|
|
21
|
+
|
|
22
|
+
## [13.15.0](https://github.com/googleapis/release-please/compare/v13.14.0...v13.15.0) (2022-04-27)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* allow configuring changelog-host ([#1408](https://github.com/googleapis/release-please/issues/1408)) ([d7d525f](https://github.com/googleapis/release-please/commit/d7d525f283f931dd999ca69228e71dd6adf9e0c3))
|
|
28
|
+
|
|
7
29
|
## [13.14.0](https://github.com/googleapis/release-please/compare/v13.13.0...v13.14.0) (2022-04-20)
|
|
8
30
|
|
|
9
31
|
|
|
@@ -185,6 +185,10 @@ function pullRequestStrategyOptions(yargs) {
|
|
|
185
185
|
}
|
|
186
186
|
return arg;
|
|
187
187
|
},
|
|
188
|
+
})
|
|
189
|
+
.option('changelog-host', {
|
|
190
|
+
describe: 'host for hyperlinks in the changelog',
|
|
191
|
+
type: 'string',
|
|
188
192
|
})
|
|
189
193
|
.option('last-package-version', {
|
|
190
194
|
describe: 'last version # that package was released as',
|
|
@@ -284,6 +288,7 @@ const createReleasePullRequestCommand = {
|
|
|
284
288
|
bumpPatchForMinorPreMajor: argv.bumpPatchForMinorPreMajor,
|
|
285
289
|
changelogPath: argv.changelogPath,
|
|
286
290
|
changelogType: argv.changelogType,
|
|
291
|
+
changelogHost: argv.changelogHost,
|
|
287
292
|
pullRequestTitlePattern: argv.pullRequestTitlePattern,
|
|
288
293
|
changelogSections: argv.changelogSections,
|
|
289
294
|
releaseAs: argv.releaseAs,
|
|
@@ -471,6 +476,7 @@ const bootstrapCommand = {
|
|
|
471
476
|
bumpMinorPreMajor: argv.bumpMinorPreMajor,
|
|
472
477
|
bumpPatchForMinorPreMajor: argv.bumpPatchForMinorPreMajor,
|
|
473
478
|
changelogPath: argv.changelogPath,
|
|
479
|
+
changelogHost: argv.changelogHost,
|
|
474
480
|
changelogSections: argv.changelogSections,
|
|
475
481
|
releaseAs: argv.releaseAs,
|
|
476
482
|
versioning: argv.versioningStrategy,
|
package/build/src/manifest.d.ts
CHANGED
|
@@ -39,9 +39,11 @@ 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;
|
|
46
|
+
changelogHost?: string;
|
|
45
47
|
versionFile?: string;
|
|
46
48
|
extraFiles?: ExtraFile[];
|
|
47
49
|
snapshotLabels?: string[];
|
|
@@ -72,7 +74,9 @@ interface ReleaserConfigJson {
|
|
|
72
74
|
'include-component-in-tag'?: boolean;
|
|
73
75
|
'include-v-in-tag'?: boolean;
|
|
74
76
|
'changelog-type'?: ChangelogNotesType;
|
|
77
|
+
'changelog-host'?: string;
|
|
75
78
|
'pull-request-title-pattern'?: string;
|
|
79
|
+
'separate-pull-requests'?: boolean;
|
|
76
80
|
'tag-separator'?: string;
|
|
77
81
|
'extra-files'?: string[];
|
|
78
82
|
'version-file'?: string;
|
|
@@ -123,7 +127,6 @@ export interface ManifestConfig extends ReleaserConfigJson {
|
|
|
123
127
|
'last-release-sha'?: string;
|
|
124
128
|
'always-link-local'?: boolean;
|
|
125
129
|
plugins?: PluginType[];
|
|
126
|
-
'separate-pull-requests'?: boolean;
|
|
127
130
|
'group-pull-request-title-pattern'?: string;
|
|
128
131
|
'release-search-depth'?: number;
|
|
129
132
|
'commit-search-depth'?: number;
|
package/build/src/manifest.js
CHANGED
|
@@ -700,6 +700,7 @@ function extractReleaserConfig(config) {
|
|
|
700
700
|
bumpPatchForMinorPreMajor: config['bump-patch-for-minor-pre-major'],
|
|
701
701
|
changelogSections: config['changelog-sections'],
|
|
702
702
|
changelogPath: config['changelog-path'],
|
|
703
|
+
changelogHost: config['changelog-host'],
|
|
703
704
|
releaseAs: config['release-as'],
|
|
704
705
|
skipGithubRelease: config['skip-github-release'],
|
|
705
706
|
draft: config.draft,
|
|
@@ -714,6 +715,7 @@ function extractReleaserConfig(config) {
|
|
|
714
715
|
changelogType: config['changelog-type'],
|
|
715
716
|
pullRequestTitlePattern: config['pull-request-title-pattern'],
|
|
716
717
|
tagSeparator: config['tag-separator'],
|
|
718
|
+
separatePullRequests: config['separate-pull-requests'],
|
|
717
719
|
};
|
|
718
720
|
}
|
|
719
721
|
/**
|
|
@@ -872,25 +874,27 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix,
|
|
|
872
874
|
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
|
|
873
875
|
}
|
|
874
876
|
function mergeReleaserConfig(defaultConfig, pathConfig) {
|
|
875
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
877
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
876
878
|
return {
|
|
877
879
|
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
|
|
878
880
|
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
|
|
879
881
|
bumpPatchForMinorPreMajor: (_d = pathConfig.bumpPatchForMinorPreMajor) !== null && _d !== void 0 ? _d : defaultConfig.bumpPatchForMinorPreMajor,
|
|
880
882
|
changelogSections: (_e = pathConfig.changelogSections) !== null && _e !== void 0 ? _e : defaultConfig.changelogSections,
|
|
881
883
|
changelogPath: (_f = pathConfig.changelogPath) !== null && _f !== void 0 ? _f : defaultConfig.changelogPath,
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
884
|
+
changelogHost: (_g = pathConfig.changelogHost) !== null && _g !== void 0 ? _g : defaultConfig.changelogHost,
|
|
885
|
+
releaseAs: (_h = pathConfig.releaseAs) !== null && _h !== void 0 ? _h : defaultConfig.releaseAs,
|
|
886
|
+
skipGithubRelease: (_j = pathConfig.skipGithubRelease) !== null && _j !== void 0 ? _j : defaultConfig.skipGithubRelease,
|
|
887
|
+
draft: (_k = pathConfig.draft) !== null && _k !== void 0 ? _k : defaultConfig.draft,
|
|
888
|
+
prerelease: (_l = pathConfig.prerelease) !== null && _l !== void 0 ? _l : defaultConfig.prerelease,
|
|
889
|
+
component: (_m = pathConfig.component) !== null && _m !== void 0 ? _m : defaultConfig.component,
|
|
890
|
+
packageName: (_o = pathConfig.packageName) !== null && _o !== void 0 ? _o : defaultConfig.packageName,
|
|
891
|
+
versionFile: (_p = pathConfig.versionFile) !== null && _p !== void 0 ? _p : defaultConfig.versionFile,
|
|
892
|
+
extraFiles: (_q = pathConfig.extraFiles) !== null && _q !== void 0 ? _q : defaultConfig.extraFiles,
|
|
893
|
+
includeComponentInTag: (_r = pathConfig.includeComponentInTag) !== null && _r !== void 0 ? _r : defaultConfig.includeComponentInTag,
|
|
894
|
+
includeVInTag: (_s = pathConfig.includeVInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeVInTag,
|
|
895
|
+
tagSeparator: (_t = pathConfig.tagSeparator) !== null && _t !== void 0 ? _t : defaultConfig.tagSeparator,
|
|
896
|
+
pullRequestTitlePattern: (_u = pathConfig.pullRequestTitlePattern) !== null && _u !== void 0 ? _u : defaultConfig.pullRequestTitlePattern,
|
|
897
|
+
separatePullRequests: (_v = pathConfig.separatePullRequests) !== null && _v !== void 0 ? _v : defaultConfig.separatePullRequests,
|
|
894
898
|
};
|
|
895
899
|
}
|
|
896
900
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { CandidateReleasePullRequest
|
|
2
|
-
import { WorkspacePlugin, DependencyGraph
|
|
1
|
+
import { CandidateReleasePullRequest } from '../manifest';
|
|
2
|
+
import { WorkspacePlugin, DependencyGraph } from './workspace';
|
|
3
3
|
import { CargoManifest } from '../updaters/rust/common';
|
|
4
4
|
import { VersionsMap, Version } from '../version';
|
|
5
|
-
import { GitHub } from '../github';
|
|
6
5
|
interface CrateInfo {
|
|
7
6
|
/**
|
|
8
7
|
* e.g. `crates/crate-a`
|
|
@@ -37,7 +36,6 @@ interface CrateInfo {
|
|
|
37
36
|
* into a single rust package.
|
|
38
37
|
*/
|
|
39
38
|
export declare class CargoWorkspace extends WorkspacePlugin<CrateInfo> {
|
|
40
|
-
constructor(github: GitHub, targetBranch: string, repositoryConfig: RepositoryConfig, options?: WorkspacePluginOptions);
|
|
41
39
|
protected buildAllPackages(candidates: CandidateReleasePullRequest[]): Promise<{
|
|
42
40
|
allPackages: CrateInfo[];
|
|
43
41
|
candidatesByPackage: Record<string, CandidateReleasePullRequest>;
|
|
@@ -35,12 +35,6 @@ const cargo_lock_1 = require("../updaters/rust/cargo-lock");
|
|
|
35
35
|
* into a single rust package.
|
|
36
36
|
*/
|
|
37
37
|
class CargoWorkspace extends workspace_1.WorkspacePlugin {
|
|
38
|
-
constructor(github, targetBranch, repositoryConfig, options = {}) {
|
|
39
|
-
super(github, targetBranch, repositoryConfig, {
|
|
40
|
-
...options,
|
|
41
|
-
updateAllPackages: true,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
38
|
async buildAllPackages(candidates) {
|
|
45
39
|
var _a, _b, _c, _d;
|
|
46
40
|
const cargoManifestContent = await this.github.getFileContentsOnBranch('Cargo.toml', this.targetBranch);
|
|
@@ -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
|
}
|
|
@@ -211,7 +211,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
211
211
|
return candidates;
|
|
212
212
|
}
|
|
213
213
|
async buildGraph(allPackages) {
|
|
214
|
-
var _a, _b, _c
|
|
214
|
+
var _a, _b, _c;
|
|
215
215
|
const graph = new Map();
|
|
216
216
|
const workspacePackageNames = new Set(allPackages.map(packageJson => packageJson.name));
|
|
217
217
|
for (const packageJson of allPackages) {
|
|
@@ -219,7 +219,6 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
219
219
|
...((_a = packageJson.dependencies) !== null && _a !== void 0 ? _a : {}),
|
|
220
220
|
...((_b = packageJson.devDependencies) !== null && _b !== void 0 ? _b : {}),
|
|
221
221
|
...((_c = packageJson.optionalDependencies) !== null && _c !== void 0 ? _c : {}),
|
|
222
|
-
...((_d = packageJson.peerDependencies) !== null && _d !== void 0 ? _d : {}),
|
|
223
222
|
});
|
|
224
223
|
const workspaceDeps = allDeps.filter(dep => workspacePackageNames.has(dep));
|
|
225
224
|
graph.set(packageJson.name, {
|
|
@@ -132,6 +132,7 @@ class WorkspacePlugin extends plugin_1.ManifestPlugin {
|
|
|
132
132
|
* being updated.
|
|
133
133
|
*/
|
|
134
134
|
buildGraphOrder(graph, packageNamesToUpdate) {
|
|
135
|
+
logger_1.logger.info(`building graph order, existing package names: ${packageNamesToUpdate}`);
|
|
135
136
|
// invert the graph so it's dependency name => packages that depend on it
|
|
136
137
|
const dependentGraph = this.invertGraph(graph);
|
|
137
138
|
const visited = new Set();
|
|
@@ -28,6 +28,7 @@ export interface BaseStrategyOptions {
|
|
|
28
28
|
versioningStrategy?: VersioningStrategy;
|
|
29
29
|
targetBranch: string;
|
|
30
30
|
changelogPath?: string;
|
|
31
|
+
changelogHost?: string;
|
|
31
32
|
changelogSections?: ChangelogSection[];
|
|
32
33
|
commitPartial?: string;
|
|
33
34
|
headerPartial?: string;
|
|
@@ -56,6 +57,7 @@ export declare abstract class BaseStrategy implements Strategy {
|
|
|
56
57
|
protected targetBranch: string;
|
|
57
58
|
protected repository: Repository;
|
|
58
59
|
protected changelogPath: string;
|
|
60
|
+
protected changelogHost?: string;
|
|
59
61
|
protected tagSeparator?: string;
|
|
60
62
|
private skipGitHubRelease;
|
|
61
63
|
private releaseAs?;
|
|
@@ -77,6 +79,7 @@ export declare abstract class BaseStrategy implements Strategy {
|
|
|
77
79
|
*/
|
|
78
80
|
getComponent(): Promise<string | undefined>;
|
|
79
81
|
getDefaultComponent(): Promise<string | undefined>;
|
|
82
|
+
protected getBranchComponent(): Promise<string | undefined>;
|
|
80
83
|
getPackageName(): Promise<string | undefined>;
|
|
81
84
|
getDefaultPackageName(): Promise<string | undefined>;
|
|
82
85
|
protected normalizeComponent(component: string | undefined): string;
|
|
@@ -47,6 +47,7 @@ class BaseStrategy {
|
|
|
47
47
|
this.targetBranch = options.targetBranch;
|
|
48
48
|
this.repository = options.github.repository;
|
|
49
49
|
this.changelogPath = options.changelogPath || DEFAULT_CHANGELOG_PATH;
|
|
50
|
+
this.changelogHost = options.changelogHost;
|
|
50
51
|
this.changelogSections = options.changelogSections;
|
|
51
52
|
this.tagSeparator = options.tagSeparator;
|
|
52
53
|
this.skipGitHubRelease = options.skipGitHubRelease || false;
|
|
@@ -72,6 +73,9 @@ class BaseStrategy {
|
|
|
72
73
|
var _a;
|
|
73
74
|
return this.normalizeComponent((_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName()));
|
|
74
75
|
}
|
|
76
|
+
async getBranchComponent() {
|
|
77
|
+
return this.component || (await this.getDefaultComponent());
|
|
78
|
+
}
|
|
75
79
|
async getPackageName() {
|
|
76
80
|
var _a;
|
|
77
81
|
return (_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName());
|
|
@@ -97,6 +101,7 @@ class BaseStrategy {
|
|
|
97
101
|
async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits) {
|
|
98
102
|
var _a;
|
|
99
103
|
return await this.changelogNotes.buildNotes(conventionalCommits, {
|
|
104
|
+
host: this.changelogHost,
|
|
100
105
|
owner: this.repository.owner,
|
|
101
106
|
repository: this.repository.repo,
|
|
102
107
|
version: newVersion.toString(),
|
|
@@ -141,8 +146,9 @@ class BaseStrategy {
|
|
|
141
146
|
const newVersionTag = new tag_name_1.TagName(newVersion, this.includeComponentInTag ? component : undefined, this.tagSeparator, this.includeVInTag);
|
|
142
147
|
logger_1.logger.debug('pull request title pattern:', this.pullRequestTitlePattern);
|
|
143
148
|
const pullRequestTitle = pull_request_title_1.PullRequestTitle.ofComponentTargetBranchVersion(component || '', this.targetBranch, newVersion, this.pullRequestTitlePattern);
|
|
144
|
-
const
|
|
145
|
-
|
|
149
|
+
const branchComponent = await this.getBranchComponent();
|
|
150
|
+
const branchName = branchComponent
|
|
151
|
+
? branch_name_1.BranchName.ofComponentTargetBranch(branchComponent, this.targetBranch)
|
|
146
152
|
: branch_name_1.BranchName.ofTargetBranch(this.targetBranch);
|
|
147
153
|
const releaseNotesBody = await this.buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits);
|
|
148
154
|
if (this.changelogEmpty(releaseNotesBody)) {
|
|
@@ -79,6 +79,7 @@ class PHPYoshi extends base_1.BaseStrategy {
|
|
|
79
79
|
const newVersion = await this.versioningStrategy.bump(version, splitCommits[directory]);
|
|
80
80
|
versionsMap.set(composer.name, newVersion);
|
|
81
81
|
const partialReleaseNotes = await this.changelogNotes.buildNotes(splitCommits[directory], {
|
|
82
|
+
host: this.changelogHost,
|
|
82
83
|
owner: this.repository.owner,
|
|
83
84
|
repository: this.repository.repo,
|
|
84
85
|
version: newVersion.toString(),
|
package/package.json
CHANGED