release-please 12.5.0 → 13.0.0-candidate.2

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 (253) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +4 -0
  3. package/build/src/bin/release-please.d.ts +55 -11
  4. package/build/src/bin/release-please.js +419 -152
  5. package/build/src/bootstrapper.d.ts +12 -0
  6. package/build/src/bootstrapper.js +60 -0
  7. package/build/src/changelog-notes/default.d.ts +17 -0
  8. package/build/src/changelog-notes/default.js +72 -0
  9. package/build/src/changelog-notes.d.ts +17 -0
  10. package/build/src/{updaters/java/readme.js → changelog-notes.js} +2 -7
  11. package/build/src/commit.d.ts +26 -0
  12. package/build/src/{util/to-conventional-changelog-format.js → commit.js} +97 -2
  13. package/build/src/errors/index.d.ts +0 -5
  14. package/build/src/errors/index.js +1 -10
  15. package/build/src/factory.d.ts +25 -37
  16. package/build/src/factory.js +160 -150
  17. package/build/src/github.d.ts +154 -884
  18. package/build/src/github.js +608 -1036
  19. package/build/src/manifest.d.ts +191 -47
  20. package/build/src/manifest.js +599 -487
  21. package/build/src/plugin.d.ts +20 -0
  22. package/build/src/{plugins/plugin.js → plugin.js} +10 -9
  23. package/build/src/plugins/cargo-workspace.d.ts +48 -18
  24. package/build/src/plugins/cargo-workspace.js +247 -328
  25. package/build/src/plugins/merge.d.ts +11 -0
  26. package/build/src/plugins/merge.js +83 -0
  27. package/build/src/plugins/node-workspace.d.ts +35 -17
  28. package/build/src/plugins/node-workspace.js +234 -271
  29. package/build/src/plugins/workspace.d.ts +102 -0
  30. package/build/src/plugins/workspace.js +170 -0
  31. package/build/src/pull-request.d.ts +10 -0
  32. package/build/src/{updaters/java/pom-xml.js → pull-request.js} +2 -7
  33. package/build/src/release-notes.d.ts +29 -0
  34. package/build/src/release-notes.js +71 -0
  35. package/build/src/release-pull-request.d.ts +13 -0
  36. package/build/src/release-pull-request.js +16 -0
  37. package/build/src/release.d.ts +6 -0
  38. package/build/src/release.js +16 -0
  39. package/build/src/repository.d.ts +5 -0
  40. package/build/src/repository.js +16 -0
  41. package/build/src/strategies/dart.d.ts +8 -0
  42. package/build/src/strategies/dart.js +63 -0
  43. package/build/src/strategies/elixir.d.ts +5 -0
  44. package/build/src/{releasers → strategies}/elixir.js +18 -14
  45. package/build/src/strategies/go-yoshi.d.ts +13 -0
  46. package/build/src/strategies/go-yoshi.js +106 -0
  47. package/build/src/strategies/go.d.ts +5 -0
  48. package/build/src/{releasers → strategies}/go.js +11 -12
  49. package/build/src/strategies/helm.d.ts +8 -0
  50. package/build/src/strategies/helm.js +63 -0
  51. package/build/src/strategies/java-yoshi.d.ts +24 -0
  52. package/build/src/strategies/java-yoshi.js +203 -0
  53. package/build/src/strategies/krm-blueprint.d.ts +7 -0
  54. package/build/src/{releasers → strategies}/krm-blueprint.js +26 -22
  55. package/build/src/strategies/node.d.ts +9 -0
  56. package/build/src/strategies/node.js +82 -0
  57. package/build/src/strategies/ocaml.d.ts +5 -0
  58. package/build/src/{releasers → strategies}/ocaml.js +34 -28
  59. package/build/src/strategies/php-yoshi.d.ts +10 -0
  60. package/build/src/strategies/php-yoshi.js +213 -0
  61. package/build/src/strategies/php.d.ts +6 -0
  62. package/build/src/{releasers → strategies}/php.js +24 -23
  63. package/build/src/strategies/python.d.ts +8 -0
  64. package/build/src/strategies/python.js +117 -0
  65. package/build/src/strategies/ruby-yoshi.d.ts +17 -0
  66. package/build/src/strategies/ruby-yoshi.js +116 -0
  67. package/build/src/strategies/ruby.d.ts +13 -0
  68. package/build/src/{releasers → strategies}/ruby.js +26 -27
  69. package/build/src/strategies/rust.d.ts +20 -0
  70. package/build/src/strategies/rust.js +120 -0
  71. package/build/src/strategies/simple.d.ts +5 -0
  72. package/build/src/{releasers → strategies}/simple.js +18 -14
  73. package/build/src/strategies/terraform-module.d.ts +7 -0
  74. package/build/src/{releasers → strategies}/terraform-module.js +29 -23
  75. package/build/src/strategy.d.ts +100 -0
  76. package/build/src/strategy.js +233 -0
  77. package/build/src/update.d.ts +23 -0
  78. package/build/src/{updaters/update.js → update.js} +1 -1
  79. package/build/src/updaters/changelog.d.ts +7 -10
  80. package/build/src/updaters/changelog.js +3 -9
  81. package/build/src/updaters/changelog.js.map +1 -1
  82. package/build/src/updaters/composite.d.ts +19 -0
  83. package/build/src/updaters/composite.js +42 -0
  84. package/build/src/updaters/dart/pubspec-yaml.d.ts +12 -0
  85. package/build/src/updaters/{pubspec-yaml.js → dart/pubspec-yaml.js} +13 -12
  86. package/build/src/updaters/default.d.ts +21 -0
  87. package/build/src/updaters/{version-txt.js → default.js} +16 -10
  88. package/build/src/updaters/dotnet/csproj.d.ts +12 -0
  89. package/build/src/updaters/{java/google-utils.js → dotnet/csproj.js} +16 -13
  90. package/build/src/updaters/elixir/elixir-mix-exs.d.ts +12 -0
  91. package/build/src/updaters/{elixir-mix-exs.js → elixir/elixir-mix-exs.js} +12 -10
  92. package/build/src/updaters/helm/chart-yaml.d.ts +10 -11
  93. package/build/src/updaters/helm/chart-yaml.js +12 -10
  94. package/build/src/updaters/java/java-update.d.ts +14 -0
  95. package/build/src/updaters/java/{java_update.js → java-update.js} +22 -22
  96. package/build/src/updaters/java/versions-manifest.d.ts +12 -2
  97. package/build/src/updaters/java/versions-manifest.js +20 -4
  98. package/build/src/updaters/krm/krm-blueprint-version.d.ts +10 -11
  99. package/build/src/updaters/krm/krm-blueprint-version.js +13 -12
  100. package/build/src/updaters/node/package-json.d.ts +12 -0
  101. package/build/src/updaters/{package-json.js → node/package-json.js} +14 -16
  102. package/build/src/updaters/node/package-lock-json.d.ts +8 -0
  103. package/build/src/updaters/node/package-lock-json.js +36 -0
  104. package/build/src/updaters/node/samples-package-json.d.ts +23 -0
  105. package/build/src/updaters/{samples-package-json.js → node/samples-package-json.js} +19 -8
  106. package/build/src/updaters/ocaml/dune-project.d.ts +10 -11
  107. package/build/src/updaters/ocaml/dune-project.js +11 -9
  108. package/build/src/updaters/ocaml/esy-json.d.ts +10 -11
  109. package/build/src/updaters/ocaml/esy-json.js +12 -10
  110. package/build/src/updaters/ocaml/opam.d.ts +10 -11
  111. package/build/src/updaters/ocaml/opam.js +11 -9
  112. package/build/src/updaters/php/php-client-version.d.ts +12 -0
  113. package/build/src/updaters/{php-client-version.js → php/php-client-version.js} +10 -9
  114. package/build/src/updaters/php/php-manifest.d.ts +13 -0
  115. package/build/src/updaters/{php-manifest.js → php/php-manifest.js} +17 -15
  116. package/build/src/updaters/php/root-composer-update-packages.d.ts +12 -0
  117. package/build/src/updaters/{root-composer-update-packages.js → php/root-composer-update-packages.js} +17 -16
  118. package/build/src/updaters/python/pyproject-toml.d.ts +10 -11
  119. package/build/src/updaters/python/pyproject-toml.js +13 -11
  120. package/build/src/updaters/python/python-file-with-version.d.ts +7 -11
  121. package/build/src/updaters/python/python-file-with-version.js +7 -8
  122. package/build/src/updaters/python/setup-cfg.d.ts +10 -11
  123. package/build/src/updaters/python/setup-cfg.js +10 -8
  124. package/build/src/updaters/python/setup-py.d.ts +10 -11
  125. package/build/src/updaters/python/setup-py.js +10 -8
  126. package/build/src/updaters/raw-content.d.ts +19 -0
  127. package/build/src/{plugins/index.js → updaters/raw-content.js} +23 -12
  128. package/build/src/updaters/release-please-config.d.ts +8 -0
  129. package/build/src/updaters/release-please-config.js +41 -0
  130. package/build/src/updaters/release-please-manifest.d.ts +2 -11
  131. package/build/src/updaters/release-please-manifest.js +11 -14
  132. package/build/src/updaters/ruby/version-rb.d.ts +12 -0
  133. package/build/src/updaters/{version-rb.js → ruby/version-rb.js} +10 -8
  134. package/build/src/updaters/rust/cargo-lock.d.ts +7 -11
  135. package/build/src/updaters/rust/cargo-lock.js +14 -16
  136. package/build/src/updaters/rust/cargo-toml.d.ts +7 -11
  137. package/build/src/updaters/rust/cargo-toml.js +19 -21
  138. package/build/src/updaters/terraform/module-version.d.ts +10 -11
  139. package/build/src/updaters/terraform/module-version.js +11 -9
  140. package/build/src/updaters/terraform/readme.d.ts +10 -11
  141. package/build/src/updaters/terraform/readme.js +11 -10
  142. package/build/src/updaters/terraform/readme.js.map +1 -1
  143. package/build/src/util/branch-name.d.ts +5 -4
  144. package/build/src/util/branch-name.js +13 -10
  145. package/build/src/{commit-split.d.ts → util/commit-split.d.ts} +2 -4
  146. package/build/src/{commit-split.js → util/commit-split.js} +4 -2
  147. package/build/src/util/indent-commit.d.ts +1 -1
  148. package/build/src/util/logger.d.ts +5 -2
  149. package/build/src/util/logger.js +9 -4
  150. package/build/src/util/pull-request-body.d.ts +20 -0
  151. package/build/src/util/pull-request-body.js +129 -0
  152. package/build/src/util/pull-request-title.d.ts +8 -6
  153. package/build/src/util/pull-request-title.js +20 -6
  154. package/build/src/util/tag-name.d.ts +9 -0
  155. package/build/src/util/tag-name.js +41 -0
  156. package/build/src/{updaters → util}/toml-edit.d.ts +0 -0
  157. package/build/src/{updaters → util}/toml-edit.js +0 -0
  158. package/build/src/version.d.ts +11 -0
  159. package/build/src/version.js +45 -0
  160. package/build/src/versioning-strategies/always-bump-patch.d.ts +7 -0
  161. package/build/src/{updaters/package-lock-json.js → versioning-strategies/always-bump-patch.js} +8 -11
  162. package/build/src/versioning-strategies/default.d.ts +15 -0
  163. package/build/src/versioning-strategies/default.js +67 -0
  164. package/build/src/versioning-strategies/dependency-manifest.d.ts +7 -0
  165. package/build/src/versioning-strategies/dependency-manifest.js +90 -0
  166. package/build/src/versioning-strategies/java-add-snapshot.d.ts +9 -0
  167. package/build/src/versioning-strategies/java-add-snapshot.js +53 -0
  168. package/build/src/versioning-strategies/java-snapshot.d.ts +9 -0
  169. package/build/src/versioning-strategies/java-snapshot.js +67 -0
  170. package/build/src/versioning-strategies/service-pack.d.ts +7 -0
  171. package/build/src/versioning-strategies/service-pack.js +40 -0
  172. package/build/src/versioning-strategy.d.ts +28 -0
  173. package/build/src/versioning-strategy.js +55 -0
  174. package/package.json +9 -8
  175. package/build/src/constants.d.ts +0 -6
  176. package/build/src/constants.js +0 -23
  177. package/build/src/conventional-commits.d.ts +0 -53
  178. package/build/src/conventional-commits.js +0 -167
  179. package/build/src/github-release.d.ts +0 -34
  180. package/build/src/github-release.js +0 -92
  181. package/build/src/graphql-to-commits.d.ts +0 -60
  182. package/build/src/graphql-to-commits.js +0 -112
  183. package/build/src/index.d.ts +0 -94
  184. package/build/src/index.js +0 -32
  185. package/build/src/plugins/index.d.ts +0 -5
  186. package/build/src/plugins/plugin.d.ts +0 -21
  187. package/build/src/release-pr.d.ts +0 -101
  188. package/build/src/release-pr.js +0 -461
  189. package/build/src/releasers/dart.d.ts +0 -9
  190. package/build/src/releasers/dart.js +0 -65
  191. package/build/src/releasers/elixir.d.ts +0 -5
  192. package/build/src/releasers/go-yoshi.d.ts +0 -10
  193. package/build/src/releasers/go-yoshi.js +0 -162
  194. package/build/src/releasers/go.d.ts +0 -6
  195. package/build/src/releasers/helm.d.ts +0 -9
  196. package/build/src/releasers/helm.js +0 -66
  197. package/build/src/releasers/index.d.ts +0 -7
  198. package/build/src/releasers/index.js +0 -76
  199. package/build/src/releasers/java/bump_type.d.ts +0 -4
  200. package/build/src/releasers/java/bump_type.js +0 -38
  201. package/build/src/releasers/java/stability.d.ts +0 -5
  202. package/build/src/releasers/java/stability.js +0 -37
  203. package/build/src/releasers/java/version.d.ts +0 -13
  204. package/build/src/releasers/java/version.js +0 -112
  205. package/build/src/releasers/java-backport.d.ts +0 -9
  206. package/build/src/releasers/java-backport.js +0 -43
  207. package/build/src/releasers/java-bom.d.ts +0 -16
  208. package/build/src/releasers/java-bom.js +0 -83
  209. package/build/src/releasers/java-lts.d.ts +0 -9
  210. package/build/src/releasers/java-lts.js +0 -47
  211. package/build/src/releasers/java-yoshi.d.ts +0 -28
  212. package/build/src/releasers/java-yoshi.js +0 -304
  213. package/build/src/releasers/krm-blueprint.d.ts +0 -6
  214. package/build/src/releasers/node.d.ts +0 -10
  215. package/build/src/releasers/node.js +0 -84
  216. package/build/src/releasers/ocaml.d.ts +0 -5
  217. package/build/src/releasers/php-yoshi.d.ts +0 -5
  218. package/build/src/releasers/php-yoshi.js +0 -191
  219. package/build/src/releasers/php.d.ts +0 -7
  220. package/build/src/releasers/python.d.ts +0 -11
  221. package/build/src/releasers/python.js +0 -127
  222. package/build/src/releasers/ruby-yoshi.d.ts +0 -5
  223. package/build/src/releasers/ruby-yoshi.js +0 -142
  224. package/build/src/releasers/ruby.d.ts +0 -11
  225. package/build/src/releasers/rust.d.ts +0 -30
  226. package/build/src/releasers/rust.js +0 -163
  227. package/build/src/releasers/simple.d.ts +0 -5
  228. package/build/src/releasers/terraform-module.d.ts +0 -6
  229. package/build/src/updaters/elixir-mix-exs.d.ts +0 -13
  230. package/build/src/updaters/java/google-utils.d.ts +0 -13
  231. package/build/src/updaters/java/java_update.d.ts +0 -13
  232. package/build/src/updaters/java/pom-xml.d.ts +0 -3
  233. package/build/src/updaters/java/readme.d.ts +0 -3
  234. package/build/src/updaters/java/readme.js.map +0 -1
  235. package/build/src/updaters/package-json.d.ts +0 -16
  236. package/build/src/updaters/package-lock-json.d.ts +0 -7
  237. package/build/src/updaters/php-client-version.d.ts +0 -13
  238. package/build/src/updaters/php-manifest.d.ts +0 -13
  239. package/build/src/updaters/pubspec-yaml.d.ts +0 -13
  240. package/build/src/updaters/root-composer-update-package.d.ts +0 -13
  241. package/build/src/updaters/root-composer-update-package.js +0 -45
  242. package/build/src/updaters/root-composer-update-packages.d.ts +0 -13
  243. package/build/src/updaters/samples-package-json.d.ts +0 -13
  244. package/build/src/updaters/update.d.ts +0 -20
  245. package/build/src/updaters/version-rb.d.ts +0 -13
  246. package/build/src/updaters/version-txt.d.ts +0 -12
  247. package/build/src/updaters/version.d.ts +0 -13
  248. package/build/src/updaters/version.js +0 -31
  249. package/build/src/util/checkpoint.d.ts +0 -6
  250. package/build/src/util/checkpoint.js +0 -33
  251. package/build/src/util/release-notes.d.ts +0 -7
  252. package/build/src/util/release-notes.js +0 -34
  253. package/build/src/util/to-conventional-changelog-format.d.ts +0 -2
