release-please 12.6.0 → 12.6.1

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 (124) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/src/bootstrapper.d.ts +12 -0
  3. package/build/src/bootstrapper.js +60 -0
  4. package/build/src/changelog-notes/default.d.ts +15 -0
  5. package/build/src/changelog-notes/default.js +71 -0
  6. package/build/src/changelog-notes/github.d.ts +8 -0
  7. package/build/src/changelog-notes/github.js +26 -0
  8. package/build/src/changelog-notes.d.ts +19 -0
  9. package/build/src/changelog-notes.js +16 -0
  10. package/build/src/commit.d.ts +26 -0
  11. package/build/src/commit.js +316 -0
  12. package/build/src/github.js +1 -1
  13. package/build/src/plugin.d.ts +20 -0
  14. package/build/src/plugin.js +31 -0
  15. package/build/src/plugins/merge.d.ts +11 -0
  16. package/build/src/plugins/merge.js +83 -0
  17. package/build/src/plugins/workspace.d.ts +102 -0
  18. package/build/src/plugins/workspace.js +170 -0
  19. package/build/src/pull-request.d.ts +10 -0
  20. package/build/src/pull-request.js +16 -0
  21. package/build/src/release-notes.d.ts +29 -0
  22. package/build/src/release-notes.js +71 -0
  23. package/build/src/release-pull-request.d.ts +13 -0
  24. package/build/src/release-pull-request.js +16 -0
  25. package/build/src/release.d.ts +6 -0
  26. package/build/src/release.js +16 -0
  27. package/build/src/repository.d.ts +5 -0
  28. package/build/src/repository.js +16 -0
  29. package/build/src/strategies/dart.d.ts +8 -0
  30. package/build/src/strategies/dart.js +63 -0
  31. package/build/src/strategies/elixir.d.ts +5 -0
  32. package/build/src/strategies/elixir.js +45 -0
  33. package/build/src/strategies/go-yoshi.d.ts +13 -0
  34. package/build/src/strategies/go-yoshi.js +114 -0
  35. package/build/src/strategies/go.d.ts +5 -0
  36. package/build/src/strategies/go.js +36 -0
  37. package/build/src/strategies/helm.d.ts +8 -0
  38. package/build/src/strategies/helm.js +63 -0
  39. package/build/src/strategies/java-yoshi.d.ts +25 -0
  40. package/build/src/strategies/java-yoshi.js +259 -0
  41. package/build/src/strategies/krm-blueprint.d.ts +7 -0
  42. package/build/src/strategies/krm-blueprint.js +64 -0
  43. package/build/src/strategies/node.d.ts +9 -0
  44. package/build/src/strategies/node.js +82 -0
  45. package/build/src/strategies/ocaml.d.ts +5 -0
  46. package/build/src/strategies/ocaml.js +75 -0
  47. package/build/src/strategies/php-yoshi.d.ts +10 -0
  48. package/build/src/strategies/php-yoshi.js +214 -0
  49. package/build/src/strategies/php.d.ts +6 -0
  50. package/build/src/strategies/php.js +67 -0
  51. package/build/src/strategies/python.d.ts +8 -0
  52. package/build/src/strategies/python.js +117 -0
  53. package/build/src/strategies/ruby-yoshi.d.ts +17 -0
  54. package/build/src/strategies/ruby-yoshi.js +116 -0
  55. package/build/src/strategies/ruby.d.ts +13 -0
  56. package/build/src/strategies/ruby.js +61 -0
  57. package/build/src/strategies/rust.d.ts +20 -0
  58. package/build/src/strategies/rust.js +120 -0
  59. package/build/src/strategies/simple.d.ts +5 -0
  60. package/build/src/strategies/simple.js +45 -0
  61. package/build/src/strategies/terraform-module.d.ts +7 -0
  62. package/build/src/strategies/terraform-module.js +72 -0
  63. package/build/src/strategy.d.ts +103 -0
  64. package/build/src/strategy.js +249 -0
  65. package/build/src/update.d.ts +23 -0
  66. package/build/src/update.js +16 -0
  67. package/build/src/updaters/composite.d.ts +19 -0
  68. package/build/src/updaters/composite.js +42 -0
  69. package/build/src/updaters/dart/pubspec-yaml.d.ts +12 -0
  70. package/build/src/updaters/dart/pubspec-yaml.js +45 -0
  71. package/build/src/updaters/default.d.ts +21 -0
  72. package/build/src/updaters/default.js +36 -0
  73. package/build/src/updaters/dotnet/csproj.d.ts +12 -0
  74. package/build/src/updaters/dotnet/csproj.js +33 -0
  75. package/build/src/updaters/elixir/elixir-mix-exs.d.ts +12 -0
  76. package/build/src/updaters/elixir/elixir-mix-exs.js +37 -0
  77. package/build/src/updaters/go/version-go.d.ts +4 -0
  78. package/build/src/updaters/go/version-go.js +24 -0
  79. package/build/src/updaters/java/java-update.d.ts +14 -0
  80. package/build/src/updaters/java/java-update.js +76 -0
  81. package/build/src/updaters/node/package-json.d.ts +12 -0
  82. package/build/src/updaters/node/package-json.js +37 -0
  83. package/build/src/updaters/node/package-lock-json.d.ts +8 -0
  84. package/build/src/updaters/node/package-lock-json.js +36 -0
  85. package/build/src/updaters/node/samples-package-json.d.ts +23 -0
  86. package/build/src/updaters/node/samples-package-json.js +49 -0
  87. package/build/src/updaters/php/php-client-version.d.ts +12 -0
  88. package/build/src/updaters/php/php-client-version.js +32 -0
  89. package/build/src/updaters/php/php-manifest.d.ts +13 -0
  90. package/build/src/updaters/php/php-manifest.js +55 -0
  91. package/build/src/updaters/php/root-composer-update-packages.d.ts +12 -0
  92. package/build/src/updaters/php/root-composer-update-packages.js +47 -0
  93. package/build/src/updaters/raw-content.d.ts +19 -0
  94. package/build/src/updaters/raw-content.js +39 -0
  95. package/build/src/updaters/release-please-config.d.ts +8 -0
  96. package/build/src/updaters/release-please-config.js +41 -0
  97. package/build/src/updaters/ruby/version-rb.d.ts +12 -0
  98. package/build/src/updaters/ruby/version-rb.js +32 -0
  99. package/build/src/updaters/rust/cargo-toml.js +5 -1
  100. package/build/src/util/commit-split.d.ts +11 -0
  101. package/build/src/util/commit-split.js +94 -0
  102. package/build/src/util/pull-request-body.d.ts +20 -0
  103. package/build/src/util/pull-request-body.js +129 -0
  104. package/build/src/util/tag-name.d.ts +9 -0
  105. package/build/src/util/tag-name.js +41 -0
  106. package/build/src/util/toml-edit.d.ts +8 -0
  107. package/build/src/util/toml-edit.js +125 -0
  108. package/build/src/version.d.ts +11 -0
  109. package/build/src/version.js +45 -0
  110. package/build/src/versioning-strategies/always-bump-patch.d.ts +7 -0
  111. package/build/src/versioning-strategies/always-bump-patch.js +25 -0
  112. package/build/src/versioning-strategies/default.d.ts +15 -0
  113. package/build/src/versioning-strategies/default.js +67 -0
  114. package/build/src/versioning-strategies/dependency-manifest.d.ts +7 -0
  115. package/build/src/versioning-strategies/dependency-manifest.js +90 -0
  116. package/build/src/versioning-strategies/java-add-snapshot.d.ts +9 -0
  117. package/build/src/versioning-strategies/java-add-snapshot.js +53 -0
  118. package/build/src/versioning-strategies/java-snapshot.d.ts +9 -0
  119. package/build/src/versioning-strategies/java-snapshot.js +67 -0
  120. package/build/src/versioning-strategies/service-pack.d.ts +7 -0
  121. package/build/src/versioning-strategies/service-pack.js +40 -0
  122. package/build/src/versioning-strategy.d.ts +28 -0
  123. package/build/src/versioning-strategy.js +55 -0
  124. package/package.json +2 -2
