release-please 13.18.5 → 13.19.0

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.19.0](https://github.com/googleapis/release-please/compare/v13.18.7...v13.19.0) (2022-06-30)
8
+
9
+
10
+ ### Features
11
+
12
+ * add manifest schemas ([#1496](https://github.com/googleapis/release-please/issues/1496)) ([adf84ad](https://github.com/googleapis/release-please/commit/adf84ad3ebb8723ebc0e1232cd899c323c36cbfc))
13
+
14
+ ## [13.18.7](https://github.com/googleapis/release-please/compare/v13.18.6...v13.18.7) (2022-06-30)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * 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))
20
+ * pull request title component can include '/' ([#1499](https://github.com/googleapis/release-please/issues/1499)) ([19a8e82](https://github.com/googleapis/release-please/commit/19a8e8263500dedd32f3b555a9f00f8627f27a6d))
21
+
22
+ ## [13.18.6](https://github.com/googleapis/release-please/compare/v13.18.5...v13.18.6) (2022-06-27)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **dotnet-yoshi:** autodetect component from path ([563ef02](https://github.com/googleapis/release-please/commit/563ef02210cc8bd52eedbfaa0a00787bc2e41ee6))
28
+ * **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))
29
+
7
30
  ## [13.18.5](https://github.com/googleapis/release-please/compare/v13.18.4...v13.18.5) (2022-06-24)
8
31
 
9
32
 
@@ -9,3 +9,5 @@ export { VersioningStrategyBuilder, VersioningStrategyFactoryOptions, Versioning
9
9
  export { BuildNotesOptions, ChangelogNotes, ChangelogSection, } from './changelog-notes';
10
10
  export { Logger, setLogger } from './util/logger';
11
11
  export { GitHub } from './github';
12
+ export declare const configSchema: any;
13
+ export declare const manifestSchema: any;
@@ -13,7 +13,8 @@
13
13
  // See the License for the specific language governing permissions and
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.GitHub = exports.setLogger = exports.registerVersioningStrategy = exports.getVersioningStrategyTypes = exports.registerPlugin = exports.getPluginTypes = exports.registerChangelogNotes = exports.getChangelogTypes = exports.registerReleaseType = exports.getReleaserTypes = exports.Manifest = exports.Errors = void 0;
16
+ exports.manifestSchema = exports.configSchema = exports.GitHub = exports.setLogger = exports.registerVersioningStrategy = exports.getVersioningStrategyTypes = exports.registerPlugin = exports.getPluginTypes = exports.registerChangelogNotes = exports.getChangelogTypes = exports.registerReleaseType = exports.getReleaserTypes = exports.Manifest = exports.Errors = void 0;
17
+ const path_1 = require("path");
17
18
  exports.Errors = require("./errors");
18
19
  var manifest_1 = require("./manifest");
19
20
  Object.defineProperty(exports, "Manifest", { enumerable: true, get: function () { return manifest_1.Manifest; } });
@@ -33,4 +34,6 @@ var logger_1 = require("./util/logger");
33
34
  Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return logger_1.setLogger; } });
34
35
  var github_1 = require("./github");
35
36
  Object.defineProperty(exports, "GitHub", { enumerable: true, get: function () { return github_1.GitHub; } });
37
+ exports.configSchema = require((0, path_1.resolve)('./src/schemas/config'));
38
+ exports.manifestSchema = require((0, path_1.resolve)('./src/schemas/manifest'));
36
39
  //# sourceMappingURL=index.js.map
@@ -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
  }
@@ -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,CAAC,CAAC,EAAE;YACzB,OAAO,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,cAAc,IAAI,CAAC;SACrD;aAAM;YACL,MAAM,MAAM,GAAG,OAAO,CAAC,K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AC,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.5",
3
+ "version": "13.19.0",
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",
@@ -54,6 +54,7 @@
54
54
  "@types/sinon": "^10.0.0",
55
55
  "@types/xmldom": "^0.1.31",
56
56
  "@types/yargs": "^17.0.0",
57
+ "ajv": "^8.11.0",
57
58
  "c8": "^7.0.0",
58
59
  "chai": "^4.2.0",
59
60
  "cross-env": "^7.0.0",