release-please 13.18.3 → 13.18.6

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.6](https://github.com/googleapis/release-please/compare/v13.18.5...v13.18.6) (2022-06-27)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **dotnet-yoshi:** autodetect component from path ([563ef02](https://github.com/googleapis/release-please/commit/563ef02210cc8bd52eedbfaa0a00787bc2e41ee6))
13
+ * **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))
14
+
15
+ ## [13.18.5](https://github.com/googleapis/release-please/compare/v13.18.4...v13.18.5) (2022-06-24)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **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))
21
+
22
+ ## [13.18.4](https://github.com/googleapis/release-please/compare/v13.18.3...v13.18.4) (2022-06-24)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **cli:** pass GitHub API URLs from options to builder ([#1481](https://github.com/googleapis/release-please/issues/1481)) ([44b39ba](https://github.com/googleapis/release-please/commit/44b39baf90c19db1440f142eddd9cf9ed99c2da3))
28
+ * **go:** hide unwanted changelog sections ([#1483](https://github.com/googleapis/release-please/issues/1483)) ([60ed310](https://github.com/googleapis/release-please/commit/60ed310caf8895501d31efc6a5e28a3855b5cd78))
29
+
7
30
  ## [13.18.3](https://github.com/googleapis/release-please/compare/v13.18.2...v13.18.3) (2022-06-08)
8
31
 
9
32
 
@@ -493,6 +493,8 @@ async function buildGitHub(argv) {
493
493
  owner,
494
494
  repo,
495
495
  token: argv.token,
496
+ apiUrl: argv.apiUrl,
497
+ graphqlUrl: argv.graphqlUrl,
496
498
  });
497
499
  return github;
498
500
  }
@@ -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
  }
@@ -20,13 +20,29 @@ const version_1 = require("../version");
20
20
  const version_go_1 = require("../updaters/go/version-go");
21
21
  const logger_1 = require("../util/logger");
22
22
  const path_1 = require("path");
23
+ const CHANGELOG_SECTIONS = [
24
+ { type: 'feat', section: 'Features' },
25
+ { type: 'fix', section: 'Bug Fixes' },
26
+ { type: 'perf', section: 'Performance Improvements' },
27
+ { type: 'revert', section: 'Reverts' },
28
+ { type: 'docs', section: 'Documentation' },
29
+ { type: 'style', section: 'Styles', hidden: true },
30
+ { type: 'chore', section: 'Miscellaneous Chores', hidden: true },
31
+ { type: 'refactor', section: 'Code Refactoring', hidden: true },
32
+ { type: 'test', section: 'Tests', hidden: true },
33
+ { type: 'build', section: 'Build System', hidden: true },
34
+ { type: 'ci', section: 'Continuous Integration', hidden: true },
35
+ ];
23
36
  const REGEN_PR_REGEX = /.*auto-regenerate.*/;
24
37
  const REGEN_ISSUE_REGEX = /(?<prefix>.*)\(#(?<pr>.*)\)(\n|$)/;
25
38
  class GoYoshi extends base_1.BaseStrategy {
26
39
  constructor(options) {
27
40
  var _a;
28
41
  options.changelogPath = (_a = options.changelogPath) !== null && _a !== void 0 ? _a : 'CHANGES.md';
29
- super(options);
42
+ super({
43
+ ...options,
44
+ changelogSections: CHANGELOG_SECTIONS,
45
+ });
30
46
  }
31
47
  async buildUpdates(options) {
32
48
  const updates = [];
@@ -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;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uCAAwD;AAMxD,MAAa,SAAU,SAAQ,wBAAc;IAG3C,YAAY,OAAyB;QACnC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAC/C,CAAC;IAED,aAAa,CAAC,OAA2B;QACvC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,6DAA6D;QAC7D,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC1D,IAAI,cAAc,KAAK,CA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E;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "13.18.3",
3
+ "version": "13.18.6",
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",
@@ -37,16 +37,16 @@
37
37
  }
38
38
  },
39
39
  "devDependencies": {
40
- "@octokit/types": "^6.1.0",
40
+ "@octokit/types": "6.37.0",
41
41
  "@types/chai": "^4.1.7",
42
42
  "@types/diff": "^5.0.2",
43
43
  "@types/iarna__toml": "^2.0.1",
44
44
  "@types/js-yaml": "^4.0.0",
45
45
  "@types/jsonpath": "^0.2.0",
46
- "@types/lerna__collect-updates": "^4.0.0",
47
- "@types/lerna__package": "^4.0.2",
48
- "@types/lerna__package-graph": "^4.0.1",
49
- "@types/lerna__run-topologically": "^4.0.0",
46
+ "@types/lerna__collect-updates": "^5.0.0",
47
+ "@types/lerna__package": "^5.0.0",
48
+ "@types/lerna__package-graph": "^5.0.0",
49
+ "@types/lerna__run-topologically": "^5.0.0",
50
50
  "@types/mocha": "^9.0.0",
51
51
  "@types/node": "^16.0.0",
52
52
  "@types/pino": "^7.0.0",