release-please 13.13.0 → 13.15.1

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,28 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ### [13.15.1](https://github.com/googleapis/release-please/compare/v13.15.0...v13.15.1) (2022-05-05)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **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))
13
+ * 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)
14
+
15
+ ## [13.15.0](https://github.com/googleapis/release-please/compare/v13.14.0...v13.15.0) (2022-04-27)
16
+
17
+
18
+ ### Features
19
+
20
+ * allow configuring changelog-host ([#1408](https://github.com/googleapis/release-please/issues/1408)) ([d7d525f](https://github.com/googleapis/release-please/commit/d7d525f283f931dd999ca69228e71dd6adf9e0c3))
21
+
22
+ ## [13.14.0](https://github.com/googleapis/release-please/compare/v13.13.0...v13.14.0) (2022-04-20)
23
+
24
+
25
+ ### Features
26
+
27
+ * Support sequential-calls manifest field that disables concurrency when creating multiple pull requests or releases ([#1401](https://github.com/googleapis/release-please/issues/1401)) ([50f5c99](https://github.com/googleapis/release-please/commit/50f5c990b99d991b874ba88556386c6b940743f6))
28
+
7
29
  ## [13.13.0](https://github.com/googleapis/release-please/compare/v13.12.0...v13.13.0) (2022-04-18)
8
30
 
9
31
 
@@ -55,6 +55,7 @@ interface PullRequestStrategyArgs {
55
55
  snapshot?: boolean;
56
56
  changelogSections?: ChangelogSection[];
57
57
  changelogPath?: string;
58
+ changelogHost?: string;
58
59
  versioningStrategy?: VersioningStrategyType;
59
60
  versionFile?: string;
60
61
  extraFiles?: string[];
@@ -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,
@@ -42,6 +42,7 @@ export interface ReleaserConfig {
42
42
  changelogSections?: ChangelogSection[];
43
43
  changelogPath?: string;
44
44
  changelogType?: ChangelogNotesType;
45
+ changelogHost?: string;
45
46
  versionFile?: string;
46
47
  extraFiles?: ExtraFile[];
47
48
  snapshotLabels?: string[];
@@ -72,6 +73,7 @@ interface ReleaserConfigJson {
72
73
  'include-component-in-tag'?: boolean;
73
74
  'include-v-in-tag'?: boolean;
74
75
  'changelog-type'?: ChangelogNotesType;
76
+ 'changelog-host'?: string;
75
77
  'pull-request-title-pattern'?: string;
76
78
  'tag-separator'?: string;
77
79
  'extra-files'?: string[];
@@ -88,9 +90,10 @@ export interface ManifestOptions {
88
90
  signoff?: string;
89
91
  manifestPath?: string;
90
92
  labels?: string[];
91
- skipLabeling?: boolean;
92
93
  releaseLabels?: string[];
93
94
  snapshotLabels?: string[];
95
+ skipLabeling?: boolean;
96
+ sequentialCalls?: boolean;
94
97
  draft?: boolean;
95
98
  prerelease?: boolean;
96
99
  draftPullRequest?: boolean;
@@ -126,6 +129,7 @@ export interface ManifestConfig extends ReleaserConfigJson {
126
129
  'group-pull-request-title-pattern'?: string;
127
130
  'release-search-depth'?: number;
128
131
  'commit-search-depth'?: number;
132
+ 'sequential-calls'?: boolean;
129
133
  }
130
134
  export declare type ReleasedVersions = Record<string, Version>;
131
135
  export declare type RepositoryConfig = Record<string, ReleaserConfig>;
@@ -156,6 +160,7 @@ export declare class Manifest {
156
160
  private signoffUser?;
157
161
  private labels;
158
162
  private skipLabeling?;
163
+ private sequentialCalls?;
159
164
  private releaseLabels;
160
165
  private snapshotLabels;
161
166
  private plugins;
@@ -247,7 +252,7 @@ export declare class Manifest {
247
252
  /**
248
253
  * Opens/updates all candidate release pull requests for this repository.
249
254
  *
250
- * @returns {number[]} Pull request numbers of release pull requests
255
+ * @returns {PullRequest[]} Pull request numbers of release pull requests
251
256
  */
252
257
  createPullRequests(): Promise<(PullRequest | undefined)[]>;
253
258
  private findOpenReleasePullRequests;
@@ -79,6 +79,7 @@ class Manifest {
79
79
  (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.releaseLabels) || exports.DEFAULT_RELEASE_LABELS;
80
80
  this.labels = (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.labels) || exports.DEFAULT_LABELS;
81
81
  this.skipLabeling = (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.skipLabeling) || false;
82
+ this.sequentialCalls = (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.sequentialCalls) || false;
82
83
  this.snapshotLabels =
83
84
  (manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.snapshotLabels) || exports.DEFAULT_SNAPSHOT_LABELS;
84
85
  this.bootstrapSha = manifestOptions === null || manifestOptions === void 0 ? void 0 : manifestOptions.bootstrapSha;
@@ -400,7 +401,7 @@ class Manifest {
400
401
  /**
401
402
  * Opens/updates all candidate release pull requests for this repository.
402
403
  *
403
- * @returns {number[]} Pull request numbers of release pull requests
404
+ * @returns {PullRequest[]} Pull request numbers of release pull requests
404
405
  */
405
406
  async createPullRequests() {
406
407
  const candidatePullRequests = await this.buildPullRequests();
@@ -417,13 +418,24 @@ class Manifest {
417
418
  // collect open and snoozed release pull requests
418
419
  const openPullRequests = await this.findOpenReleasePullRequests();
419
420
  const snoozedPullRequests = await this.findSnoozedReleasePullRequests();
420
- const promises = [];
421
- for (const pullRequest of candidatePullRequests) {
422
- promises.push(this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests));
421
+ if (this.sequentialCalls) {
422
+ const pullRequests = [];
423
+ for (const pullRequest of candidatePullRequests) {
424
+ const resultPullRequest = await this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests);
425
+ if (resultPullRequest)
426
+ pullRequests.push(resultPullRequest);
427
+ }
428
+ return pullRequests;
429
+ }
430
+ else {
431
+ const promises = [];
432
+ for (const pullRequest of candidatePullRequests) {
433
+ promises.push(this.createOrUpdatePullRequest(pullRequest, openPullRequests, snoozedPullRequests));
434
+ }
435
+ const pullNumbers = await Promise.all(promises);
436
+ // reject any pull numbers that were not created or updated
437
+ return pullNumbers.filter(number => !!number);
423
438
  }
424
- const pullNumbers = await Promise.all(promises);
425
- // reject any pull numbers that were not created or updated
426
- return pullNumbers.filter(number => !!number);
427
439
  }
428
440
  async findOpenReleasePullRequests() {
429
441
  logger_1.logger.info('Looking for open release pull requests');
@@ -573,12 +585,22 @@ class Manifest {
573
585
  releasesByPullRequest[release.pullRequest.number] = [release];
574
586
  }
575
587
  }
576
- const promises = [];
577
- for (const pullNumber in releasesByPullRequest) {
578
- promises.push(this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]));
588
+ if (this.sequentialCalls) {
589
+ const resultReleases = [];
590
+ for (const pullNumber in releasesByPullRequest) {
591
+ const releases = await this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]);
592
+ resultReleases.concat(releases);
593
+ }
594
+ return resultReleases;
595
+ }
596
+ else {
597
+ const promises = [];
598
+ for (const pullNumber in releasesByPullRequest) {
599
+ promises.push(this.createReleasesForPullRequest(releasesByPullRequest[pullNumber], pullRequestsByNumber[pullNumber]));
600
+ }
601
+ const releases = await Promise.all(promises);
602
+ return releases.reduce((collection, r) => collection.concat(r), []);
579
603
  }
580
- const releases = await Promise.all(promises);
581
- return releases.reduce((collection, r) => collection.concat(r), []);
582
604
  }
583
605
  async createReleasesForPullRequest(releases, pullRequest) {
584
606
  // create the release
@@ -678,6 +700,7 @@ function extractReleaserConfig(config) {
678
700
  bumpPatchForMinorPreMajor: config['bump-patch-for-minor-pre-major'],
679
701
  changelogSections: config['changelog-sections'],
680
702
  changelogPath: config['changelog-path'],
703
+ changelogHost: config['changelog-host'],
681
704
  releaseAs: config['release-as'],
682
705
  skipGithubRelease: config['skip-github-release'],
683
706
  draft: config.draft,
@@ -731,6 +754,7 @@ async function parseConfig(github, configFile, branch, onlyPath, releaseAs) {
731
754
  snapshotLabels: configSnapshotLabel === undefined ? undefined : [configSnapshotLabel],
732
755
  releaseSearchDepth: config['release-search-depth'],
733
756
  commitSearchDepth: config['commit-search-depth'],
757
+ sequentialCalls: config['sequential-calls'],
734
758
  };
735
759
  return { config: repositoryConfig, options: manifestOptions };
736
760
  }
@@ -849,25 +873,26 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, prefix,
849
873
  return candidateTagVersion.sort((a, b) => b.compare(a))[0];
850
874
  }
851
875
  function mergeReleaserConfig(defaultConfig, pathConfig) {
852
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
876
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
853
877
  return {
854
878
  releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
855
879
  bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
856
880
  bumpPatchForMinorPreMajor: (_d = pathConfig.bumpPatchForMinorPreMajor) !== null && _d !== void 0 ? _d : defaultConfig.bumpPatchForMinorPreMajor,
857
881
  changelogSections: (_e = pathConfig.changelogSections) !== null && _e !== void 0 ? _e : defaultConfig.changelogSections,
858
882
  changelogPath: (_f = pathConfig.changelogPath) !== null && _f !== void 0 ? _f : defaultConfig.changelogPath,
859
- releaseAs: (_g = pathConfig.releaseAs) !== null && _g !== void 0 ? _g : defaultConfig.releaseAs,
860
- skipGithubRelease: (_h = pathConfig.skipGithubRelease) !== null && _h !== void 0 ? _h : defaultConfig.skipGithubRelease,
861
- draft: (_j = pathConfig.draft) !== null && _j !== void 0 ? _j : defaultConfig.draft,
862
- prerelease: (_k = pathConfig.prerelease) !== null && _k !== void 0 ? _k : defaultConfig.prerelease,
863
- component: (_l = pathConfig.component) !== null && _l !== void 0 ? _l : defaultConfig.component,
864
- packageName: (_m = pathConfig.packageName) !== null && _m !== void 0 ? _m : defaultConfig.packageName,
865
- versionFile: (_o = pathConfig.versionFile) !== null && _o !== void 0 ? _o : defaultConfig.versionFile,
866
- extraFiles: (_p = pathConfig.extraFiles) !== null && _p !== void 0 ? _p : defaultConfig.extraFiles,
867
- includeComponentInTag: (_q = pathConfig.includeComponentInTag) !== null && _q !== void 0 ? _q : defaultConfig.includeComponentInTag,
868
- includeVInTag: (_r = pathConfig.includeVInTag) !== null && _r !== void 0 ? _r : defaultConfig.includeVInTag,
869
- tagSeparator: (_s = pathConfig.tagSeparator) !== null && _s !== void 0 ? _s : defaultConfig.tagSeparator,
870
- pullRequestTitlePattern: (_t = pathConfig.pullRequestTitlePattern) !== null && _t !== void 0 ? _t : defaultConfig.pullRequestTitlePattern,
883
+ changelogHost: (_g = pathConfig.changelogHost) !== null && _g !== void 0 ? _g : defaultConfig.changelogHost,
884
+ releaseAs: (_h = pathConfig.releaseAs) !== null && _h !== void 0 ? _h : defaultConfig.releaseAs,
885
+ skipGithubRelease: (_j = pathConfig.skipGithubRelease) !== null && _j !== void 0 ? _j : defaultConfig.skipGithubRelease,
886
+ draft: (_k = pathConfig.draft) !== null && _k !== void 0 ? _k : defaultConfig.draft,
887
+ prerelease: (_l = pathConfig.prerelease) !== null && _l !== void 0 ? _l : defaultConfig.prerelease,
888
+ component: (_m = pathConfig.component) !== null && _m !== void 0 ? _m : defaultConfig.component,
889
+ packageName: (_o = pathConfig.packageName) !== null && _o !== void 0 ? _o : defaultConfig.packageName,
890
+ versionFile: (_p = pathConfig.versionFile) !== null && _p !== void 0 ? _p : defaultConfig.versionFile,
891
+ extraFiles: (_q = pathConfig.extraFiles) !== null && _q !== void 0 ? _q : defaultConfig.extraFiles,
892
+ includeComponentInTag: (_r = pathConfig.includeComponentInTag) !== null && _r !== void 0 ? _r : defaultConfig.includeComponentInTag,
893
+ includeVInTag: (_s = pathConfig.includeVInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeVInTag,
894
+ tagSeparator: (_t = pathConfig.tagSeparator) !== null && _t !== void 0 ? _t : defaultConfig.tagSeparator,
895
+ pullRequestTitlePattern: (_u = pathConfig.pullRequestTitlePattern) !== null && _u !== void 0 ? _u : defaultConfig.pullRequestTitlePattern,
871
896
  };
872
897
  }
873
898
  /**
@@ -1,8 +1,7 @@
1
- import { CandidateReleasePullRequest, RepositoryConfig } from '../manifest';
2
- import { WorkspacePlugin, DependencyGraph, WorkspacePluginOptions } from './workspace';
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);
@@ -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, _d;
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?;
@@ -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;
@@ -97,6 +98,7 @@ class BaseStrategy {
97
98
  async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits) {
98
99
  var _a;
99
100
  return await this.changelogNotes.buildNotes(conventionalCommits, {
101
+ host: this.changelogHost,
100
102
  owner: this.repository.owner,
101
103
  repository: this.repository.repo,
102
104
  version: newVersion.toString(),
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "13.13.0",
3
+ "version": "13.15.1",
4
4
  "description": "generate release PRs based on the conventionalcommits.org spec",
5
5
  "main": "./build/src/index.js",
6
6
  "bin": "./build/src/bin/release-please.js",