@@ -0,0 +1,76 @@
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.JavaUpdate = void 0;
17
+ const default_1 = require("../default");
18
+ const logger_1 = require("../../util/logger");
19
+ const INLINE_UPDATE_REGEX = /{x-version-update:([\w\-_]+):(current|released)}/;
20
+ const BLOCK_START_REGEX = /{x-version-update-start:([\w\-_]+):(current|released)}/;
21
+ const BLOCK_END_REGEX = /{x-version-update-end}/;
22
+ const VERSION_REGEX = /\d+\.\d+\.\d+(-\w+(\.\d+)?)?(-SNAPSHOT)?/;
23
+ /**
24
+ * Updates a file annotated with region markers. These region markers are
25
+ * either denoted inline with `{x-version-update:<component-name>:current|released}`
26
+ * or with a `{x-version-update-start:<component-name>}` and `{x-version-update-end}`.
27
+ */
28
+ class JavaUpdate extends default_1.DefaultUpdater {
29
+ /**
30
+ * Given initial file contents, return updated contents.
31
+ * @param {string} content The initial content
32
+ * @returns {string} The updated content
33
+ */
34
+ updateContent(content) {
35
+ if (!this.versionsMap) {
36
+ logger_1.logger.warn('missing versions map');
37
+ return content;
38
+ }
39
+ const newLines = [];
40
+ let blockPackageName = null;
41
+ content.split(/\r?\n/).forEach(line => {
42
+ let match = line.match(INLINE_UPDATE_REGEX);
43
+ if (match) {
44
+ const newVersion = this.versionsMap.get(match[1]);
45
+ if (newVersion) {
46
+ newLines.push(line.replace(VERSION_REGEX, newVersion.toString()));
47
+ }
48
+ else {
49
+ newLines.push(line);
50
+ }
51
+ }
52
+ else if (blockPackageName) {
53
+ const newVersion = this.versionsMap.get(blockPackageName);
54
+ if (newVersion) {
55
+ newLines.push(line.replace(VERSION_REGEX, newVersion.toString()));
56
+ }
57
+ else {
58
+ newLines.push(line);
59
+ }
60
+ if (line.match(BLOCK_END_REGEX)) {
61
+ blockPackageName = null;
62
+ }
63
+ }
64
+ else {
65
+ match = line.match(BLOCK_START_REGEX);
66
+ if (match) {
67
+ blockPackageName = match[1];
68
+ }
69
+ newLines.push(line);
70
+ }
71
+ });
72
+ return newLines.join('\n');
73
+ }
74
+ }
75
+ exports.JavaUpdate = JavaUpdate;
76
+ //# sourceMappingURL=java-update.js.map
@@ -0,0 +1,12 @@
1
+ import { DefaultUpdater } from '../default';
2
+ /**
3
+ * This updates a Node.js package.json file's main version.
4
+ */
5
+ export declare class PackageJson extends DefaultUpdater {
6
+ /**
7
+ * Given initial file contents, return updated contents.
8
+ * @param {string} content The initial content
9
+ * @returns {string} The updated content
10
+ */
11
+ updateContent(content: string): string;
12
+ }
@@ -0,0 +1,37 @@
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.PackageJson = void 0;
17
+ const json_stringify_1 = require("../../util/json-stringify");
18
+ const logger_1 = require("../../util/logger");
19
+ const default_1 = require("../default");
20
+ /**
21
+ * This updates a Node.js package.json file's main version.
22
+ */
23
+ class PackageJson extends default_1.DefaultUpdater {
24
+ /**
25
+ * Given initial file contents, return updated contents.
26
+ * @param {string} content The initial content
27
+ * @returns {string} The updated content
28
+ */
29
+ updateContent(content) {
30
+ const parsed = JSON.parse(content);
31
+ logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
32
+ parsed.version = this.version.toString();
33
+ return json_stringify_1.jsonStringify(parsed, content);
34
+ }
35
+ }
36
+ exports.PackageJson = PackageJson;
37
+ //# sourceMappingURL=package-json.js.map
@@ -0,0 +1,8 @@
1
+ import { DefaultUpdater } from '../default';
2
+ /**
3
+ * Updates a Node.js package-lock.json file's version and '' package
4
+ * version (for a v2 lock file).
5
+ */
6
+ export declare class PackageLockJson extends DefaultUpdater {
7
+ updateContent(content: string): string;
8
+ }
@@ -0,0 +1,36 @@
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.PackageLockJson = void 0;
17
+ const json_stringify_1 = require("../../util/json-stringify");
18
+ const logger_1 = require("../../util/logger");
19
+ const default_1 = require("../default");
20
+ /**
21
+ * Updates a Node.js package-lock.json file's version and '' package
22
+ * version (for a v2 lock file).
23
+ */
24
+ class PackageLockJson extends default_1.DefaultUpdater {
25
+ updateContent(content) {
26
+ const parsed = JSON.parse(content);
27
+ logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
28
+ parsed.version = this.version.toString();
29
+ if (parsed.lockfileVersion === 2) {
30
+ parsed.packages[''].version = this.version.toString();
31
+ }
32
+ return json_stringify_1.jsonStringify(parsed, content);
33
+ }
34
+ }
35
+ exports.PackageLockJson = PackageLockJson;
36
+ //# sourceMappingURL=package-lock-json.js.map
@@ -0,0 +1,23 @@
1
+ import { DefaultUpdater, UpdateOptions } from '../default';
2
+ interface SamplesPackageJsonOptions extends UpdateOptions {
3
+ packageName: string;
4
+ }
5
+ /**
6
+ * Updates the a Node.js package.json file with the library in the
7
+ * dependencies section.
8
+ */
9
+ export declare class SamplesPackageJson extends DefaultUpdater {
10
+ packageName: string;
11
+ /**
12
+ * Instantiate a new SamplesPackageJson updater
13
+ * @param options
14
+ */
15
+ constructor(options: SamplesPackageJsonOptions);
16
+ /**
17
+ * Given initial file contents, return updated contents.
18
+ * @param {string} content The initial content
19
+ * @returns {string} The updated content
20
+ */
21
+ updateContent(content: string): string;
22
+ }
23
+ export {};
@@ -0,0 +1,49 @@
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.SamplesPackageJson = void 0;
17
+ const logger_1 = require("../../util/logger");
18
+ const json_stringify_1 = require("../../util/json-stringify");
19
+ const default_1 = require("../default");
20
+ /**
21
+ * Updates the a Node.js package.json file with the library in the
22
+ * dependencies section.
23
+ */
24
+ class SamplesPackageJson extends default_1.DefaultUpdater {
25
+ /**
26
+ * Instantiate a new SamplesPackageJson updater
27
+ * @param options
28
+ */
29
+ constructor(options) {
30
+ super(options);
31
+ this.packageName = options.packageName;
32
+ }
33
+ /**
34
+ * Given initial file contents, return updated contents.
35
+ * @param {string} content The initial content
36
+ * @returns {string} The updated content
37
+ */
38
+ updateContent(content) {
39
+ const parsed = JSON.parse(content);
40
+ if (!parsed.dependencies || !parsed.dependencies[this.packageName]) {
41
+ return content;
42
+ }
43
+ logger_1.logger.info(`updating ${this.packageName} dependency from ${parsed.dependencies[this.packageName]} to ^${this.version}`);
44
+ parsed.dependencies[this.packageName] = `^${this.version}`;
45
+ return json_stringify_1.jsonStringify(parsed, content);
46
+ }
47
+ }
48
+ exports.SamplesPackageJson = SamplesPackageJson;
49
+ //# sourceMappingURL=samples-package-json.js.map
@@ -0,0 +1,12 @@
1
+ import { DefaultUpdater } from '../default';
2
+ /**
3
+ * Updates a php file that has a constant VERSION defined.
4
+ */
5
+ export declare class PHPClientVersion extends DefaultUpdater {
6
+ /**
7
+ * Given initial file contents, return updated contents.
8
+ * @param {string} content The initial content
9
+ * @returns {string} The updated content
10
+ */
11
+ updateContent(content: string): string;
12
+ }
@@ -0,0 +1,32 @@
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.PHPClientVersion = void 0;
17
+ const default_1 = require("../default");
18
+ /**
19
+ * Updates a php file that has a constant VERSION defined.
20
+ */
21
+ class PHPClientVersion extends default_1.DefaultUpdater {
22
+ /**
23
+ * Given initial file contents, return updated contents.
24
+ * @param {string} content The initial content
25
+ * @returns {string} The updated content
26
+ */
27
+ updateContent(content) {
28
+ return content.replace(/const VERSION = '[0-9]+\.[0-9]+\.[0-9]+'/, `const VERSION = '${this.version}'`);
29
+ }
30
+ }
31
+ exports.PHPClientVersion = PHPClientVersion;
32
+ //# sourceMappingURL=php-client-version.js.map
@@ -0,0 +1,13 @@
1
+ import { DefaultUpdater } from '../default';
2
+ /**
3
+ * Updates a manifest.json file.
4
+ * @see https://github.com/googleapis/google-cloud-php/blob/master/docs/manifest.json
5
+ */
6
+ export declare class PHPManifest extends DefaultUpdater {
7
+ /**
8
+ * Given initial file contents, return updated contents.
9
+ * @param {string} content The initial content
10
+ * @returns {string} The updated content
11
+ */
12
+ updateContent(content: string): string;
13
+ }
@@ -0,0 +1,55 @@
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.PHPManifest = void 0;
17
+ const logger_1 = require("../../util/logger");
18
+ const json_stringify_1 = require("../../util/json-stringify");
19
+ const default_1 = require("../default");
20
+ /**
21
+ * Updates a manifest.json file.
22
+ * @see https://github.com/googleapis/google-cloud-php/blob/master/docs/manifest.json
23
+ */
24
+ class PHPManifest extends default_1.DefaultUpdater {
25
+ /**
26
+ * Given initial file contents, return updated contents.
27
+ * @param {string} content The initial content
28
+ * @returns {string} The updated content
29
+ */
30
+ updateContent(content) {
31
+ if (!this.versionsMap || this.versionsMap.size === 0) {
32
+ logger_1.logger.info('no updates necessary');
33
+ return content;
34
+ }
35
+ const parsed = JSON.parse(content);
36
+ parsed.modules.forEach((module) => {
37
+ if (!this.versionsMap)
38
+ return;
39
+ for (const [key, version] of this.versionsMap) {
40
+ if (module.name === key) {
41
+ logger_1.logger.info(`adding ${key}@${version} to manifest`);
42
+ module.versions.unshift(`v${version}`);
43
+ }
44
+ }
45
+ // the mono-repo's own API version should be added to the
46
+ // google/cloud key:
47
+ if (module.name === 'google/cloud') {
48
+ module.versions.unshift(`v${this.version}`);
49
+ }
50
+ });
51
+ return json_stringify_1.jsonStringify(parsed, content);
52
+ }
53
+ }
54
+ exports.PHPManifest = PHPManifest;
55
+ //# sourceMappingURL=php-manifest.js.map
@@ -0,0 +1,12 @@
1
+ import { DefaultUpdater } from '../default';
2
+ /**
3
+ * Updates a root composer.json
4
+ */
5
+ export declare class RootComposerUpdatePackages extends DefaultUpdater {
6
+ /**
7
+ * Given initial file contents, return updated contents.
8
+ * @param {string} content The initial content
9
+ * @returns {string} The updated content
10
+ */
11
+ updateContent(content: string): string;
12
+ }
@@ -0,0 +1,47 @@
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.RootComposerUpdatePackages = void 0;
17
+ const logger_1 = require("../../util/logger");
18
+ const json_stringify_1 = require("../../util/json-stringify");
19
+ const default_1 = require("../default");
20
+ /**
21
+ * Updates a root composer.json
22
+ */
23
+ class RootComposerUpdatePackages extends default_1.DefaultUpdater {
24
+ /**
25
+ * Given initial file contents, return updated contents.
26
+ * @param {string} content The initial content
27
+ * @returns {string} The updated content
28
+ */
29
+ updateContent(content) {
30
+ if (!this.versionsMap || this.versionsMap.size === 0) {
31
+ logger_1.logger.info('no updates necessary');
32
+ return content;
33
+ }
34
+ const parsed = JSON.parse(content);
35
+ if (this.versionsMap) {
36
+ // eslint-disable-next-line prefer-const
37
+ for (let [key, version] of this.versionsMap.entries()) {
38
+ version = version || '1.0.0';
39
+ logger_1.logger.info(`updating ${key} from ${parsed.replace[key]} to ${version}`);
40
+ parsed.replace[key] = version.toString();
41
+ }
42
+ }
43
+ return json_stringify_1.jsonStringify(parsed, content);
44
+ }
45
+ }
46
+ exports.RootComposerUpdatePackages = RootComposerUpdatePackages;
47
+ //# sourceMappingURL=root-composer-update-packages.js.map
@@ -0,0 +1,19 @@
1
+ import { Updater } from '../update';
2
+ /**
3
+ * This updater ignores previous content and writes the provided
4
+ * content verbatim.
5
+ */
6
+ export declare class RawContent implements Updater {
7
+ rawContent: string;
8
+ /**
9
+ * Create a new RawContent instance
10
+ * @param {string} rawContent The raw content to set as the contents.
11
+ */
12
+ constructor(rawContent: string);
13
+ /**
14
+ * Given initial file contents, return updated contents.
15
+ * @param {string} content The initial content
16
+ * @returns {string} The updated content
17
+ */
18
+ updateContent(_content: string | undefined): string;
19
+ }
@@ -0,0 +1,39 @@
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.RawContent = void 0;
17
+ /**
18
+ * This updater ignores previous content and writes the provided
19
+ * content verbatim.
20
+ */
21
+ class RawContent {
22
+ /**
23
+ * Create a new RawContent instance
24
+ * @param {string} rawContent The raw content to set as the contents.
25
+ */
26
+ constructor(rawContent) {
27
+ this.rawContent = rawContent;
28
+ }
29
+ /**
30
+ * Given initial file contents, return updated contents.
31
+ * @param {string} content The initial content
32
+ * @returns {string} The updated content
33
+ */
34
+ updateContent(_content) {
35
+ return this.rawContent;
36
+ }
37
+ }
38
+ exports.RawContent = RawContent;
39
+ //# sourceMappingURL=raw-content.js.map
@@ -0,0 +1,8 @@
1
+ import { Updater } from '../update';
2
+ import { ReleaserConfig } from '../manifest';
3
+ export declare class ReleasePleaseConfig implements Updater {
4
+ path: string;
5
+ config: ReleaserConfig;
6
+ constructor(path: string, config: ReleaserConfig);
7
+ updateContent(content: string): string;
8
+ }
@@ -0,0 +1,41 @@
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.ReleasePleaseConfig = void 0;
17
+ const json_stringify_1 = require("../util/json-stringify");
18
+ class ReleasePleaseConfig {
19
+ constructor(path, config) {
20
+ this.path = path;
21
+ this.config = config;
22
+ }
23
+ updateContent(content) {
24
+ let parsed;
25
+ if (content) {
26
+ parsed = JSON.parse(content);
27
+ }
28
+ else {
29
+ parsed = { packages: {} };
30
+ }
31
+ parsed.packages[this.path] = this.config;
32
+ if (content) {
33
+ return json_stringify_1.jsonStringify(parsed, content);
34
+ }
35
+ else {
36
+ return JSON.stringify(parsed, null, 2);
37
+ }
38
+ }
39
+ }
40
+ exports.ReleasePleaseConfig = ReleasePleaseConfig;
41
+ //# sourceMappingURL=release-please-config.js.map
@@ -0,0 +1,12 @@
1
+ import { DefaultUpdater } from '../default';
2
+ /**
3
+ * Updates a versions.rb file which is expected to have a version string.
4
+ */
5
+ export declare class VersionRB extends DefaultUpdater {
6
+ /**
7
+ * Given initial file contents, return updated contents.
8
+ * @param {string} content The initial content
9
+ * @returns {string} The updated content
10
+ */
11
+ updateContent(content: string): string;
12
+ }
@@ -0,0 +1,32 @@
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.VersionRB = void 0;
17
+ const default_1 = require("../default");
18
+ /**
19
+ * Updates a versions.rb file which is expected to have a version string.
20
+ */
21
+ class VersionRB extends default_1.DefaultUpdater {
22
+ /**
23
+ * Given initial file contents, return updated contents.
24
+ * @param {string} content The initial content
25
+ * @returns {string} The updated content
26
+ */
27
+ updateContent(content) {
28
+ return content.replace(/(["'])[0-9]+\.[0-9]+\.[0-9](-\w+)?["']/, `$1${this.version}$1`);
29
+ }
30
+ }
31
+ exports.VersionRB = VersionRB;
32
+ //# sourceMappingURL=version-rb.js.map
@@ -57,7 +57,11 @@ class CargoToml {
57
57
  }
58
58
  const dep = deps[pkgName];
59
59
  if (typeof dep === 'string' || typeof dep.path === 'undefined') {
60
- logger_1.logger.info(`skipping ${depKind}.${pkgName} in ${this.path}`);
60
+ logger_1.logger.info(`skipping ${depKind}.${pkgName} in ${this.path} (no path set)`);
61
+ continue; // to next depKind
62
+ }
63
+ if (typeof dep.version === 'undefined') {
64
+ logger_1.logger.info(`skipping ${depKind}.${pkgName} in ${this.path} (no version set)`);
61
65
  continue; // to next depKind
62
66
  }
63
67
  logger_1.logger.info(`updating ${this.path} ${depKind}.${pkgName} from ${dep.version} to ${pkgVersion}`);
@@ -0,0 +1,11 @@
1
+ import { Commit } from '../commit';
2
+ export interface CommitSplitOptions {
3
+ includeEmpty?: boolean;
4
+ packagePaths?: string[];
5
+ }
6
+ export declare class CommitSplit {
7
+ includeEmpty: boolean;
8
+ packagePaths?: string[];
9
+ constructor(opts?: CommitSplitOptions);
10
+ split<T extends Commit>(commits: T[]): Record<string, T[]>;
11
+ }