release-please 13.19.4 → 13.19.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,27 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ## [13.19.7](https://github.com/googleapis/release-please/compare/v13.19.6...v13.19.7) (2022-08-03)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * handles pull request iterator when graphQL returns no files ([#1544](https://github.com/googleapis/release-please/issues/1544)) ([7d0f873](https://github.com/googleapis/release-please/commit/7d0f87361f9ddd3f55eb2f40ef7150c9b7f39f34))
13
+
14
+ ## [13.19.6](https://github.com/googleapis/release-please/compare/v13.19.5...v13.19.6) (2022-07-27)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * skip component when manifest release does not include component ([#1537](https://github.com/googleapis/release-please/issues/1537)) ([8f1a3a8](https://github.com/googleapis/release-please/commit/8f1a3a84a7abc81c47d8cac9295e58bc37cc92c5)), closes [#1536](https://github.com/googleapis/release-please/issues/1536)
20
+
21
+ ## [13.19.5](https://github.com/googleapis/release-please/compare/v13.19.4...v13.19.5) (2022-07-26)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * **dart:** add multiline flag to replace regex ([#1524](https://github.com/googleapis/release-please/issues/1524)) ([fd7b73b](https://github.com/googleapis/release-please/commit/fd7b73b8f9288dbfa84f37a6ce2e77f6c1b49db8)), closes [#1523](https://github.com/googleapis/release-please/issues/1523)
27
+
7
28
  ## [13.19.4](https://github.com/googleapis/release-please/compare/v13.19.3...v13.19.4) (2022-07-25)
8
29
 
9
30
 
@@ -697,16 +697,16 @@ class GitHub {
697
697
  return {
698
698
  pageInfo: response.repository.pullRequests.pageInfo,
699
699
  data: pullRequests.map(pullRequest => {
700
- var _a;
700
+ var _a, _b, _c;
701
701
  return {
702
702
  sha: (_a = pullRequest.mergeCommit) === null || _a === void 0 ? void 0 : _a.oid,
703
703
  number: pullRequest.number,
704
704
  baseBranchName: pullRequest.baseRefName,
705
705
  headBranchName: pullRequest.headRefName,
706
- labels: (pullRequest.labels.nodes || []).map(l => l.name),
706
+ labels: (((_b = pullRequest.labels) === null || _b === void 0 ? void 0 : _b.nodes) || []).map(l => l.name),
707
707
  title: pullRequest.title,
708
708
  body: pullRequest.body + '',
709
- files: pullRequest.files.nodes.map(node => node.path),
709
+ files: (((_c = pullRequest.files) === null || _c === void 0 ? void 0 : _c.nodes) || []).map(node => node.path),
710
710
  };
711
711
  }),
712
712
  };
@@ -289,11 +289,17 @@ class BaseStrategy {
289
289
  releaseData = pullRequestBody.releaseData[0];
290
290
  }
291
291
  else {
292
- // manifest release with multiple components
293
- releaseData = pullRequestBody.releaseData.find(releaseData => {
294
- return (this.normalizeComponent(releaseData.component) ===
292
+ // manifest release with multiple components - find the release notes
293
+ // for the component to see if it was included in this release (parsed
294
+ // from the release pull request body)
295
+ releaseData = pullRequestBody.releaseData.find(datum => {
296
+ return (this.normalizeComponent(datum.component) ===
295
297
  this.normalizeComponent(component));
296
298
  });
299
+ if (!releaseData && pullRequestBody.releaseData.length > 0) {
300
+ logger_1.logger.info(`Pull request contains releases, but not for component: ${component}`);
301
+ return;
302
+ }
297
303
  }
298
304
  const notes = releaseData === null || releaseData === void 0 ? void 0 : releaseData.notes;
299
305
  if (notes === undefined) {
@@ -26,19 +26,24 @@ class PubspecYaml extends default_1.DefaultUpdater {
26
26
  * @returns {string} The updated content
27
27
  */
28
28
  updateContent(content) {
29
- const oldVersion = content.match(/version: ([0-9.]+)\+?([0-9]*$)/);
29
+ const oldVersion = content.match(/^version: ([0-9.]+)\+?(.*$)/m);
30
30
  let buildNumber = '';
31
31
  if (oldVersion) {
32
- buildNumber = `${oldVersion[2]}`;
33
- if (buildNumber.length > 0) {
32
+ buildNumber = oldVersion[2];
33
+ const parsedBuild = parseInt(buildNumber);
34
+ if (!isNaN(parsedBuild)) {
35
+ buildNumber = `+${parsedBuild + 1}`;
36
+ logger_1.logger.info(`updating from ${oldVersion[1]}+${oldVersion[2]} to ${this.version}${buildNumber}`);
37
+ }
38
+ else if (buildNumber.length > 0) {
34
39
  buildNumber = `+${buildNumber}`;
35
- logger_1.logger.info(`updating from ${oldVersion[1]}${buildNumber} to ${this.version}${buildNumber}`);
40
+ logger_1.logger.info(`updating from ${oldVersion[1]}+${oldVersion[2]} to ${this.version}${buildNumber}`);
36
41
  }
37
42
  else {
38
43
  logger_1.logger.info(`updating from ${oldVersion[1]} to ${this.version}`);
39
44
  }
40
45
  }
41
- return content.replace(/version: ([0-9.]+)\+?([0-9]*$)/, `version: ${this.version}${buildNumber}`);
46
+ return content.replace(/^version: .*$/m, `version: ${this.version}${buildNumber}`);
42
47
  }
43
48
  }
44
49
  exports.PubspecYaml = PubspecYaml;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "13.19.4",
3
+ "version": "13.19.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",