@@ -1,163 +0,0 @@
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.Rust = void 0;
17
- const release_pr_1 = require("../release-pr");
18
- // Generic
19
- const changelog_1 = require("../updaters/changelog");
20
- // Cargo.toml support
21
- const cargo_toml_1 = require("../updaters/rust/cargo-toml");
22
- const cargo_lock_1 = require("../updaters/rust/cargo-lock");
23
- const common_1 = require("../updaters/rust/common");
24
- const logger_1 = require("../util/logger");
25
- class Rust extends release_pr_1.ReleasePR {
26
- async buildUpdates(changelogEntry, candidate, packageName) {
27
- const updates = [];
28
- updates.push(new changelog_1.Changelog({
29
- path: this.addPath(this.changelogPath),
30
- changelogEntry,
31
- version: candidate.version,
32
- packageName: packageName.name,
33
- }));
34
- const workspaceManifest = await this.getWorkspaceManifest();
35
- const manifestPaths = [];
36
- let lockPath;
37
- if (this.forManifestReleaser) {
38
- logger_1.logger.info('working for manifest releaser, only touching package, not dependencies');
39
- }
40
- if (workspaceManifest &&
41
- workspaceManifest.workspace &&
42
- workspaceManifest.workspace.members &&
43
- !this.forManifestReleaser) {
44
- const members = workspaceManifest.workspace.members;
45
- logger_1.logger.info(`found workspace with ${members.length} members, upgrading all`);
46
- for (const member of members) {
47
- manifestPaths.push(`${member}/Cargo.toml`);
48
- }
49
- lockPath = 'Cargo.lock';
50
- }
51
- else {
52
- const manifestPath = this.addPath('Cargo.toml');
53
- logger_1.logger.info(`single crate found, updating ${manifestPath}`);
54
- manifestPaths.push(this.addPath('Cargo.toml'));
55
- lockPath = this.addPath('Cargo.lock');
56
- }
57
- const versions = new Map();
58
- versions.set(packageName.name, candidate.version);
59
- for (const path of manifestPaths) {
60
- updates.push(new cargo_toml_1.CargoToml({
61
- path,
62
- changelogEntry,
63
- version: 'unused',
64
- versions,
65
- packageName: packageName.name,
66
- }));
67
- }
68
- if ((await this.exists(lockPath)) && !this.forManifestReleaser) {
69
- updates.push(new cargo_lock_1.CargoLock({
70
- path: lockPath,
71
- changelogEntry,
72
- version: 'unused',
73
- versions,
74
- packageName: packageName.name,
75
- }));
76
- }
77
- return updates;
78
- }
79
- async commits(opts) {
80
- const sha = opts.sha;
81
- const perPage = opts.perPage || 100;
82
- const labels = opts.labels || false;
83
- const path = opts.path || undefined;
84
- if (!path) {
85
- return await this.gh.commitsSinceSha(sha, perPage, labels, null);
86
- }
87
- // ReleasePR.commits() does not work well with monorepos. If a release tag
88
- // points to a sha1 that isn't in the history for the given `path`, it wil
89
- // generate a changelog *from the last 100 commits*, ignoring the `sha`
90
- // completely.
91
- // To avoid that, we first fetch commits without a path:
92
- const relevantCommits = new Set();
93
- for (const commit of await this.gh.commitsSinceSha(sha, perPage, labels, null)) {
94
- relevantCommits.add(commit.sha);
95
- }
96
- // Then fetch commits for the path (this will include commits for
97
- // previous versions)
98
- const allPathCommits = await this.gh.commitsSinceSha(sha, perPage, labels, path);
99
- // Then keep only the "path commits" that are relevant for this release
100
- const commits = allPathCommits.filter(commit => relevantCommits.has(commit.sha));
101
- if (commits.length) {
102
- logger_1.logger.info(`found ${commits.length} commits for ${path} since ${sha ? sha : 'beginning of time'}`);
103
- }
104
- else {
105
- logger_1.logger.warn(`no commits found since ${sha}`);
106
- }
107
- return commits;
108
- }
109
- defaultInitialVersion() {
110
- return '0.1.0';
111
- }
112
- // Always prefer the Cargo.toml name
113
- async getPackageName() {
114
- var _a, _b;
115
- if (this._packageName === undefined) {
116
- const packageManifest = await this.getPackageManifest();
117
- this.packageName = this._packageName = (_b = (_a = packageManifest === null || packageManifest === void 0 ? void 0 : packageManifest.package) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : this.packageName;
118
- }
119
- return {
120
- name: this.packageName,
121
- getComponent: () => this.packageName,
122
- };
123
- }
124
- /**
125
- * @returns the package's manifest, ie. `crates/foobar/Cargo.toml`
126
- */
127
- async getPackageManifest() {
128
- if (this.packageManifest === undefined) {
129
- this.packageManifest = await this.getManifest(this.addPath('Cargo.toml'));
130
- }
131
- return this.packageManifest;
132
- }
133
- /**
134
- * @returns the workspace's manifest, ie. `Cargo.toml` (top-level)
135
- */
136
- async getWorkspaceManifest() {
137
- if (this.workspaceManifest === undefined) {
138
- this.workspaceManifest = await this.getManifest('Cargo.toml');
139
- }
140
- return this.workspaceManifest;
141
- }
142
- async getManifest(path) {
143
- let content;
144
- try {
145
- content = await this.gh.getFileContents(path);
146
- }
147
- catch (e) {
148
- return null;
149
- }
150
- return common_1.parseCargoManifest(content.parsedContent);
151
- }
152
- async exists(path) {
153
- try {
154
- await this.gh.getFileContents(path);
155
- return true;
156
- }
157
- catch (_e) {
158
- return false;
159
- }
160
- }
161
- }
162
- exports.Rust = Rust;
163
- //# sourceMappingURL=rust.js.map
@@ -1,5 +0,0 @@
1
- import { ReleasePR, ReleaseCandidate, PackageName } from '../release-pr';
2
- import { Update } from '../updaters/update';
3
- export declare class Simple extends ReleasePR {
4
- protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
5
- }
@@ -1,6 +0,0 @@
1
- import { ReleaseCandidate, PackageName, ReleasePR } from '../release-pr';
2
- import { Update } from '../updaters/update';
3
- export declare class TerraformModule extends ReleasePR {
4
- protected buildUpdates(changelogEntry: string, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
5
- defaultInitialVersion(): string;
6
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class ElixirMixExs implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from '../update';
2
- import { GitHubFileContents } from '../../github';
3
- export declare class GoogleUtils implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,13 +0,0 @@
1
- import { Update, VersionsMap, UpdateOptions } from '../update';
2
- import { GitHubFileContents } from '../../github';
3
- export declare class JavaUpdate implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,3 +0,0 @@
1
- import { JavaUpdate } from './java_update';
2
- export declare class PomXML extends JavaUpdate {
3
- }
@@ -1,3 +0,0 @@
1
- import { JavaUpdate } from './java_update';
2
- export declare class Readme extends JavaUpdate {
3
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"readme.js","sourceRoot":"","sources":["../../../../src/updaters/java/readme.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,+CAAyC;AAEzC,MAAa,MAAO,SAAQ,wBAAU;CAAG;AAAzC,wBAAyC"}
@@ -1,16 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class PackageJson implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateVersion(parsed: {
13
- version: string;
14
- }): void;
15
- updateContent(content: string): string;
16
- }
@@ -1,7 +0,0 @@
1
- import { PackageJson } from './package-json';
2
- export declare class PackageLockJson extends PackageJson {
3
- updateVersion(parsed: {
4
- version: string;
5
- lockfileVersion: number;
6
- }): void;
7
- }
@@ -1,13 +0,0 @@
1
- import { GitHubFileContents } from '../github';
2
- import { Update, UpdateOptions, VersionsMap } from './update';
3
- export declare class PHPClientVersion implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class PHPManifest implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class PubspecYaml implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class RootComposerUpdatePackage implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,45 +0,0 @@
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.RootComposerUpdatePackage = void 0;
17
- const logger_1 = require("../util/logger");
18
- class RootComposerUpdatePackage {
19
- constructor(options) {
20
- this.create = false;
21
- this.path = options.path;
22
- this.changelogEntry = options.changelogEntry;
23
- this.version = options.version;
24
- this.versions = options.versions;
25
- this.packageName = options.packageName;
26
- }
27
- updateContent(content) {
28
- if (!this.versions || this.versions.size === 0) {
29
- logger_1.logger.info(`no updates necessary for ${this.path}`);
30
- return content;
31
- }
32
- const parsed = JSON.parse(content);
33
- if (this.versions) {
34
- // eslint-disable-next-line prefer-const
35
- for (let [key, version] of this.versions.entries()) {
36
- version = version || '1.0.0';
37
- logger_1.logger.info(`updating ${key} from ${parsed[key]} to ${version}`);
38
- parsed[key] = version;
39
- }
40
- }
41
- return JSON.stringify(parsed, null, 4) + '\n';
42
- }
43
- }
44
- exports.RootComposerUpdatePackage = RootComposerUpdatePackage;
45
- //# sourceMappingURL=root-composer-update-package.js.map
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class RootComposerUpdatePackages implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class SamplesPackageJson implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,20 +0,0 @@
1
- import { GitHubFileContents } from '../github';
2
- export declare type VersionsMap = Map<string, string>;
3
- export interface UpdateOptions {
4
- changelogEntry: string;
5
- packageName: string;
6
- path: string;
7
- version: string;
8
- versions?: VersionsMap;
9
- contents?: GitHubFileContents;
10
- }
11
- export interface Update {
12
- changelogEntry: string;
13
- create: boolean;
14
- path: string;
15
- packageName: string;
16
- version: string;
17
- versions?: VersionsMap;
18
- contents?: GitHubFileContents;
19
- updateContent(content: string | undefined): string;
20
- }
@@ -1,13 +0,0 @@
1
- import { Update, UpdateOptions, VersionsMap } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class VersionRB implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(content: string): string;
13
- }
@@ -1,12 +0,0 @@
1
- import { Update, UpdateOptions } from './update';
2
- import { GitHubFileContents } from '../github';
3
- export declare class VersionTxt implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- packageName: string;
8
- create: boolean;
9
- contents?: GitHubFileContents;
10
- constructor(options: UpdateOptions);
11
- updateContent(): string;
12
- }
@@ -1,13 +0,0 @@
1
- import { GitHubFileContents } from '../github';
2
- import { Update, UpdateOptions, VersionsMap } from './update';
3
- export declare class Version implements Update {
4
- path: string;
5
- changelogEntry: string;
6
- version: string;
7
- versions?: VersionsMap;
8
- packageName: string;
9
- create: boolean;
10
- contents?: GitHubFileContents;
11
- constructor(options: UpdateOptions);
12
- updateContent(): string;
13
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- // Copyright 2019 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.Version = void 0;
17
- class Version {
18
- constructor(options) {
19
- this.create = false;
20
- this.path = options.path;
21
- this.changelogEntry = options.changelogEntry;
22
- this.version = options.version;
23
- this.packageName = options.packageName;
24
- this.contents = options.contents;
25
- }
26
- updateContent() {
27
- return `${this.version}`;
28
- }
29
- }
30
- exports.Version = Version;
31
- //# sourceMappingURL=version.js.map
@@ -1,6 +0,0 @@
1
- export declare enum CheckpointType {
2
- Success = "success",
3
- Failure = "failure"
4
- }
5
- export declare type Checkpoint = (msg: string, type: CheckpointType) => void;
6
- export declare const checkpoint: Checkpoint;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- // Copyright 2019 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.checkpoint = exports.CheckpointType = void 0;
17
- const logger_1 = require("./logger");
18
- var CheckpointType;
19
- (function (CheckpointType) {
20
- CheckpointType["Success"] = "success";
21
- CheckpointType["Failure"] = "failure";
22
- })(CheckpointType = exports.CheckpointType || (exports.CheckpointType = {}));
23
- exports.checkpoint = function (msg, type) {
24
- if (process.env.ENVIRONMENT !== 'test') {
25
- if (type === CheckpointType.Success) {
26
- logger_1.logger.info(msg);
27
- }
28
- else {
29
- logger_1.logger.error(msg);
30
- }
31
- }
32
- };
33
- //# sourceMappingURL=checkpoint.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Parse release notes for a specific release from the CHANGELOG contents
3
- *
4
- * @param {string} changelogContents The entire CHANGELOG contents
5
- * @param {string} version The release version to extract notes from
6
- */
7
- export declare function extractReleaseNotes(changelogContents: string, version: string): string;
@@ -1,34 +0,0 @@
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.extractReleaseNotes = void 0;
17
- const errors_1 = require("../errors");
18
- /**
19
- * Parse release notes for a specific release from the CHANGELOG contents
20
- *
21
- * @param {string} changelogContents The entire CHANGELOG contents
22
- * @param {string} version The release version to extract notes from
23
- */
24
- function extractReleaseNotes(changelogContents, version) {
25
- version = version.replace(/^v/, '');
26
- const latestRe = new RegExp(`## v?\\[?${version}[^\\n]*\\n(.*?)(\\n##\\s|\\n### \\[?[0-9]+\\.|($(?![\r\n])))`, 'ms');
27
- const match = changelogContents.match(latestRe);
28
- if (!match) {
29
- throw new errors_1.MissingReleaseNotesError(changelogContents, version);
30
- }
31
- return match[1];
32
- }
33
- exports.extractReleaseNotes = extractReleaseNotes;
34
- //# sourceMappingURL=release-notes.js.map
@@ -1,2 +0,0 @@
1
- import * as parser from '@conventional-commits/parser';
2
- export default function toConventionalChangelogFormat(ast: parser.Message): parser.ConventionalChangelogCommit[];