release-please 13.18.4 → 13.18.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,29 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ## [13.18.7](https://github.com/googleapis/release-please/compare/v13.18.6...v13.18.7) (2022-06-30)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * correctly parse the changelog-type from the manifest config ([#1498](https://github.com/googleapis/release-please/issues/1498)) ([452f084](https://github.com/googleapis/release-please/commit/452f084ef8f664830c560472802e5942804df02d))
13
+ * pull request title component can include '/' ([#1499](https://github.com/googleapis/release-please/issues/1499)) ([19a8e82](https://github.com/googleapis/release-please/commit/19a8e8263500dedd32f3b555a9f00f8627f27a6d))
14
+
15
+ ## [13.18.6](https://github.com/googleapis/release-please/compare/v13.18.5...v13.18.6) (2022-06-27)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **dotnet-yoshi:** autodetect component from path ([563ef02](https://github.com/googleapis/release-please/commit/563ef02210cc8bd52eedbfaa0a00787bc2e41ee6))
21
+ * **dotnet-yoshi:** handle existing google-cloud-dotnet history format ([#1486](https://github.com/googleapis/release-please/issues/1486)) ([563ef02](https://github.com/googleapis/release-please/commit/563ef02210cc8bd52eedbfaa0a00787bc2e41ee6))
22
+
23
+ ## [13.18.5](https://github.com/googleapis/release-please/compare/v13.18.4...v13.18.5) (2022-06-24)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **ruby-yoshi:** don't remove PR link from changelog ([#1479](https://github.com/googleapis/release-please/issues/1479)) ([6faaebe](https://github.com/googleapis/release-please/commit/6faaebe3c317bfa1b4d98992733283296bafa20f))
29
+
7
30
  ## [13.18.4](https://github.com/googleapis/release-please/compare/v13.18.3...v13.18.4) (2022-06-24)
8
31
 
9
32
 
@@ -933,7 +933,7 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
933
933
  return candidateTagVersion.sort((a, b) => b.compare(a))[0];
934
934
  }
935
935
  function mergeReleaserConfig(defaultConfig, pathConfig) {
936
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
936
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
937
937
  return {
938
938
  releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
939
939
  bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
@@ -941,19 +941,20 @@ function mergeReleaserConfig(defaultConfig, pathConfig) {
941
941
  changelogSections: (_e = pathConfig.changelogSections) !== null && _e !== void 0 ? _e : defaultConfig.changelogSections,
942
942
  changelogPath: (_f = pathConfig.changelogPath) !== null && _f !== void 0 ? _f : defaultConfig.changelogPath,
943
943
  changelogHost: (_g = pathConfig.changelogHost) !== null && _g !== void 0 ? _g : defaultConfig.changelogHost,
944
- releaseAs: (_h = pathConfig.releaseAs) !== null && _h !== void 0 ? _h : defaultConfig.releaseAs,
945
- skipGithubRelease: (_j = pathConfig.skipGithubRelease) !== null && _j !== void 0 ? _j : defaultConfig.skipGithubRelease,
946
- draft: (_k = pathConfig.draft) !== null && _k !== void 0 ? _k : defaultConfig.draft,
947
- prerelease: (_l = pathConfig.prerelease) !== null && _l !== void 0 ? _l : defaultConfig.prerelease,
948
- component: (_m = pathConfig.component) !== null && _m !== void 0 ? _m : defaultConfig.component,
949
- packageName: (_o = pathConfig.packageName) !== null && _o !== void 0 ? _o : defaultConfig.packageName,
950
- versionFile: (_p = pathConfig.versionFile) !== null && _p !== void 0 ? _p : defaultConfig.versionFile,
951
- extraFiles: (_q = pathConfig.extraFiles) !== null && _q !== void 0 ? _q : defaultConfig.extraFiles,
952
- includeComponentInTag: (_r = pathConfig.includeComponentInTag) !== null && _r !== void 0 ? _r : defaultConfig.includeComponentInTag,
953
- includeVInTag: (_s = pathConfig.includeVInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeVInTag,
954
- tagSeparator: (_t = pathConfig.tagSeparator) !== null && _t !== void 0 ? _t : defaultConfig.tagSeparator,
955
- pullRequestTitlePattern: (_u = pathConfig.pullRequestTitlePattern) !== null && _u !== void 0 ? _u : defaultConfig.pullRequestTitlePattern,
956
- separatePullRequests: (_v = pathConfig.separatePullRequests) !== null && _v !== void 0 ? _v : defaultConfig.separatePullRequests,
944
+ changelogType: (_h = pathConfig.changelogType) !== null && _h !== void 0 ? _h : defaultConfig.changelogType,
945
+ releaseAs: (_j = pathConfig.releaseAs) !== null && _j !== void 0 ? _j : defaultConfig.releaseAs,
946
+ skipGithubRelease: (_k = pathConfig.skipGithubRelease) !== null && _k !== void 0 ? _k : defaultConfig.skipGithubRelease,
947
+ draft: (_l = pathConfig.draft) !== null && _l !== void 0 ? _l : defaultConfig.draft,
948
+ prerelease: (_m = pathConfig.prerelease) !== null && _m !== void 0 ? _m : defaultConfig.prerelease,
949
+ component: (_o = pathConfig.component) !== null && _o !== void 0 ? _o : defaultConfig.component,
950
+ packageName: (_p = pathConfig.packageName) !== null && _p !== void 0 ? _p : defaultConfig.packageName,
951
+ versionFile: (_q = pathConfig.versionFile) !== null && _q !== void 0 ? _q : defaultConfig.versionFile,
952
+ extraFiles: (_r = pathConfig.extraFiles) !== null && _r !== void 0 ? _r : defaultConfig.extraFiles,
953
+ includeComponentInTag: (_s = pathConfig.includeComponentInTag) !== null && _s !== void 0 ? _s : defaultConfig.includeComponentInTag,
954
+ includeVInTag: (_t = pathConfig.includeVInTag) !== null && _t !== void 0 ? _t : defaultConfig.includeVInTag,
955
+ tagSeparator: (_u = pathConfig.tagSeparator) !== null && _u !== void 0 ? _u : defaultConfig.tagSeparator,
956
+ pullRequestTitlePattern: (_v = pathConfig.pullRequestTitlePattern) !== null && _v !== void 0 ? _v : defaultConfig.pullRequestTitlePattern,
957
+ separatePullRequests: (_w = pathConfig.separatePullRequests) !== null && _w !== void 0 ? _w : defaultConfig.separatePullRequests,
957
958
  };
958
959
  }
959
960
  /**
@@ -8,5 +8,6 @@ export declare class DotnetYoshi extends BaseStrategy {
8
8
  constructor(options: BaseStrategyOptions);
9
9
  protected buildReleaseNotes(conventionalCommits: ConventionalCommit[], newVersion: Version, newVersionTag: TagName, latestRelease?: Release): Promise<string>;
10
10
  private getApi;
11
+ getDefaultComponent(): Promise<string | undefined>;
11
12
  protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
12
13
  }
@@ -63,6 +63,11 @@ class DotnetYoshi extends base_1.BaseStrategy {
63
63
  throw e;
64
64
  }
65
65
  }
66
+ async getDefaultComponent() {
67
+ // default component is based on the path
68
+ const pathParts = this.path.split('/');
69
+ return pathParts[pathParts.length - 1];
70
+ }
66
71
  async buildUpdates(options) {
67
72
  const updates = [];
68
73
  const version = options.newVersion;
@@ -78,17 +83,18 @@ class DotnetYoshi extends base_1.BaseStrategy {
78
83
  updater: new changelog_1.Changelog({
79
84
  version,
80
85
  changelogEntry: options.changelogEntry,
86
+ versionHeaderRegex: '\n## Version [0-9[]+',
81
87
  }),
82
88
  });
83
89
  }
84
- if (!this.component) {
90
+ if (!component) {
85
91
  logger_1.logger.warn('Dotnet strategy expects to use components, could not update all files');
86
92
  return updates;
87
93
  }
88
94
  updates.push({
89
95
  path: 'apis/apis.json',
90
96
  createIfMissing: false,
91
- updater: new apis_1.Apis(this.component, version),
97
+ updater: new apis_1.Apis(component, version),
92
98
  });
93
99
  return updates;
94
100
  }
@@ -85,7 +85,7 @@ class RubyYoshi extends base_1.BaseStrategy {
85
85
  // Remove bolded scope from change lines
86
86
  .replace(/^\* \*\*[\w-]+:\*\* /gm, '* ')
87
87
  // Remove PR and commit links from pull request title suffixes
88
- .replace(/( \(\[(\w+|#\d+)\]\(https:\/\/github\.com\/[^)]*\)\))+\s*$/gm, '')
88
+ .replace(/(\(\[(\w+)\]\(https:\/\/github\.com\/[^)]*\)\))+\s*$/gm, '')
89
89
  // Standardize on h4 for change type subheaders
90
90
  .replace(/^### (Features|Bug Fixes|Documentation)$/gm, '#### $1')
91
91
  // Collapse 2 or more blank lines
@@ -1,9 +1,11 @@
1
1
  import { DefaultUpdater, UpdateOptions } from './default';
2
2
  interface ChangelogOptions extends UpdateOptions {
3
3
  changelogEntry: string;
4
+ versionHeaderRegex?: string;
4
5
  }
5
6
  export declare class Changelog extends DefaultUpdater {
6
7
  changelogEntry: string;
8
+ readonly versionHeaderRegex: RegExp;
7
9
  constructor(options: ChangelogOptions);
8
10
  updateContent(content: string | undefined): string;
9
11
  private header;
@@ -15,15 +15,18 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.Changelog = void 0;
17
17
  const default_1 = require("./default");
18
+ const DEFAULT_VERSION_HEADER_REGEX = '\n###? v?[0-9[]';
18
19
  class Changelog extends default_1.DefaultUpdater {
19
20
  constructor(options) {
21
+ var _a;
20
22
  super(options);
21
23
  this.changelogEntry = options.changelogEntry;
24
+ this.versionHeaderRegex = new RegExp((_a = options.versionHeaderRegex) !== null && _a !== void 0 ? _a : DEFAULT_VERSION_HEADER_REGEX, 's');
22
25
  }
23
26
  updateContent(content) {
24
27
  content = content || '';
25
28
  // Handle both H2 (features/BREAKING CHANGES) and H3 (fixes).
26
- const lastEntryIndex = content.search(/\n###? v?[0-9[]/s);
29
+ const lastEntryIndex = content.search(this.versionHeaderRegex);
27
30
  if (lastEntryIndex === -1) {
28
31
  return `${this.header()}\n${this.changelogEntry}\n`;
29
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../src/updaters/changelog.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;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CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;QAC7C,IAAI,CAAC,kBAAkB,GAAG,IAAI,MAAM,CAClC,MAAA,OAAO,CAAC,kBAAkB,mCAAI,4BAA4B,EAC1D,GAAG,CACJ,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,OAA2B;QACvC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,6DAA6D;QAC7D,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QAC/D,IAAI,cAAc,KAAK,CAAC,CAAC,EAAE;YACzB,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,cAAc,IAAI,CAAC;SACrD;aAAM;YACL,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;YAChD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC5C,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC,cAAc,KAAK,KAAK,EAAE,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;SACpE;IACH,CAAC;IACO,MAAM;QACZ,OAAO;;CAEV,CAAC;IACA,CAAC;CACF;AA9BD,8BA8BC"}
@@ -34,7 +34,7 @@ function generateMatchPattern(pullRequestTitlePattern) {
34
34
  .replace('[', '\\[') // TODO: handle all regex escaping
35
35
  .replace(']', '\\]')
36
36
  .replace('${scope}', '(\\((?<branch>[\\w-./]+)\\))?')
37
- .replace('${component}', ' ?(?<component>[\\w-.]*)?')
37
+ .replace('${component}', ' ?(?<component>[\\w-./]*)?')
38
38
  .replace('${version}', 'v?(?<version>[0-9].*)')
39
39
  .replace('${branch}', '(?<branch>[\\w-./]+)?')}$`);
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "13.18.4",
3
+ "version": "13.18.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",