release-please 14.17.3 → 14.17.5

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,20 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ## [14.17.5](https://github.com/googleapis/release-please/compare/v14.17.4...v14.17.5) (2022-12-08)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **expo:** Android version now correctly builds as a number ([#1770](https://github.com/googleapis/release-please/issues/1770)) ([d54483b](https://github.com/googleapis/release-please/commit/d54483be6d307aea75797f6a5bcfa6679b64088f))
13
+
14
+ ## [14.17.4](https://github.com/googleapis/release-please/compare/v14.17.3...v14.17.4) (2022-12-01)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * Pass group-pull-request-title-pattern to strategies to parse releases ([#1760](https://github.com/googleapis/release-please/issues/1760)) ([f7601e4](https://github.com/googleapis/release-please/commit/f7601e423a267861fb86a441d1835ddf6da07a83))
20
+
7
21
  ## [14.17.3](https://github.com/googleapis/release-please/compare/v14.17.2...v14.17.3) (2022-11-26)
8
22
 
9
23
 
@@ -587,7 +587,9 @@ class Manifest {
587
587
  this.logger.debug(`type: ${config.releaseType}`);
588
588
  this.logger.debug(`targetBranch: ${this.targetBranch}`);
589
589
  const strategy = strategiesByPath[path];
590
- const release = await strategy.buildRelease(pullRequest);
590
+ const release = await strategy.buildRelease(pullRequest, {
591
+ groupPullRequestTitlePattern: this.groupPullRequestTitlePattern,
592
+ });
591
593
  if (release) {
592
594
  releases.push({
593
595
  ...release,
@@ -116,9 +116,10 @@ class LinkedVersions extends plugin_1.ManifestPlugin {
116
116
  }
117
117
  return collection;
118
118
  }, [[], []]);
119
+ this.logger.info(`found ${inScopeCandidates.length} linked-versions candidates`);
119
120
  // delegate to the merge plugin and add merged pull request
120
121
  if (inScopeCandidates.length > 0) {
121
- const merge = new merge_1.Merge(this.github, this.targetBranch, this.repositoryConfig, `chore\${branch}: release ${this.groupName} libraries`);
122
+ const merge = new merge_1.Merge(this.github, this.targetBranch, this.repositoryConfig, `chore\${scope}: release ${this.groupName} libraries`);
122
123
  const merged = await merge.run(inScopeCandidates);
123
124
  outOfScopeCandidates.push(...merged);
124
125
  }
@@ -1,4 +1,4 @@
1
- import { Strategy } from '../strategy';
1
+ import { Strategy, BuildReleaseOptions } from '../strategy';
2
2
  import { GitHub } from '../github';
3
3
  import { VersioningStrategy } from '../versioning-strategy';
4
4
  import { Repository } from '../repository';
@@ -125,7 +125,7 @@ export declare abstract class BaseStrategy implements Strategy {
125
125
  * @param {PullRequest} mergedPullRequest The merged release pull request.
126
126
  * @returns {Release} The candidate release.
127
127
  */
128
- buildRelease(mergedPullRequest: PullRequest): Promise<Release | undefined>;
128
+ buildRelease(mergedPullRequest: PullRequest, options?: BuildReleaseOptions): Promise<Release | undefined>;
129
129
  isPublishedVersion(_version: Version): boolean;
130
130
  /**
131
131
  * Override this to handle the initial version of a new library.
@@ -288,7 +288,8 @@ class BaseStrategy {
288
288
  * @param {PullRequest} mergedPullRequest The merged release pull request.
289
289
  * @returns {Release} The candidate release.
290
290
  */
291
- async buildRelease(mergedPullRequest) {
291
+ async buildRelease(mergedPullRequest, options) {
292
+ var _a;
292
293
  if (this.skipGitHubRelease) {
293
294
  this.logger.info('Release skipped from strategy config');
294
295
  return;
@@ -297,8 +298,9 @@ class BaseStrategy {
297
298
  this.logger.error('Pull request should have been merged');
298
299
  return;
299
300
  }
301
+ const mergedTitlePattern = (_a = options === null || options === void 0 ? void 0 : options.groupPullRequestTitlePattern) !== null && _a !== void 0 ? _a : manifest_1.MANIFEST_PULL_REQUEST_TITLE_PATTERN;
300
302
  const pullRequestTitle = pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, this.pullRequestTitlePattern, this.logger) ||
301
- pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, manifest_1.MANIFEST_PULL_REQUEST_TITLE_PATTERN, this.logger);
303
+ pull_request_title_1.PullRequestTitle.parse(mergedPullRequest.title, mergedTitlePattern, this.logger);
302
304
  if (!pullRequestTitle) {
303
305
  this.logger.error(`Bad pull request title: '${mergedPullRequest.title}'`);
304
306
  return;
@@ -5,6 +5,9 @@ import { Commit } from './commit';
5
5
  import { VersioningStrategy } from './versioning-strategy';
6
6
  import { ChangelogNotes } from './changelog-notes';
7
7
  import { Version } from './version';
8
+ export interface BuildReleaseOptions {
9
+ groupPullRequestTitlePattern?: string;
10
+ }
8
11
  /**
9
12
  * A strategy is responsible for determining which files are
10
13
  * necessary to update in a release pull request.
@@ -30,7 +33,7 @@ export interface Strategy {
30
33
  * @param {PullRequest} mergedPullRequest The merged release pull request.
31
34
  * @returns {Release} The candidate release.
32
35
  */
33
- buildRelease(mergedPullRequest: PullRequest): Promise<Release | undefined>;
36
+ buildRelease(mergedPullRequest: PullRequest, options?: BuildReleaseOptions): Promise<Release | undefined>;
34
37
  /**
35
38
  * Return the component for this strategy. This may be a computed field.
36
39
  * @returns {string}
@@ -8,7 +8,7 @@ export interface AppJson {
8
8
  buildNumber?: string;
9
9
  };
10
10
  android?: {
11
- versionCode?: string;
11
+ versionCode?: number;
12
12
  };
13
13
  };
14
14
  }
@@ -58,7 +58,7 @@ class AppJson extends default_1.DefaultUpdater {
58
58
  this.version.minor * 100 +
59
59
  this.version.patch;
60
60
  logger.info(`updating Android version from ${parsed.expo.android.versionCode} to ${versionCode}`);
61
- parsed.expo.android.versionCode = versionCode.toString();
61
+ parsed.expo.android.versionCode = versionCode;
62
62
  }
63
63
  return (0, json_stringify_1.jsonStringify)(parsed, content);
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "14.17.3",
3
+ "version": "14.17.5",
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",
@@ -63,7 +63,7 @@
63
63
  "gts": "^3.1.0",
64
64
  "mocha": "^9.2.2",
65
65
  "nock": "^13.0.0",
66
- "sinon": "14.0.2",
66
+ "sinon": "15.0.0",
67
67
  "snap-shot-it": "^7.0.0"
68
68
  },
69
69
  "dependencies": {