release-please 13.4.6 → 13.4.7

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.4.7](https://github.com/googleapis/release-please/compare/v13.4.6...v13.4.7) (2022-02-02)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * php-yoshi strategy should handle custom changelog secctions ([#1277](https://github.com/googleapis/release-please/issues/1277)) ([bd74a5b](https://github.com/googleapis/release-please/commit/bd74a5b7b622a6cec0d64cbf9b9e01102dc835b2))
13
+
7
14
  ### [13.4.6](https://github.com/googleapis/release-please/compare/v13.4.5...v13.4.6) (2022-02-01)
8
15
 
9
16
 
@@ -47,7 +47,7 @@ export declare abstract class BaseStrategy implements Strategy {
47
47
  readonly path: string;
48
48
  protected github: GitHub;
49
49
  protected component?: string;
50
- protected packageName?: string;
50
+ private packageName?;
51
51
  readonly versioningStrategy: VersioningStrategy;
52
52
  protected targetBranch: string;
53
53
  protected repository: Repository;
@@ -72,6 +72,7 @@ export declare abstract class BaseStrategy implements Strategy {
72
72
  */
73
73
  getComponent(): Promise<string | undefined>;
74
74
  getDefaultComponent(): Promise<string | undefined>;
75
+ getPackageName(): Promise<string | undefined>;
75
76
  getDefaultPackageName(): Promise<string | undefined>;
76
77
  protected normalizeComponent(component: string | undefined): string;
77
78
  /**
@@ -68,8 +68,13 @@ class BaseStrategy {
68
68
  var _a;
69
69
  return this.normalizeComponent((_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName()));
70
70
  }
71
+ async getPackageName() {
72
+ var _a;
73
+ return (_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName());
74
+ }
71
75
  async getDefaultPackageName() {
72
- return '';
76
+ var _a;
77
+ return (_a = this.packageName) !== null && _a !== void 0 ? _a : '';
73
78
  }
74
79
  normalizeComponent(component) {
75
80
  if (!component) {
@@ -118,7 +123,6 @@ class BaseStrategy {
118
123
  * open a pull request.
119
124
  */
120
125
  async buildReleasePullRequest(commits, latestRelease, draft, labels = []) {
121
- var _a;
122
126
  const conventionalCommits = await this.postProcessCommits(commit_1.parseConventionalCommits(commits));
123
127
  logger_1.logger.info(`Considering: ${conventionalCommits.length} commits`);
124
128
  if (conventionalCommits.length === 0) {
@@ -127,8 +131,6 @@ class BaseStrategy {
127
131
  }
128
132
  const newVersion = await this.buildNewVersion(conventionalCommits, latestRelease);
129
133
  const versionsMap = await this.updateVersionsMap(await this.buildVersionsMap(conventionalCommits), conventionalCommits);
130
- this.packageName = (_a = this.packageName) !== null && _a !== void 0 ? _a : (await this.getDefaultPackageName());
131
- logger_1.logger.debug('packageName', this.packageName);
132
134
  const component = await this.getComponent();
133
135
  logger_1.logger.debug('component:', component);
134
136
  const newVersionTag = new tag_name_1.TagName(newVersion, this.includeComponentInTag ? component : undefined, this.tagSeparator);
@@ -21,9 +21,10 @@ const changelog_1 = require("../updaters/changelog");
21
21
  const package_json_1 = require("../updaters/node/package-json");
22
22
  class Node extends base_1.BaseStrategy {
23
23
  async buildUpdates(options) {
24
+ var _a;
24
25
  const updates = [];
25
26
  const version = options.newVersion;
26
- const packageName = this.packageName || '';
27
+ const packageName = (_a = (await this.getPackageName())) !== null && _a !== void 0 ? _a : '';
27
28
  const lockFiles = ['package-lock.json', 'npm-shrinkwrap.json'];
28
29
  lockFiles.forEach(lockFile => {
29
30
  updates.push({
@@ -84,6 +84,7 @@ class PHPYoshi extends base_1.BaseStrategy {
84
84
  previousTag: (_a = latestRelease === null || latestRelease === void 0 ? void 0 : latestRelease.tag) === null || _a === void 0 ? void 0 : _a.toString(),
85
85
  currentTag: newVersionTag.toString(),
86
86
  targetBranch: this.targetBranch,
87
+ changelogSections: this.changelogSections,
87
88
  });
88
89
  releaseNotesBody = updatePHPChangelogEntry(`${composer.name} ${newVersion.toString()}`, releaseNotesBody, partialReleaseNotes);
89
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "13.4.6",
3
+ "version": "13.4.7",
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",
@@ -53,7 +53,7 @@
53
53
  "gts": "^3.0.0",
54
54
  "mocha": "^9.0.0",
55
55
  "nock": "^13.0.0",
56
- "sinon": "13.0.0",
56
+ "sinon": "13.0.1",
57
57
  "snap-shot-it": "^7.0.0"
58
58
  },
59
59
  "dependencies": {