@release-please-oss/release-please 0.0.0 → 17.11.3

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.
Files changed (310) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +280 -0
  3. package/build/src/bin/release-please.d.ts +22 -0
  4. package/build/src/bin/release-please.js +727 -0
  5. package/build/src/bootstrapper.d.ts +18 -0
  6. package/build/src/bootstrapper.js +64 -0
  7. package/build/src/changelog-notes/default.d.ts +15 -0
  8. package/build/src/changelog-notes/default.js +96 -0
  9. package/build/src/changelog-notes/github.d.ts +8 -0
  10. package/build/src/changelog-notes/github.js +29 -0
  11. package/build/src/changelog-notes.d.ts +22 -0
  12. package/build/src/changelog-notes.js +40 -0
  13. package/build/src/commit.d.ts +33 -0
  14. package/build/src/commit.js +422 -0
  15. package/build/src/errors/index.d.ts +36 -0
  16. package/build/src/errors/index.js +77 -0
  17. package/build/src/factories/changelog-notes-factory.d.ts +16 -0
  18. package/build/src/factories/changelog-notes-factory.js +44 -0
  19. package/build/src/factories/plugin-factory.d.ts +23 -0
  20. package/build/src/factories/plugin-factory.js +94 -0
  21. package/build/src/factories/versioning-strategy-factory.d.ts +16 -0
  22. package/build/src/factories/versioning-strategy-factory.js +52 -0
  23. package/build/src/factory.d.ts +18 -0
  24. package/build/src/factory.js +161 -0
  25. package/build/src/github-api.d.ts +260 -0
  26. package/build/src/github-api.js +714 -0
  27. package/build/src/github.d.ts +306 -0
  28. package/build/src/github.js +769 -0
  29. package/build/src/index.d.ts +17 -0
  30. package/build/src/index.js +41 -0
  31. package/build/src/local-github.d.ts +270 -0
  32. package/build/src/local-github.js +756 -0
  33. package/build/src/manifest.d.ts +370 -0
  34. package/build/src/manifest.js +1142 -0
  35. package/build/src/plugin.d.ts +37 -0
  36. package/build/src/plugin.js +57 -0
  37. package/build/src/plugins/cargo-workspace.d.ts +58 -0
  38. package/build/src/plugins/cargo-workspace.js +339 -0
  39. package/build/src/plugins/group-priority.d.ts +29 -0
  40. package/build/src/plugins/group-priority.js +82 -0
  41. package/build/src/plugins/linked-versions.d.ts +36 -0
  42. package/build/src/plugins/linked-versions.js +137 -0
  43. package/build/src/plugins/maven-workspace.d.ts +81 -0
  44. package/build/src/plugins/maven-workspace.js +431 -0
  45. package/build/src/plugins/merge.d.ts +27 -0
  46. package/build/src/plugins/merge.js +99 -0
  47. package/build/src/plugins/node-workspace.d.ts +50 -0
  48. package/build/src/plugins/node-workspace.js +352 -0
  49. package/build/src/plugins/sentence-case.d.ts +19 -0
  50. package/build/src/plugins/sentence-case.js +80 -0
  51. package/build/src/plugins/workspace.d.ts +173 -0
  52. package/build/src/plugins/workspace.js +308 -0
  53. package/build/src/pull-request.d.ts +11 -0
  54. package/build/src/pull-request.js +16 -0
  55. package/build/src/release-pull-request.d.ts +14 -0
  56. package/build/src/release-pull-request.js +16 -0
  57. package/build/src/release.d.ts +7 -0
  58. package/build/src/release.js +16 -0
  59. package/build/src/repository.d.ts +5 -0
  60. package/build/src/repository.js +16 -0
  61. package/build/src/scm.d.ts +80 -0
  62. package/build/src/scm.js +16 -0
  63. package/build/src/strategies/base.d.ts +162 -0
  64. package/build/src/strategies/base.js +494 -0
  65. package/build/src/strategies/bazel.d.ts +7 -0
  66. package/build/src/strategies/bazel.js +49 -0
  67. package/build/src/strategies/dart.d.ts +8 -0
  68. package/build/src/strategies/dart.js +73 -0
  69. package/build/src/strategies/dotnet-yoshi.d.ts +13 -0
  70. package/build/src/strategies/dotnet-yoshi.js +109 -0
  71. package/build/src/strategies/elixir.d.ts +5 -0
  72. package/build/src/strategies/elixir.js +46 -0
  73. package/build/src/strategies/expo.d.ts +15 -0
  74. package/build/src/strategies/expo.js +51 -0
  75. package/build/src/strategies/go-librarian.d.ts +11 -0
  76. package/build/src/strategies/go-librarian.js +84 -0
  77. package/build/src/strategies/go-yoshi.d.ts +14 -0
  78. package/build/src/strategies/go-yoshi.js +168 -0
  79. package/build/src/strategies/go.d.ts +7 -0
  80. package/build/src/strategies/go.js +53 -0
  81. package/build/src/strategies/helm.d.ts +8 -0
  82. package/build/src/strategies/helm.js +73 -0
  83. package/build/src/strategies/java-yoshi-mono-repo.d.ts +22 -0
  84. package/build/src/strategies/java-yoshi-mono-repo.js +308 -0
  85. package/build/src/strategies/java-yoshi.d.ts +20 -0
  86. package/build/src/strategies/java-yoshi.js +210 -0
  87. package/build/src/strategies/java.d.ts +28 -0
  88. package/build/src/strategies/java.js +176 -0
  89. package/build/src/strategies/krm-blueprint.d.ts +7 -0
  90. package/build/src/strategies/krm-blueprint.js +65 -0
  91. package/build/src/strategies/maven.d.ts +9 -0
  92. package/build/src/strategies/maven.js +56 -0
  93. package/build/src/strategies/node-librarian.d.ts +10 -0
  94. package/build/src/strategies/node-librarian.js +121 -0
  95. package/build/src/strategies/node.d.ts +10 -0
  96. package/build/src/strategies/node.js +111 -0
  97. package/build/src/strategies/ocaml.d.ts +5 -0
  98. package/build/src/strategies/ocaml.js +86 -0
  99. package/build/src/strategies/php-librarian.d.ts +6 -0
  100. package/build/src/strategies/php-librarian.js +35 -0
  101. package/build/src/strategies/php-yoshi.d.ts +13 -0
  102. package/build/src/strategies/php-yoshi.js +255 -0
  103. package/build/src/strategies/php.d.ts +6 -0
  104. package/build/src/strategies/php.js +76 -0
  105. package/build/src/strategies/python-librarian.d.ts +6 -0
  106. package/build/src/strategies/python-librarian.js +35 -0
  107. package/build/src/strategies/python.d.ts +11 -0
  108. package/build/src/strategies/python.js +175 -0
  109. package/build/src/strategies/r.d.ts +8 -0
  110. package/build/src/strategies/r.js +67 -0
  111. package/build/src/strategies/ruby-librarian.d.ts +6 -0
  112. package/build/src/strategies/ruby-librarian.js +35 -0
  113. package/build/src/strategies/ruby-yoshi.d.ts +13 -0
  114. package/build/src/strategies/ruby-yoshi.js +97 -0
  115. package/build/src/strategies/ruby.d.ts +9 -0
  116. package/build/src/strategies/ruby.js +71 -0
  117. package/build/src/strategies/rust.d.ts +17 -0
  118. package/build/src/strategies/rust.js +149 -0
  119. package/build/src/strategies/sfdx.d.ts +9 -0
  120. package/build/src/strategies/sfdx.js +67 -0
  121. package/build/src/strategies/simple.d.ts +7 -0
  122. package/build/src/strategies/simple.js +51 -0
  123. package/build/src/strategies/terraform-module.d.ts +7 -0
  124. package/build/src/strategies/terraform-module.js +90 -0
  125. package/build/src/strategy.d.ts +68 -0
  126. package/build/src/strategy.js +16 -0
  127. package/build/src/update.d.ts +24 -0
  128. package/build/src/update.js +16 -0
  129. package/build/src/updaters/base-xml.d.ts +19 -0
  130. package/build/src/updaters/base-xml.js +43 -0
  131. package/build/src/updaters/bazel/module-bazel.d.ts +7 -0
  132. package/build/src/updaters/bazel/module-bazel.js +33 -0
  133. package/build/src/updaters/changelog-json.d.ts +29 -0
  134. package/build/src/updaters/changelog-json.js +100 -0
  135. package/build/src/updaters/changelog.d.ts +13 -0
  136. package/build/src/updaters/changelog.js +55 -0
  137. package/build/src/updaters/composite.d.ts +20 -0
  138. package/build/src/updaters/composite.js +65 -0
  139. package/build/src/updaters/dart/pubspec-yaml.d.ts +13 -0
  140. package/build/src/updaters/dart/pubspec-yaml.js +50 -0
  141. package/build/src/updaters/default.d.ts +21 -0
  142. package/build/src/updaters/default.js +36 -0
  143. package/build/src/updaters/dotnet/apis.d.ts +18 -0
  144. package/build/src/updaters/dotnet/apis.js +45 -0
  145. package/build/src/updaters/dotnet/csproj.d.ts +12 -0
  146. package/build/src/updaters/dotnet/csproj.js +33 -0
  147. package/build/src/updaters/elixir/elixir-mix-exs.d.ts +13 -0
  148. package/build/src/updaters/elixir/elixir-mix-exs.js +42 -0
  149. package/build/src/updaters/expo/app-json.d.ts +31 -0
  150. package/build/src/updaters/expo/app-json.js +67 -0
  151. package/build/src/updaters/generic-json.d.ts +14 -0
  152. package/build/src/updaters/generic-json.js +54 -0
  153. package/build/src/updaters/generic-toml.d.ts +21 -0
  154. package/build/src/updaters/generic-toml.js +66 -0
  155. package/build/src/updaters/generic-xml.d.ts +8 -0
  156. package/build/src/updaters/generic-xml.js +38 -0
  157. package/build/src/updaters/generic-yaml.d.ts +23 -0
  158. package/build/src/updaters/generic-yaml.js +85 -0
  159. package/build/src/updaters/generic.d.ts +54 -0
  160. package/build/src/updaters/generic.js +187 -0
  161. package/build/src/updaters/go/version-go.d.ts +4 -0
  162. package/build/src/updaters/go/version-go.js +24 -0
  163. package/build/src/updaters/helm/chart-yaml.d.ts +13 -0
  164. package/build/src/updaters/helm/chart-yaml.js +41 -0
  165. package/build/src/updaters/java/java-released.d.ts +28 -0
  166. package/build/src/updaters/java/java-released.js +59 -0
  167. package/build/src/updaters/java/java-update.d.ts +21 -0
  168. package/build/src/updaters/java/java-update.js +80 -0
  169. package/build/src/updaters/java/pom-xml.d.ts +29 -0
  170. package/build/src/updaters/java/pom-xml.js +135 -0
  171. package/build/src/updaters/java/versions-manifest.d.ts +19 -0
  172. package/build/src/updaters/java/versions-manifest.js +71 -0
  173. package/build/src/updaters/krm/krm-blueprint-version.d.ts +13 -0
  174. package/build/src/updaters/krm/krm-blueprint-version.js +46 -0
  175. package/build/src/updaters/librarian-yaml.d.ts +45 -0
  176. package/build/src/updaters/librarian-yaml.js +149 -0
  177. package/build/src/updaters/node/package-json.d.ts +46 -0
  178. package/build/src/updaters/node/package-json.js +106 -0
  179. package/build/src/updaters/node/package-lock-json.d.ts +14 -0
  180. package/build/src/updaters/node/package-lock-json.js +83 -0
  181. package/build/src/updaters/node/samples-package-json.d.ts +24 -0
  182. package/build/src/updaters/node/samples-package-json.js +49 -0
  183. package/build/src/updaters/ocaml/dune-project.d.ts +13 -0
  184. package/build/src/updaters/ocaml/dune-project.js +37 -0
  185. package/build/src/updaters/ocaml/esy-json.d.ts +13 -0
  186. package/build/src/updaters/ocaml/esy-json.js +37 -0
  187. package/build/src/updaters/ocaml/opam.d.ts +13 -0
  188. package/build/src/updaters/ocaml/opam.js +37 -0
  189. package/build/src/updaters/php/php-client-version.d.ts +12 -0
  190. package/build/src/updaters/php/php-client-version.js +32 -0
  191. package/build/src/updaters/php/root-composer-update-packages.d.ts +13 -0
  192. package/build/src/updaters/php/root-composer-update-packages.js +60 -0
  193. package/build/src/updaters/python/pyproject-toml.d.ts +29 -0
  194. package/build/src/updaters/python/pyproject-toml.js +53 -0
  195. package/build/src/updaters/python/python-file-with-version.d.ts +12 -0
  196. package/build/src/updaters/python/python-file-with-version.js +32 -0
  197. package/build/src/updaters/python/setup-cfg.d.ts +12 -0
  198. package/build/src/updaters/python/setup-cfg.js +32 -0
  199. package/build/src/updaters/python/setup-py.d.ts +12 -0
  200. package/build/src/updaters/python/setup-py.js +32 -0
  201. package/build/src/updaters/r/description.d.ts +12 -0
  202. package/build/src/updaters/r/description.js +32 -0
  203. package/build/src/updaters/r/news.d.ts +12 -0
  204. package/build/src/updaters/r/news.js +49 -0
  205. package/build/src/updaters/raw-content.d.ts +19 -0
  206. package/build/src/updaters/raw-content.js +39 -0
  207. package/build/src/updaters/release-please-config.d.ts +8 -0
  208. package/build/src/updaters/release-please-config.js +80 -0
  209. package/build/src/updaters/release-please-manifest.d.ts +4 -0
  210. package/build/src/updaters/release-please-manifest.js +34 -0
  211. package/build/src/updaters/ruby/common.d.ts +17 -0
  212. package/build/src/updaters/ruby/common.js +46 -0
  213. package/build/src/updaters/ruby/gemfile-lock.d.ts +24 -0
  214. package/build/src/updaters/ruby/gemfile-lock.js +53 -0
  215. package/build/src/updaters/ruby/version-rb.d.ts +12 -0
  216. package/build/src/updaters/ruby/version-rb.js +34 -0
  217. package/build/src/updaters/rust/cargo-lock.d.ts +16 -0
  218. package/build/src/updaters/rust/cargo-lock.js +64 -0
  219. package/build/src/updaters/rust/cargo-toml.d.ts +13 -0
  220. package/build/src/updaters/rust/cargo-toml.js +89 -0
  221. package/build/src/updaters/rust/common.d.ts +54 -0
  222. package/build/src/updaters/rust/common.js +35 -0
  223. package/build/src/updaters/sfdx/sfdx-project-json.d.ts +21 -0
  224. package/build/src/updaters/sfdx/sfdx-project-json.js +41 -0
  225. package/build/src/updaters/terraform/metadata-version.d.ts +13 -0
  226. package/build/src/updaters/terraform/metadata-version.js +37 -0
  227. package/build/src/updaters/terraform/module-version.d.ts +13 -0
  228. package/build/src/updaters/terraform/module-version.js +37 -0
  229. package/build/src/updaters/terraform/readme.d.ts +12 -0
  230. package/build/src/updaters/terraform/readme.js +32 -0
  231. package/build/src/util/branch-name.d.ts +20 -0
  232. package/build/src/util/branch-name.js +225 -0
  233. package/build/src/util/code-suggester/default-options-handler.d.ts +10 -0
  234. package/build/src/util/code-suggester/default-options-handler.js +45 -0
  235. package/build/src/util/code-suggester/errors.d.ts +4 -0
  236. package/build/src/util/code-suggester/errors.js +24 -0
  237. package/build/src/util/code-suggester/github/branch.d.ts +45 -0
  238. package/build/src/util/code-suggester/github/branch.js +118 -0
  239. package/build/src/util/code-suggester/github/commit-and-push.d.ts +51 -0
  240. package/build/src/util/code-suggester/github/commit-and-push.js +141 -0
  241. package/build/src/util/code-suggester/github/create-commit.d.ts +20 -0
  242. package/build/src/util/code-suggester/github/create-commit.js +60 -0
  243. package/build/src/util/code-suggester/github/fork.d.ts +15 -0
  244. package/build/src/util/code-suggester/github/fork.js +48 -0
  245. package/build/src/util/code-suggester/github/labels.d.ts +14 -0
  246. package/build/src/util/code-suggester/github/labels.js +42 -0
  247. package/build/src/util/code-suggester/github/open-pull-request.d.ts +16 -0
  248. package/build/src/util/code-suggester/github/open-pull-request.js +56 -0
  249. package/build/src/util/code-suggester/index.d.ts +28 -0
  250. package/build/src/util/code-suggester/index.js +110 -0
  251. package/build/src/util/code-suggester/logger.d.ts +4 -0
  252. package/build/src/util/code-suggester/logger.js +37 -0
  253. package/build/src/util/code-suggester/types.d.ts +109 -0
  254. package/build/src/util/code-suggester/types.js +30 -0
  255. package/build/src/util/coerce-option.d.ts +1 -0
  256. package/build/src/util/coerce-option.js +40 -0
  257. package/build/src/util/commit-exclude.d.ts +10 -0
  258. package/build/src/util/commit-exclude.js +49 -0
  259. package/build/src/util/commit-split.d.ts +26 -0
  260. package/build/src/util/commit-split.js +100 -0
  261. package/build/src/util/commit-utils.d.ts +1 -0
  262. package/build/src/util/commit-utils.js +34 -0
  263. package/build/src/util/filter-commits.d.ts +12 -0
  264. package/build/src/util/filter-commits.js +59 -0
  265. package/build/src/util/indent-commit.d.ts +2 -0
  266. package/build/src/util/indent-commit.js +39 -0
  267. package/build/src/util/json-stringify.d.ts +1 -0
  268. package/build/src/util/json-stringify.js +22 -0
  269. package/build/src/util/logger.d.ts +24 -0
  270. package/build/src/util/logger.js +54 -0
  271. package/build/src/util/pull-request-body.d.ts +25 -0
  272. package/build/src/util/pull-request-body.js +147 -0
  273. package/build/src/util/pull-request-overflow-handler.d.ts +54 -0
  274. package/build/src/util/pull-request-overflow-handler.js +78 -0
  275. package/build/src/util/pull-request-title.d.ts +22 -0
  276. package/build/src/util/pull-request-title.js +146 -0
  277. package/build/src/util/signoff-commit-message.d.ts +1 -0
  278. package/build/src/util/signoff-commit-message.js +35 -0
  279. package/build/src/util/tag-name.d.ts +10 -0
  280. package/build/src/util/tag-name.js +42 -0
  281. package/build/src/util/toml-edit.d.ts +16 -0
  282. package/build/src/util/toml-edit.js +126 -0
  283. package/build/src/version.d.ts +35 -0
  284. package/build/src/version.js +74 -0
  285. package/build/src/versioning-strategies/always-bump-major.d.ts +10 -0
  286. package/build/src/versioning-strategies/always-bump-major.js +28 -0
  287. package/build/src/versioning-strategies/always-bump-minor.d.ts +10 -0
  288. package/build/src/versioning-strategies/always-bump-minor.js +28 -0
  289. package/build/src/versioning-strategies/always-bump-patch.d.ts +11 -0
  290. package/build/src/versioning-strategies/always-bump-patch.js +29 -0
  291. package/build/src/versioning-strategies/default.d.ts +48 -0
  292. package/build/src/versioning-strategies/default.js +102 -0
  293. package/build/src/versioning-strategies/dependency-manifest.d.ts +15 -0
  294. package/build/src/versioning-strategies/dependency-manifest.js +103 -0
  295. package/build/src/versioning-strategies/java-add-snapshot.d.ts +13 -0
  296. package/build/src/versioning-strategies/java-add-snapshot.js +54 -0
  297. package/build/src/versioning-strategies/java-snapshot.d.ts +13 -0
  298. package/build/src/versioning-strategies/java-snapshot.js +70 -0
  299. package/build/src/versioning-strategies/prerelease.d.ts +20 -0
  300. package/build/src/versioning-strategies/prerelease.js +163 -0
  301. package/build/src/versioning-strategies/service-pack.d.ts +12 -0
  302. package/build/src/versioning-strategies/service-pack.js +47 -0
  303. package/build/src/versioning-strategy.d.ts +90 -0
  304. package/build/src/versioning-strategy.js +82 -0
  305. package/package.json +113 -4
  306. package/schemas/config.json +513 -0
  307. package/schemas/manifest.json +9 -0
  308. package/templates/commit.hbs +2 -0
  309. package/templates/header.hbs +9 -0
  310. package/templates/template.hbs +19 -0
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ // Copyright 2024 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Bazel = void 0;
17
+ const module_bazel_1 = require("../updaters/bazel/module-bazel");
18
+ const changelog_1 = require("../updaters/changelog");
19
+ const base_1 = require("./base");
20
+ class Bazel extends base_1.BaseStrategy {
21
+ constructor(options) {
22
+ var _a;
23
+ super(options);
24
+ this.versionFile = (_a = options.versionFile) !== null && _a !== void 0 ? _a : 'MODULE.bazel';
25
+ }
26
+ async buildUpdates(options) {
27
+ const updates = [];
28
+ const version = options.newVersion;
29
+ !this.skipChangelog &&
30
+ updates.push({
31
+ path: this.addPath(this.changelogPath),
32
+ createIfMissing: true,
33
+ updater: new changelog_1.Changelog({
34
+ version,
35
+ changelogEntry: options.changelogEntry,
36
+ }),
37
+ });
38
+ updates.push({
39
+ path: this.addPath(this.versionFile),
40
+ createIfMissing: false,
41
+ updater: new module_bazel_1.ModuleBazel({
42
+ version,
43
+ }),
44
+ });
45
+ return updates;
46
+ }
47
+ }
48
+ exports.Bazel = Bazel;
49
+ //# sourceMappingURL=bazel.js.map
@@ -0,0 +1,8 @@
1
+ import { BaseStrategy, BuildUpdatesOptions } from './base';
2
+ import { Update } from '../update';
3
+ export declare class Dart extends BaseStrategy {
4
+ private pubspecYmlContents?;
5
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
6
+ getDefaultPackageName(): Promise<string | undefined>;
7
+ private getPubspecYmlContents;
8
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ // Copyright 2021 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Dart = void 0;
17
+ // Generic
18
+ const changelog_1 = require("../updaters/changelog");
19
+ const yaml = require("js-yaml");
20
+ // pubspec
21
+ const pubspec_yaml_1 = require("../updaters/dart/pubspec-yaml");
22
+ const base_1 = require("./base");
23
+ const errors_1 = require("../errors");
24
+ class Dart extends base_1.BaseStrategy {
25
+ async buildUpdates(options) {
26
+ const updates = [];
27
+ const version = options.newVersion;
28
+ !this.skipChangelog &&
29
+ updates.push({
30
+ path: this.addPath(this.changelogPath),
31
+ createIfMissing: true,
32
+ updater: new changelog_1.Changelog({
33
+ version,
34
+ changelogEntry: options.changelogEntry,
35
+ }),
36
+ });
37
+ updates.push({
38
+ path: this.addPath('pubspec.yaml'),
39
+ createIfMissing: false,
40
+ cachedFileContents: this.pubspecYmlContents,
41
+ updater: new pubspec_yaml_1.PubspecYaml({
42
+ version,
43
+ }),
44
+ });
45
+ return updates;
46
+ }
47
+ async getDefaultPackageName() {
48
+ const pubspecYmlContents = await this.getPubspecYmlContents();
49
+ const pubspec = yaml.load(pubspecYmlContents.parsedContent, { json: true });
50
+ if (typeof pubspec === 'object') {
51
+ return pubspec.name;
52
+ }
53
+ else {
54
+ return undefined;
55
+ }
56
+ }
57
+ async getPubspecYmlContents() {
58
+ if (!this.pubspecYmlContents) {
59
+ try {
60
+ this.pubspecYmlContents = await this.github.getFileContentsOnBranch(this.addPath('pubspec.yaml'), this.targetBranch);
61
+ }
62
+ catch (e) {
63
+ if (e instanceof errors_1.FileNotFoundError) {
64
+ throw new errors_1.MissingRequiredFileError(this.addPath('pubspec.yaml'), Dart.name, `${this.repository.owner}/${this.repository.repo}`);
65
+ }
66
+ throw e;
67
+ }
68
+ }
69
+ return this.pubspecYmlContents;
70
+ }
71
+ }
72
+ exports.Dart = Dart;
73
+ //# sourceMappingURL=dart.js.map
@@ -0,0 +1,13 @@
1
+ import { BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions } from './base';
2
+ import { Update } from '../update';
3
+ import { ConventionalCommit } from '../commit';
4
+ import { Version } from '../version';
5
+ import { TagName } from '../util/tag-name';
6
+ import { Release } from '../release';
7
+ export declare class DotnetYoshi extends BaseStrategy {
8
+ constructor(options: BaseStrategyOptions);
9
+ protected buildReleaseNotes(conventionalCommits: ConventionalCommit[], newVersion: Version, newVersionTag: TagName, latestRelease?: Release): Promise<string>;
10
+ private getApi;
11
+ getDefaultComponent(): Promise<string | undefined>;
12
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
13
+ }
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ // Copyright 2022 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.DotnetYoshi = void 0;
17
+ const base_1 = require("./base");
18
+ const changelog_1 = require("../updaters/changelog");
19
+ const apis_1 = require("../updaters/dotnet/apis");
20
+ const errors_1 = require("../errors");
21
+ const CHANGELOG_SECTIONS = [
22
+ { type: 'feat', section: 'New features' },
23
+ { type: 'fix', section: 'Bug fixes' },
24
+ { type: 'perf', section: 'Performance improvements' },
25
+ { type: 'revert', section: 'Reverts' },
26
+ { type: 'chore', section: 'Miscellaneous chores', hidden: true },
27
+ { type: 'docs', section: 'Documentation improvements' },
28
+ { type: 'style', section: 'Styles', hidden: true },
29
+ { type: 'refactor', section: 'Code Refactoring', hidden: true },
30
+ { type: 'test', section: 'Tests', hidden: true },
31
+ { type: 'build', section: 'Build System', hidden: true },
32
+ { type: 'ci', section: 'Continuous Integration', hidden: true },
33
+ ];
34
+ const DEFAULT_CHANGELOG_PATH = 'docs/history.md';
35
+ const DEFAULT_PULL_REQUEST_TITLE_PATTERN = 'Release${component} version ${version}';
36
+ const DEFAULT_PULL_REQUEST_HEADER = ':robot: I have created a release *beep* *boop*';
37
+ const DEFAULT_PULL_REQUEST_FOOTER = 'This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).';
38
+ const RELEASE_NOTES_HEADER_PATTERN = /#{2,3} \[?(\d+\.\d+\.\d+-?[^\]]*)\]?.* \((\d{4}-\d{2}-\d{2})\)/;
39
+ class DotnetYoshi extends base_1.BaseStrategy {
40
+ constructor(options) {
41
+ var _a, _b, _c, _d, _e, _f;
42
+ options.changelogSections = (_a = options.changelogSections) !== null && _a !== void 0 ? _a : CHANGELOG_SECTIONS;
43
+ options.changelogPath = (_b = options.changelogPath) !== null && _b !== void 0 ? _b : DEFAULT_CHANGELOG_PATH;
44
+ options.pullRequestTitlePattern =
45
+ (_c = options.pullRequestTitlePattern) !== null && _c !== void 0 ? _c : DEFAULT_PULL_REQUEST_TITLE_PATTERN;
46
+ options.pullRequestHeader =
47
+ (_d = options.pullRequestHeader) !== null && _d !== void 0 ? _d : DEFAULT_PULL_REQUEST_HEADER;
48
+ options.pullRequestFooter =
49
+ (_e = options.pullRequestFooter) !== null && _e !== void 0 ? _e : DEFAULT_PULL_REQUEST_FOOTER;
50
+ options.includeVInTag = (_f = options.includeVInTag) !== null && _f !== void 0 ? _f : false;
51
+ super(options);
52
+ }
53
+ async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease) {
54
+ const notes = await super.buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease);
55
+ return notes.replace(RELEASE_NOTES_HEADER_PATTERN, '## Version $1, released $2');
56
+ }
57
+ async getApi() {
58
+ try {
59
+ const contents = await this.github.getFileContentsOnBranch('apis/apis.json', this.targetBranch);
60
+ const apis = JSON.parse(contents.parsedContent);
61
+ const component = await this.getComponent();
62
+ return apis.apis.find(api => api.id === component);
63
+ }
64
+ catch (e) {
65
+ if (e instanceof errors_1.FileNotFoundError) {
66
+ throw new errors_1.MissingRequiredFileError('apis/apis.json', DotnetYoshi.name, `${this.repository.owner}/${this.repository.repo}`);
67
+ }
68
+ throw e;
69
+ }
70
+ }
71
+ async getDefaultComponent() {
72
+ // default component is based on the path
73
+ const pathParts = this.path.split('/');
74
+ return pathParts[pathParts.length - 1];
75
+ }
76
+ async buildUpdates(options) {
77
+ const updates = [];
78
+ const version = options.newVersion;
79
+ const component = await this.getComponent();
80
+ const api = await this.getApi();
81
+ if (api === null || api === void 0 ? void 0 : api.noVersionHistory) {
82
+ this.logger.info(`Skipping changelog for ${component} via noVersionHistory configuration`);
83
+ }
84
+ else {
85
+ !this.skipChangelog &&
86
+ updates.push({
87
+ path: this.addPath(this.changelogPath),
88
+ createIfMissing: true,
89
+ updater: new changelog_1.Changelog({
90
+ version,
91
+ changelogEntry: options.changelogEntry,
92
+ versionHeaderRegex: '\n## Version [0-9[]+',
93
+ }),
94
+ });
95
+ }
96
+ if (!component) {
97
+ this.logger.warn('Dotnet strategy expects to use components, could not update all files');
98
+ return updates;
99
+ }
100
+ updates.push({
101
+ path: 'apis/apis.json',
102
+ createIfMissing: false,
103
+ updater: new apis_1.Apis(component, version),
104
+ });
105
+ return updates;
106
+ }
107
+ }
108
+ exports.DotnetYoshi = DotnetYoshi;
109
+ //# sourceMappingURL=dotnet-yoshi.js.map
@@ -0,0 +1,5 @@
1
+ import { BaseStrategy, BuildUpdatesOptions } from './base';
2
+ import { Update } from '../update';
3
+ export declare class Elixir extends BaseStrategy {
4
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
5
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // Copyright 2021 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Elixir = void 0;
17
+ // Generic
18
+ const changelog_1 = require("../updaters/changelog");
19
+ // mix.exs support
20
+ const elixir_mix_exs_1 = require("../updaters/elixir/elixir-mix-exs");
21
+ const base_1 = require("./base");
22
+ class Elixir extends base_1.BaseStrategy {
23
+ async buildUpdates(options) {
24
+ const updates = [];
25
+ const version = options.newVersion;
26
+ !this.skipChangelog &&
27
+ updates.push({
28
+ path: this.addPath(this.changelogPath),
29
+ createIfMissing: true,
30
+ updater: new changelog_1.Changelog({
31
+ version,
32
+ changelogEntry: options.changelogEntry,
33
+ }),
34
+ });
35
+ updates.push({
36
+ path: this.addPath('mix.exs'),
37
+ createIfMissing: false,
38
+ updater: new elixir_mix_exs_1.ElixirMixExs({
39
+ version,
40
+ }),
41
+ });
42
+ return updates;
43
+ }
44
+ }
45
+ exports.Elixir = Elixir;
46
+ //# sourceMappingURL=elixir.js.map
@@ -0,0 +1,15 @@
1
+ import { BuildUpdatesOptions } from './base';
2
+ import { Node } from './node';
3
+ import { Update } from '../update';
4
+ import { Version } from '../version';
5
+ /**
6
+ * Strategy for building Expo based React Native projects. This strategy extends
7
+ * the Node strategy to additionally update the `app.json` file of a project.
8
+ */
9
+ export declare class Expo extends Node {
10
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
11
+ /**
12
+ * Determine the Expo SDK version by parsing the package.json dependencies.
13
+ */
14
+ getExpoSDKVersion(): Promise<Version>;
15
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ // Copyright 2022 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Expo = void 0;
17
+ const node_1 = require("./node");
18
+ const app_json_1 = require("../updaters/expo/app-json");
19
+ const version_1 = require("../version");
20
+ /**
21
+ * Strategy for building Expo based React Native projects. This strategy extends
22
+ * the Node strategy to additionally update the `app.json` file of a project.
23
+ */
24
+ class Expo extends node_1.Node {
25
+ async buildUpdates(options) {
26
+ const version = options.newVersion;
27
+ const updates = await super.buildUpdates(options);
28
+ const expoSDKVersion = await this.getExpoSDKVersion();
29
+ updates.push({
30
+ path: this.addPath('app.json'),
31
+ createIfMissing: false,
32
+ updater: new app_json_1.AppJson({ version, expoSDKVersion }),
33
+ });
34
+ return updates;
35
+ }
36
+ /**
37
+ * Determine the Expo SDK version by parsing the package.json dependencies.
38
+ */
39
+ async getExpoSDKVersion() {
40
+ var _a, _b, _c, _d;
41
+ const pkgJsonContents = await this.getPkgJsonContents();
42
+ const pkg = JSON.parse(pkgJsonContents.parsedContent);
43
+ return version_1.Version.parse(((_a = pkg.dependencies) === null || _a === void 0 ? void 0 : _a.expo) ||
44
+ ((_b = pkg.devDependencies) === null || _b === void 0 ? void 0 : _b.expo) ||
45
+ ((_c = pkg.peerDependencies) === null || _c === void 0 ? void 0 : _c.expo) ||
46
+ ((_d = pkg.optionalDependencies) === null || _d === void 0 ? void 0 : _d.expo) ||
47
+ '0.0.0');
48
+ }
49
+ }
50
+ exports.Expo = Expo;
51
+ //# sourceMappingURL=expo.js.map
@@ -0,0 +1,11 @@
1
+ import { BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions } from './base';
2
+ import { Update } from '../update';
3
+ import { Version } from '../version';
4
+ export declare class GoLibrarian extends BaseStrategy {
5
+ readonly versionFile: string;
6
+ constructor(options: BaseStrategyOptions);
7
+ getComponent(): Promise<string | undefined>;
8
+ getBranchComponent(): Promise<string | undefined>;
9
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
10
+ protected initialReleaseVersion(): Version;
11
+ }
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ // Copyright 2026 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GoLibrarian = void 0;
17
+ const base_1 = require("./base");
18
+ const changelog_1 = require("../updaters/changelog");
19
+ const librarian_yaml_1 = require("../updaters/librarian-yaml");
20
+ const version_1 = require("../version");
21
+ const version_go_1 = require("../updaters/go/version-go");
22
+ class GoLibrarian extends base_1.BaseStrategy {
23
+ constructor(options) {
24
+ var _a, _b;
25
+ options.changelogPath = (_a = options.changelogPath) !== null && _a !== void 0 ? _a : 'CHANGES.md';
26
+ super(options);
27
+ this.versionFile = (_b = options.versionFile) !== null && _b !== void 0 ? _b : 'internal/version.go';
28
+ }
29
+ async getComponent() {
30
+ const component = await super.getComponent();
31
+ if (component) {
32
+ const match = component.match(/^(.*)\/v[2-9]\d*$/);
33
+ if (match) {
34
+ return match[1];
35
+ }
36
+ }
37
+ return component;
38
+ }
39
+ async getBranchComponent() {
40
+ const component = await super.getBranchComponent();
41
+ return component ? component.replace(/\//g, '-') : undefined;
42
+ }
43
+ async buildUpdates(options) {
44
+ const updates = [];
45
+ const version = options.newVersion;
46
+ if (!this.skipChangelog) {
47
+ updates.push({
48
+ path: this.addPath(this.changelogPath),
49
+ createIfMissing: true,
50
+ updater: new changelog_1.Changelog({
51
+ version,
52
+ changelogEntry: options.changelogEntry,
53
+ }),
54
+ });
55
+ }
56
+ if (this.versionFile) {
57
+ updates.push({
58
+ path: this.addPath(this.versionFile),
59
+ createIfMissing: false,
60
+ updater: new version_go_1.VersionGo({
61
+ version,
62
+ }),
63
+ });
64
+ }
65
+ updates.push({
66
+ path: 'librarian.yaml',
67
+ createIfMissing: false,
68
+ updater: new librarian_yaml_1.LibrarianYamlUpdater({
69
+ version,
70
+ packagePath: this.path,
71
+ component: this.component,
72
+ }),
73
+ });
74
+ return updates;
75
+ }
76
+ initialReleaseVersion() {
77
+ if (this.initialVersion) {
78
+ return version_1.Version.parse(this.initialVersion);
79
+ }
80
+ return version_1.Version.parse('0.1.0');
81
+ }
82
+ }
83
+ exports.GoLibrarian = GoLibrarian;
84
+ //# sourceMappingURL=go-librarian.js.map
@@ -0,0 +1,14 @@
1
+ import { BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions } from './base';
2
+ import { Update } from '../update';
3
+ import { Commit, ConventionalCommit } from '../commit';
4
+ import { Version } from '../version';
5
+ import { TagName } from '../util/tag-name';
6
+ import { Release } from '../release';
7
+ export declare class GoYoshi extends BaseStrategy {
8
+ constructor(options: BaseStrategyOptions);
9
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
10
+ protected postProcessCommits(commits: ConventionalCommit[]): Promise<ConventionalCommit[]>;
11
+ getIgnoredSubModules(): Promise<Set<string>>;
12
+ protected buildReleaseNotes(conventionalCommits: ConventionalCommit[], newVersion: Version, newVersionTag: TagName, latestRelease?: Release, commits?: Commit[]): Promise<string>;
13
+ protected initialReleaseVersion(): Version;
14
+ }
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ // Copyright 2021 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GoYoshi = void 0;
17
+ const base_1 = require("./base");
18
+ const changelog_1 = require("../updaters/changelog");
19
+ const version_1 = require("../version");
20
+ const version_go_1 = require("../updaters/go/version-go");
21
+ const path_1 = require("path");
22
+ const CHANGELOG_SECTIONS = [
23
+ { type: 'feat', section: 'Features' },
24
+ { type: 'fix', section: 'Bug Fixes' },
25
+ { type: 'perf', section: 'Performance Improvements' },
26
+ { type: 'revert', section: 'Reverts' },
27
+ { type: 'docs', section: 'Documentation' },
28
+ { type: 'style', section: 'Styles', hidden: true },
29
+ { type: 'chore', section: 'Miscellaneous Chores', hidden: true },
30
+ { type: 'refactor', section: 'Code Refactoring', hidden: true },
31
+ { type: 'test', section: 'Tests', hidden: true },
32
+ { type: 'build', section: 'Build System', hidden: true },
33
+ { type: 'ci', section: 'Continuous Integration', hidden: true },
34
+ ];
35
+ const REGEN_PR_REGEX = /.*auto-regenerate.*/;
36
+ const REGEN_ISSUE_REGEX = /(?<prefix>.*)\(#(?<pr>.*)\)(\n|$)/;
37
+ class GoYoshi extends base_1.BaseStrategy {
38
+ constructor(options) {
39
+ var _a;
40
+ options.changelogPath = (_a = options.changelogPath) !== null && _a !== void 0 ? _a : 'CHANGES.md';
41
+ super({
42
+ ...options,
43
+ changelogSections: CHANGELOG_SECTIONS,
44
+ });
45
+ }
46
+ async buildUpdates(options) {
47
+ const updates = [];
48
+ const version = options.newVersion;
49
+ !this.skipChangelog &&
50
+ updates.push({
51
+ path: this.addPath(this.changelogPath),
52
+ createIfMissing: true,
53
+ updater: new changelog_1.Changelog({
54
+ version,
55
+ changelogEntry: options.changelogEntry,
56
+ }),
57
+ });
58
+ updates.push({
59
+ path: this.addPath('internal/version.go'),
60
+ createIfMissing: false,
61
+ updater: new version_go_1.VersionGo({
62
+ version,
63
+ }),
64
+ });
65
+ return updates;
66
+ }
67
+ async postProcessCommits(commits) {
68
+ let regenCommit;
69
+ const component = await this.getComponent();
70
+ this.logger.debug('Filtering commits');
71
+ const ignoredSubmodules = await this.getIgnoredSubModules();
72
+ return commits.filter(commit => {
73
+ var _a, _b;
74
+ // Only have a single entry of the nightly regen listed in the changelog.
75
+ // If there are more than one of these commits, append associated PR.
76
+ if (this.repository.owner === 'googleapis' &&
77
+ this.repository.repo === 'google-api-go-client' &&
78
+ REGEN_PR_REGEX.test(commit.message)) {
79
+ if (regenCommit) {
80
+ const match = commit.message.match(REGEN_ISSUE_REGEX);
81
+ if ((_a = match === null || match === void 0 ? void 0 : match.groups) === null || _a === void 0 ? void 0 : _a.pr) {
82
+ regenCommit.references.push({
83
+ action: 'refs',
84
+ issue: match.groups.pr,
85
+ prefix: '#',
86
+ });
87
+ }
88
+ return false;
89
+ }
90
+ else {
91
+ commit.sha = '';
92
+ regenCommit = commit;
93
+ const match = commit.bareMessage.match(REGEN_ISSUE_REGEX);
94
+ if ((_b = match === null || match === void 0 ? void 0 : match.groups) === null || _b === void 0 ? void 0 : _b.pr) {
95
+ regenCommit.references.push({
96
+ action: 'refs',
97
+ issue: match.groups.pr,
98
+ prefix: '#',
99
+ });
100
+ regenCommit.bareMessage = match.groups.prefix.trim();
101
+ }
102
+ }
103
+ }
104
+ // For google-cloud-go, filter into 2 cases, a subset of modules
105
+ // released independently, and the remainder
106
+ if (this.repository.owner === 'googleapis' &&
107
+ this.repository.repo === 'google-cloud-go') {
108
+ // Skip commits that don't have a scope as we don't know where to
109
+ // put them
110
+ if (!commit.scope) {
111
+ this.logger.debug(`Skipping commit without scope: ${commit.message}`);
112
+ return false;
113
+ }
114
+ // Skip commits related to sub-modules as they are not part of
115
+ // the parent module.
116
+ if (this.includeComponentInTag) {
117
+ // This is a submodule release, so only include commits in this
118
+ // scope
119
+ if (!commitMatchesScope(commit.scope, component)) {
120
+ this.logger.debug(`Skipping commit scope: ${commit.scope} != ${component}`);
121
+ return false;
122
+ }
123
+ }
124
+ else {
125
+ // This is the main module release, so ignore sub modules that
126
+ // are released independently
127
+ for (const submodule of ignoredSubmodules) {
128
+ if (commitMatchesScope(commit.scope, submodule)) {
129
+ this.logger.debug(`Skipping ignored commit scope: ${commit.scope}`);
130
+ return false;
131
+ }
132
+ }
133
+ }
134
+ }
135
+ return true;
136
+ });
137
+ }
138
+ async getIgnoredSubModules() {
139
+ // ignored submodules only applies to the root component of
140
+ // googleapis/google-cloud-go
141
+ if (this.repository.owner !== 'googleapis' ||
142
+ this.repository.repo !== 'google-cloud-go' ||
143
+ this.includeComponentInTag) {
144
+ return new Set();
145
+ }
146
+ this.logger.info('Looking for go.mod files');
147
+ const paths = (await this.github.findFilesByFilenameAndRef('go.mod', this.targetBranch))
148
+ .filter(path => !path.includes('internal') && path !== 'go.mod')
149
+ .map(path => (0, path_1.dirname)(path));
150
+ this.logger.info(`Found ${paths.length} submodules`);
151
+ this.logger.debug(JSON.stringify(paths));
152
+ return new Set(paths);
153
+ }
154
+ // "closes" is a little presumptuous, let's just indicate that the
155
+ // PR references these other commits:
156
+ async buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits) {
157
+ const releaseNotes = await super.buildReleaseNotes(conventionalCommits, newVersion, newVersionTag, latestRelease, commits);
158
+ return releaseNotes.replace(/, closes /g, ', refs ');
159
+ }
160
+ initialReleaseVersion() {
161
+ return version_1.Version.parse('0.1.0');
162
+ }
163
+ }
164
+ exports.GoYoshi = GoYoshi;
165
+ function commitMatchesScope(commitScope, scope) {
166
+ return commitScope === scope || commitScope.startsWith(`${scope}/`);
167
+ }
168
+ //# sourceMappingURL=go-yoshi.js.map
@@ -0,0 +1,7 @@
1
+ import { BaseStrategy, BuildUpdatesOptions, BaseStrategyOptions } from './base';
2
+ import { Update } from '../update';
3
+ export declare class Go extends BaseStrategy {
4
+ readonly versionFile: string;
5
+ constructor(options: BaseStrategyOptions);
6
+ protected buildUpdates(options: BuildUpdatesOptions): Promise<Update[]>;
7
+ }