release-please 12.3.0 → 13.0.0-candidate.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +5 -0
- package/build/src/bin/release-please.d.ts +51 -11
- package/build/src/bin/release-please.js +409 -150
- package/build/src/bootstrapper.d.ts +12 -0
- package/build/src/bootstrapper.js +60 -0
- package/build/src/commit.d.ts +26 -0
- package/build/src/{util/to-conventional-changelog-format.js → commit.js} +97 -2
- package/build/src/errors/index.d.ts +0 -5
- package/build/src/errors/index.js +1 -10
- package/build/src/factory.d.ts +25 -37
- package/build/src/factory.js +159 -150
- package/build/src/github.d.ts +151 -883
- package/build/src/github.js +584 -1013
- package/build/src/manifest.d.ts +177 -48
- package/build/src/manifest.js +583 -487
- package/build/src/plugin.d.ts +20 -0
- package/build/src/{plugins/plugin.js → plugin.js} +10 -9
- package/build/src/plugins/cargo-workspace.d.ts +48 -18
- package/build/src/plugins/cargo-workspace.js +247 -328
- package/build/src/plugins/merge.d.ts +11 -0
- package/build/src/plugins/merge.js +83 -0
- package/build/src/plugins/node-workspace.d.ts +35 -17
- package/build/src/plugins/node-workspace.js +234 -271
- package/build/src/plugins/workspace.d.ts +102 -0
- package/build/src/plugins/workspace.js +170 -0
- package/build/src/pull-request.d.ts +10 -0
- package/build/src/{updaters/java/readme.js → pull-request.js} +2 -7
- package/build/src/release-notes.d.ts +29 -0
- package/build/src/release-notes.js +71 -0
- package/build/src/release-pull-request.d.ts +13 -0
- package/build/src/{updaters/java/pom-xml.js → release-pull-request.js} +2 -7
- package/build/src/release.d.ts +6 -0
- package/build/src/release.js +16 -0
- package/build/src/repository.d.ts +5 -0
- package/build/src/repository.js +16 -0
- package/build/src/strategies/dart.d.ts +8 -0
- package/build/src/strategies/dart.js +63 -0
- package/build/src/strategies/elixir.d.ts +5 -0
- package/build/src/{releasers → strategies}/elixir.js +18 -14
- package/build/src/strategies/go-yoshi.d.ts +13 -0
- package/build/src/strategies/go-yoshi.js +106 -0
- package/build/src/strategies/go.d.ts +5 -0
- package/build/src/{releasers → strategies}/go.js +11 -12
- package/build/src/strategies/helm.d.ts +8 -0
- package/build/src/strategies/helm.js +63 -0
- package/build/src/strategies/java-yoshi.d.ts +24 -0
- package/build/src/strategies/java-yoshi.js +203 -0
- package/build/src/strategies/krm-blueprint.d.ts +7 -0
- package/build/src/{releasers → strategies}/krm-blueprint.js +26 -22
- package/build/src/strategies/node.d.ts +9 -0
- package/build/src/strategies/node.js +82 -0
- package/build/src/strategies/ocaml.d.ts +5 -0
- package/build/src/{releasers → strategies}/ocaml.js +34 -28
- package/build/src/strategies/php-yoshi.d.ts +9 -0
- package/build/src/strategies/php-yoshi.js +214 -0
- package/build/src/strategies/php.d.ts +6 -0
- package/build/src/{releasers → strategies}/php.js +24 -23
- package/build/src/strategies/python.d.ts +8 -0
- package/build/src/strategies/python.js +117 -0
- package/build/src/strategies/ruby-yoshi.d.ts +17 -0
- package/build/src/strategies/ruby-yoshi.js +116 -0
- package/build/src/strategies/ruby.d.ts +13 -0
- package/build/src/{releasers → strategies}/ruby.js +26 -27
- package/build/src/strategies/rust.d.ts +20 -0
- package/build/src/strategies/rust.js +120 -0
- package/build/src/strategies/simple.d.ts +5 -0
- package/build/src/{releasers → strategies}/simple.js +18 -14
- package/build/src/strategies/terraform-module.d.ts +7 -0
- package/build/src/{releasers → strategies}/terraform-module.js +29 -23
- package/build/src/strategy.d.ts +99 -0
- package/build/src/strategy.js +237 -0
- package/build/src/update.d.ts +23 -0
- package/build/src/{updaters/update.js → update.js} +1 -1
- package/build/src/updaters/changelog.d.ts +7 -10
- package/build/src/updaters/changelog.js +3 -9
- package/build/src/updaters/changelog.js.map +1 -1
- package/build/src/updaters/composite.d.ts +19 -0
- package/build/src/updaters/composite.js +42 -0
- package/build/src/updaters/dart/pubspec-yaml.d.ts +12 -0
- package/build/src/updaters/dart/pubspec-yaml.js +45 -0
- package/build/src/updaters/default.d.ts +21 -0
- package/build/src/updaters/{version-txt.js → default.js} +16 -10
- package/build/src/updaters/dotnet/csproj.d.ts +12 -0
- package/build/src/updaters/{java/google-utils.js → dotnet/csproj.js} +16 -13
- package/build/src/updaters/elixir/elixir-mix-exs.d.ts +12 -0
- package/build/src/updaters/{elixir-mix-exs.js → elixir/elixir-mix-exs.js} +12 -10
- package/build/src/updaters/helm/chart-yaml.d.ts +10 -11
- package/build/src/updaters/helm/chart-yaml.js +12 -10
- package/build/src/updaters/java/java-update.d.ts +14 -0
- package/build/src/updaters/java/{java_update.js → java-update.js} +22 -22
- package/build/src/updaters/java/versions-manifest.d.ts +12 -2
- package/build/src/updaters/java/versions-manifest.js +20 -4
- package/build/src/updaters/krm/krm-blueprint-version.d.ts +10 -11
- package/build/src/updaters/krm/krm-blueprint-version.js +13 -12
- package/build/src/updaters/node/package-json.d.ts +12 -0
- package/build/src/updaters/{package-json.js → node/package-json.js} +14 -16
- package/build/src/updaters/node/package-lock-json.d.ts +8 -0
- package/build/src/updaters/node/package-lock-json.js +36 -0
- package/build/src/updaters/node/samples-package-json.d.ts +23 -0
- package/build/src/updaters/{samples-package-json.js → node/samples-package-json.js} +19 -8
- package/build/src/updaters/ocaml/dune-project.d.ts +10 -11
- package/build/src/updaters/ocaml/dune-project.js +11 -9
- package/build/src/updaters/ocaml/esy-json.d.ts +10 -11
- package/build/src/updaters/ocaml/esy-json.js +12 -10
- package/build/src/updaters/ocaml/opam.d.ts +10 -11
- package/build/src/updaters/ocaml/opam.js +11 -9
- package/build/src/updaters/php/php-client-version.d.ts +12 -0
- package/build/src/updaters/{php-client-version.js → php/php-client-version.js} +10 -9
- package/build/src/updaters/php/php-manifest.d.ts +13 -0
- package/build/src/updaters/{php-manifest.js → php/php-manifest.js} +17 -15
- package/build/src/updaters/php/root-composer-update-packages.d.ts +12 -0
- package/build/src/updaters/{root-composer-update-packages.js → php/root-composer-update-packages.js} +17 -16
- package/build/src/updaters/python/pyproject-toml.d.ts +10 -11
- package/build/src/updaters/python/pyproject-toml.js +13 -11
- package/build/src/updaters/python/python-file-with-version.d.ts +7 -11
- package/build/src/updaters/python/python-file-with-version.js +7 -8
- package/build/src/updaters/python/setup-cfg.d.ts +10 -11
- package/build/src/updaters/python/setup-cfg.js +10 -8
- package/build/src/updaters/python/setup-py.d.ts +10 -11
- package/build/src/updaters/python/setup-py.js +10 -8
- package/build/src/updaters/raw-content.d.ts +19 -0
- package/build/src/{plugins/index.js → updaters/raw-content.js} +23 -12
- package/build/src/updaters/release-please-config.d.ts +8 -0
- package/build/src/updaters/release-please-config.js +41 -0
- package/build/src/updaters/release-please-manifest.d.ts +2 -11
- package/build/src/updaters/release-please-manifest.js +11 -14
- package/build/src/updaters/ruby/version-rb.d.ts +12 -0
- package/build/src/updaters/{version-rb.js → ruby/version-rb.js} +10 -8
- package/build/src/updaters/rust/cargo-lock.d.ts +7 -11
- package/build/src/updaters/rust/cargo-lock.js +14 -16
- package/build/src/updaters/rust/cargo-toml.d.ts +7 -11
- package/build/src/updaters/rust/cargo-toml.js +19 -21
- package/build/src/updaters/terraform/module-version.d.ts +10 -11
- package/build/src/updaters/terraform/module-version.js +11 -9
- package/build/src/updaters/terraform/readme.d.ts +10 -11
- package/build/src/updaters/terraform/readme.js +11 -10
- package/build/src/updaters/terraform/readme.js.map +1 -1
- package/build/src/util/branch-name.d.ts +5 -4
- package/build/src/util/branch-name.js +13 -10
- package/build/src/{commit-split.d.ts → util/commit-split.d.ts} +2 -4
- package/build/src/{commit-split.js → util/commit-split.js} +4 -2
- package/build/src/util/indent-commit.d.ts +1 -1
- package/build/src/util/logger.d.ts +5 -2
- package/build/src/util/logger.js +9 -4
- package/build/src/util/pull-request-body.d.ts +20 -0
- package/build/src/util/pull-request-body.js +129 -0
- package/build/src/util/pull-request-title.d.ts +8 -6
- package/build/src/util/pull-request-title.js +20 -6
- package/build/src/util/tag-name.d.ts +9 -0
- package/build/src/util/tag-name.js +41 -0
- package/build/src/{updaters → util}/toml-edit.d.ts +0 -0
- package/build/src/{updaters → util}/toml-edit.js +0 -0
- package/build/src/version.d.ts +11 -0
- package/build/src/version.js +45 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +7 -0
- package/build/src/{updaters/package-lock-json.js → versioning-strategies/always-bump-patch.js} +8 -11
- package/build/src/versioning-strategies/default.d.ts +15 -0
- package/build/src/versioning-strategies/default.js +67 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +7 -0
- package/build/src/versioning-strategies/dependency-manifest.js +90 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +9 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +53 -0
- package/build/src/versioning-strategies/java-snapshot.d.ts +9 -0
- package/build/src/versioning-strategies/java-snapshot.js +67 -0
- package/build/src/versioning-strategies/service-pack.d.ts +7 -0
- package/build/src/versioning-strategies/service-pack.js +40 -0
- package/build/src/versioning-strategy.d.ts +28 -0
- package/build/src/versioning-strategy.js +55 -0
- package/package.json +9 -8
- package/build/src/constants.d.ts +0 -6
- package/build/src/constants.js +0 -23
- package/build/src/conventional-commits.d.ts +0 -53
- package/build/src/conventional-commits.js +0 -167
- package/build/src/github-release.d.ts +0 -34
- package/build/src/github-release.js +0 -92
- package/build/src/graphql-to-commits.d.ts +0 -60
- package/build/src/graphql-to-commits.js +0 -112
- package/build/src/index.d.ts +0 -94
- package/build/src/index.js +0 -32
- package/build/src/plugins/index.d.ts +0 -5
- package/build/src/plugins/plugin.d.ts +0 -21
- package/build/src/release-pr.d.ts +0 -101
- package/build/src/release-pr.js +0 -461
- package/build/src/releasers/elixir.d.ts +0 -5
- package/build/src/releasers/go-yoshi.d.ts +0 -10
- package/build/src/releasers/go-yoshi.js +0 -162
- package/build/src/releasers/go.d.ts +0 -6
- package/build/src/releasers/helm.d.ts +0 -9
- package/build/src/releasers/helm.js +0 -66
- package/build/src/releasers/index.d.ts +0 -7
- package/build/src/releasers/index.js +0 -72
- package/build/src/releasers/java/bump_type.d.ts +0 -4
- package/build/src/releasers/java/bump_type.js +0 -38
- package/build/src/releasers/java/stability.d.ts +0 -5
- package/build/src/releasers/java/stability.js +0 -37
- package/build/src/releasers/java/version.d.ts +0 -13
- package/build/src/releasers/java/version.js +0 -112
- package/build/src/releasers/java-bom.d.ts +0 -16
- package/build/src/releasers/java-bom.js +0 -83
- package/build/src/releasers/java-lts.d.ts +0 -9
- package/build/src/releasers/java-lts.js +0 -47
- package/build/src/releasers/java-yoshi.d.ts +0 -28
- package/build/src/releasers/java-yoshi.js +0 -304
- package/build/src/releasers/krm-blueprint.d.ts +0 -6
- package/build/src/releasers/node.d.ts +0 -10
- package/build/src/releasers/node.js +0 -84
- package/build/src/releasers/ocaml.d.ts +0 -5
- package/build/src/releasers/php-yoshi.d.ts +0 -5
- package/build/src/releasers/php-yoshi.js +0 -191
- package/build/src/releasers/php.d.ts +0 -7
- package/build/src/releasers/python.d.ts +0 -11
- package/build/src/releasers/python.js +0 -127
- package/build/src/releasers/ruby-yoshi.d.ts +0 -5
- package/build/src/releasers/ruby-yoshi.js +0 -142
- package/build/src/releasers/ruby.d.ts +0 -11
- package/build/src/releasers/rust.d.ts +0 -30
- package/build/src/releasers/rust.js +0 -163
- package/build/src/releasers/simple.d.ts +0 -5
- package/build/src/releasers/terraform-module.d.ts +0 -6
- package/build/src/updaters/elixir-mix-exs.d.ts +0 -13
- package/build/src/updaters/java/google-utils.d.ts +0 -13
- package/build/src/updaters/java/java_update.d.ts +0 -13
- package/build/src/updaters/java/pom-xml.d.ts +0 -3
- package/build/src/updaters/java/readme.d.ts +0 -3
- package/build/src/updaters/java/readme.js.map +0 -1
- package/build/src/updaters/package-json.d.ts +0 -16
- package/build/src/updaters/package-lock-json.d.ts +0 -7
- package/build/src/updaters/php-client-version.d.ts +0 -13
- package/build/src/updaters/php-manifest.d.ts +0 -13
- package/build/src/updaters/root-composer-update-package.d.ts +0 -13
- package/build/src/updaters/root-composer-update-package.js +0 -45
- package/build/src/updaters/root-composer-update-packages.d.ts +0 -13
- package/build/src/updaters/samples-package-json.d.ts +0 -13
- package/build/src/updaters/update.d.ts +0 -20
- package/build/src/updaters/version-rb.d.ts +0 -13
- package/build/src/updaters/version-txt.d.ts +0 -12
- package/build/src/updaters/version.d.ts +0 -13
- package/build/src/updaters/version.js +0 -31
- package/build/src/util/checkpoint.d.ts +0 -6
- package/build/src/util/checkpoint.js +0 -33
- package/build/src/util/release-notes.d.ts +0 -7
- package/build/src/util/release-notes.js +0 -34
- package/build/src/util/to-conventional-changelog-format.d.ts +0 -2
|
@@ -16,22 +16,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.ChartYaml = void 0;
|
|
17
17
|
const yaml = require("js-yaml");
|
|
18
18
|
const logger_1 = require("../../util/logger");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* Updates a Helm chart.yaml file.
|
|
22
|
+
*/
|
|
23
|
+
class ChartYaml 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
|
+
*/
|
|
27
29
|
updateContent(content) {
|
|
28
30
|
const data = yaml.load(content, { json: true });
|
|
29
31
|
if (data === null || data === undefined) {
|
|
30
32
|
return '';
|
|
31
33
|
}
|
|
32
34
|
const parsed = JSON.parse(JSON.stringify(data));
|
|
33
|
-
logger_1.logger.info(`updating
|
|
34
|
-
parsed.version = this.version;
|
|
35
|
+
logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
|
|
36
|
+
parsed.version = this.version.toString();
|
|
35
37
|
return yaml.dump(parsed);
|
|
36
38
|
}
|
|
37
39
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates a file annotated with region markers. These region markers are
|
|
4
|
+
* either denoted inline with `{x-version-update:<component-name>:current|released}`
|
|
5
|
+
* or with a `{x-version-update-start:<component-name>}` and `{x-version-update-end}`.
|
|
6
|
+
*/
|
|
7
|
+
export declare class JavaUpdate extends DefaultUpdater {
|
|
8
|
+
/**
|
|
9
|
+
* Given initial file contents, return updated contents.
|
|
10
|
+
* @param {string} content The initial content
|
|
11
|
+
* @returns {string} The updated content
|
|
12
|
+
*/
|
|
13
|
+
updateContent(content: string): string;
|
|
14
|
+
}
|
|
@@ -14,45 +14,45 @@
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.JavaUpdate = void 0;
|
|
17
|
+
const default_1 = require("../default");
|
|
18
|
+
const logger_1 = require("../../util/logger");
|
|
17
19
|
const INLINE_UPDATE_REGEX = /{x-version-update:([\w\-_]+):(current|released)}/;
|
|
18
20
|
const BLOCK_START_REGEX = /{x-version-update-start:([\w\-_]+):(current|released)}/;
|
|
19
21
|
const BLOCK_END_REGEX = /{x-version-update-end}/;
|
|
20
22
|
const VERSION_REGEX = /\d+\.\d+\.\d+(-\w+(\.\d+)?)?(-SNAPSHOT)?/;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
else if (options.version) {
|
|
33
|
-
this.versions.set(options.packageName, options.version);
|
|
34
|
-
this.version = options.version;
|
|
35
|
-
this.packageName = options.packageName;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
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
|
+
*/
|
|
38
34
|
updateContent(content) {
|
|
35
|
+
if (!this.versionsMap) {
|
|
36
|
+
logger_1.logger.warn('missing versions map');
|
|
37
|
+
return content;
|
|
38
|
+
}
|
|
39
39
|
const newLines = [];
|
|
40
40
|
let blockPackageName = null;
|
|
41
41
|
content.split(/\r?\n/).forEach(line => {
|
|
42
42
|
let match = line.match(INLINE_UPDATE_REGEX);
|
|
43
43
|
if (match) {
|
|
44
|
-
const newVersion = this.
|
|
44
|
+
const newVersion = this.versionsMap.get(match[1]);
|
|
45
45
|
if (newVersion) {
|
|
46
|
-
newLines.push(line.replace(VERSION_REGEX, newVersion));
|
|
46
|
+
newLines.push(line.replace(VERSION_REGEX, newVersion.toString()));
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
newLines.push(line);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
else if (blockPackageName) {
|
|
53
|
-
const newVersion = this.
|
|
53
|
+
const newVersion = this.versionsMap.get(blockPackageName);
|
|
54
54
|
if (newVersion) {
|
|
55
|
-
newLines.push(line.replace(VERSION_REGEX, newVersion));
|
|
55
|
+
newLines.push(line.replace(VERSION_REGEX, newVersion.toString()));
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
newLines.push(line);
|
|
@@ -73,4 +73,4 @@ class JavaUpdate {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
exports.JavaUpdate = JavaUpdate;
|
|
76
|
-
//# sourceMappingURL=
|
|
76
|
+
//# sourceMappingURL=java-update.js.map
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { JavaUpdate } from './java-update';
|
|
2
|
+
import { VersionsMap } from '../../version';
|
|
3
|
+
/**
|
|
4
|
+
* Updates a versions.txt file which contains current versions of
|
|
5
|
+
* components within a Java repo.
|
|
6
|
+
* @see https://github.com/googleapis/java-asset/blob/main/versions.txt
|
|
7
|
+
*/
|
|
3
8
|
export declare class VersionsManifest extends JavaUpdate {
|
|
9
|
+
/**
|
|
10
|
+
* Given initial file contents, return updated contents.
|
|
11
|
+
* @param {string} content The initial content
|
|
12
|
+
* @returns {string} The updated content
|
|
13
|
+
*/
|
|
4
14
|
updateContent(content: string): string;
|
|
5
15
|
protected updateSingleVersion(content: string, packageName: string, version: string): string;
|
|
6
16
|
static parseVersions(content: string): VersionsMap;
|
|
@@ -14,12 +14,28 @@
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.VersionsManifest = void 0;
|
|
17
|
-
const java_update_1 = require("./
|
|
17
|
+
const java_update_1 = require("./java-update");
|
|
18
|
+
const version_1 = require("../../version");
|
|
19
|
+
const logger_1 = require("../../util/logger");
|
|
20
|
+
/**
|
|
21
|
+
* Updates a versions.txt file which contains current versions of
|
|
22
|
+
* components within a Java repo.
|
|
23
|
+
* @see https://github.com/googleapis/java-asset/blob/main/versions.txt
|
|
24
|
+
*/
|
|
18
25
|
class VersionsManifest extends java_update_1.JavaUpdate {
|
|
26
|
+
/**
|
|
27
|
+
* Given initial file contents, return updated contents.
|
|
28
|
+
* @param {string} content The initial content
|
|
29
|
+
* @returns {string} The updated content
|
|
30
|
+
*/
|
|
19
31
|
updateContent(content) {
|
|
32
|
+
if (!this.versionsMap) {
|
|
33
|
+
logger_1.logger.warn('missing versions map');
|
|
34
|
+
return content;
|
|
35
|
+
}
|
|
20
36
|
let newContent = content;
|
|
21
|
-
this.
|
|
22
|
-
newContent = this.updateSingleVersion(newContent, packageName, version);
|
|
37
|
+
this.versionsMap.forEach((version, packageName) => {
|
|
38
|
+
newContent = this.updateSingleVersion(newContent, packageName, version.toString());
|
|
23
39
|
});
|
|
24
40
|
return newContent;
|
|
25
41
|
}
|
|
@@ -40,7 +56,7 @@ class VersionsManifest extends java_update_1.JavaUpdate {
|
|
|
40
56
|
content.split(/\r?\n/).forEach(line => {
|
|
41
57
|
const match = line.match(/^([\w\-_]+):([^:]+):([^:]+)/);
|
|
42
58
|
if (match) {
|
|
43
|
-
versions.set(match[1], match[2]);
|
|
59
|
+
versions.set(match[1], version_1.Version.parse(match[2]));
|
|
44
60
|
}
|
|
45
61
|
});
|
|
46
62
|
return versions;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(options: UpdateOptions);
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates KMR blueprint yaml file.
|
|
4
|
+
*/
|
|
5
|
+
export declare class KRMBlueprintVersion 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
|
+
*/
|
|
12
11
|
updateContent(content: string): string;
|
|
13
12
|
}
|
|
@@ -15,27 +15,28 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.KRMBlueprintVersion = void 0;
|
|
17
17
|
const logger_1 = require("../../util/logger");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const default_1 = require("../default");
|
|
19
|
+
/**
|
|
20
|
+
* Updates KMR blueprint yaml file.
|
|
21
|
+
*/
|
|
22
|
+
class KRMBlueprintVersion extends default_1.DefaultUpdater {
|
|
23
|
+
/**
|
|
24
|
+
* Given initial file contents, return updated contents.
|
|
25
|
+
* @param {string} content The initial content
|
|
26
|
+
* @returns {string} The updated content
|
|
27
|
+
*/
|
|
27
28
|
updateContent(content) {
|
|
28
29
|
var _a;
|
|
29
30
|
// js-yaml(and kpt TS SDK) does not preserve comments hence regex match
|
|
30
31
|
// match starting cnrm/ ending with semver to prevent wrong updates like pinned config.kubernetes.io/function
|
|
31
32
|
let matchRegex = '(cnrm/.*/)(v[0-9]+.[0-9]+.[0-9]+)+(-w+)?';
|
|
32
33
|
// if explicit previous version, match only that version
|
|
33
|
-
if ((_a = this.
|
|
34
|
-
matchRegex = `(cnrm/.*/)(${this.
|
|
34
|
+
if ((_a = this.versionsMap) === null || _a === void 0 ? void 0 : _a.has('previousVersion')) {
|
|
35
|
+
matchRegex = `(cnrm/.*/)(${this.versionsMap.get('previousVersion')})+(-w+)?`;
|
|
35
36
|
}
|
|
36
37
|
const oldVersion = content.match(new RegExp(matchRegex));
|
|
37
38
|
if (oldVersion) {
|
|
38
|
-
logger_1.logger.info(`updating
|
|
39
|
+
logger_1.logger.info(`updating from ${oldVersion[2]} to v${this.version}`);
|
|
39
40
|
}
|
|
40
41
|
const newVersion = content.replace(new RegExp(matchRegex, 'g'), `$1v${this.version}`);
|
|
41
42
|
return newVersion;
|
|
@@ -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
|
+
}
|
|
@@ -14,24 +14,22 @@
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.PackageJson = void 0;
|
|
17
|
-
const json_stringify_1 = require("
|
|
18
|
-
const logger_1 = require("
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
parsed.version = this.version;
|
|
30
|
-
}
|
|
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
|
+
*/
|
|
31
29
|
updateContent(content) {
|
|
32
30
|
const parsed = JSON.parse(content);
|
|
33
|
-
logger_1.logger.info(`updating
|
|
34
|
-
this.
|
|
31
|
+
logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
|
|
32
|
+
parsed.version = this.version.toString();
|
|
35
33
|
return json_stringify_1.jsonStringify(parsed, content);
|
|
36
34
|
}
|
|
37
35
|
}
|
|
@@ -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 {};
|
|
@@ -14,22 +14,33 @@
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.SamplesPackageJson = void 0;
|
|
17
|
-
const logger_1 = require("
|
|
18
|
-
const json_stringify_1 = require("
|
|
19
|
-
|
|
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
|
+
*/
|
|
20
29
|
constructor(options) {
|
|
21
|
-
|
|
22
|
-
this.path = options.path;
|
|
23
|
-
this.changelogEntry = options.changelogEntry;
|
|
24
|
-
this.version = options.version;
|
|
30
|
+
super(options);
|
|
25
31
|
this.packageName = options.packageName;
|
|
26
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Given initial file contents, return updated contents.
|
|
35
|
+
* @param {string} content The initial content
|
|
36
|
+
* @returns {string} The updated content
|
|
37
|
+
*/
|
|
27
38
|
updateContent(content) {
|
|
28
39
|
const parsed = JSON.parse(content);
|
|
29
40
|
if (!parsed.dependencies || !parsed.dependencies[this.packageName]) {
|
|
30
41
|
return content;
|
|
31
42
|
}
|
|
32
|
-
logger_1.logger.info(`updating ${this.packageName} dependency
|
|
43
|
+
logger_1.logger.info(`updating ${this.packageName} dependency from ${parsed.dependencies[this.packageName]} to ^${this.version}`);
|
|
33
44
|
parsed.dependencies[this.packageName] = `^${this.version}`;
|
|
34
45
|
return json_stringify_1.jsonStringify(parsed, content);
|
|
35
46
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(options: UpdateOptions);
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates an OCaml dune-project file.
|
|
4
|
+
*/
|
|
5
|
+
export declare class DuneProject 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
|
+
*/
|
|
12
11
|
updateContent(content: string): string;
|
|
13
12
|
}
|
|
@@ -15,18 +15,20 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.DuneProject = void 0;
|
|
17
17
|
const logger_1 = require("../../util/logger");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const default_1 = require("../default");
|
|
19
|
+
/**
|
|
20
|
+
* Updates an OCaml dune-project file.
|
|
21
|
+
*/
|
|
22
|
+
class DuneProject extends default_1.DefaultUpdater {
|
|
23
|
+
/**
|
|
24
|
+
* Given initial file contents, return updated contents.
|
|
25
|
+
* @param {string} content The initial content
|
|
26
|
+
* @returns {string} The updated content
|
|
27
|
+
*/
|
|
26
28
|
updateContent(content) {
|
|
27
29
|
const oldVersion = content.match(/^\(version ([A-Za-z0-9_\-+.~]+)\)$/m);
|
|
28
30
|
if (oldVersion) {
|
|
29
|
-
logger_1.logger.info(`updating
|
|
31
|
+
logger_1.logger.info(`updating from ${oldVersion[1]} to ${this.version}`);
|
|
30
32
|
}
|
|
31
33
|
return content.replace(/^\(version ([A-Za-z0-9_\-+.~]+)\)$/m, `(version ${this.version})`);
|
|
32
34
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(options: UpdateOptions);
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates an OCaml esy.json file.
|
|
4
|
+
*/
|
|
5
|
+
export declare class EsyJson 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
|
+
*/
|
|
12
11
|
updateContent(content: string): string;
|
|
13
12
|
}
|
|
@@ -16,18 +16,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.EsyJson = void 0;
|
|
17
17
|
const logger_1 = require("../../util/logger");
|
|
18
18
|
const json_stringify_1 = require("../../util/json-stringify");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const default_1 = require("../default");
|
|
20
|
+
/**
|
|
21
|
+
* Updates an OCaml esy.json file.
|
|
22
|
+
*/
|
|
23
|
+
class EsyJson 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
|
+
*/
|
|
27
29
|
updateContent(content) {
|
|
28
30
|
const parsed = JSON.parse(content);
|
|
29
|
-
logger_1.logger.info(`updating
|
|
30
|
-
parsed.version = this.version;
|
|
31
|
+
logger_1.logger.info(`updating from ${parsed.version} to ${this.version}`);
|
|
32
|
+
parsed.version = this.version.toString();
|
|
31
33
|
return json_stringify_1.jsonStringify(parsed, content);
|
|
32
34
|
}
|
|
33
35
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constructor(options: UpdateOptions);
|
|
1
|
+
import { DefaultUpdater } from '../default';
|
|
2
|
+
/**
|
|
3
|
+
* Updates an OCaml .opam file
|
|
4
|
+
*/
|
|
5
|
+
export declare class Opam 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
|
+
*/
|
|
12
11
|
updateContent(content: string): string;
|
|
13
12
|
}
|
|
@@ -15,18 +15,20 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.Opam = void 0;
|
|
17
17
|
const logger_1 = require("../../util/logger");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
const default_1 = require("../default");
|
|
19
|
+
/**
|
|
20
|
+
* Updates an OCaml .opam file
|
|
21
|
+
*/
|
|
22
|
+
class Opam extends default_1.DefaultUpdater {
|
|
23
|
+
/**
|
|
24
|
+
* Given initial file contents, return updated contents.
|
|
25
|
+
* @param {string} content The initial content
|
|
26
|
+
* @returns {string} The updated content
|
|
27
|
+
*/
|
|
26
28
|
updateContent(content) {
|
|
27
29
|
const oldVersion = content.match(/^version: "([A-Za-z0-9_\-+.~]+)"$/m);
|
|
28
30
|
if (oldVersion) {
|
|
29
|
-
logger_1.logger.info(`updating
|
|
31
|
+
logger_1.logger.info(`updating from ${oldVersion[1]} to ${this.version}`);
|
|
30
32
|
}
|
|
31
33
|
return content.replace(/^version: "[A-Za-z0-9_\-+.~]+"$/m, `version: "${this.version}"`);
|
|
32
34
|
}
|
|
@@ -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
|
+
}
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.PHPClientVersion = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
*/
|
|
26
27
|
updateContent(content) {
|
|
27
28
|
return content.replace(/const VERSION = '[0-9]+\.[0-9]+\.[0-9]+'/, `const VERSION = '${this.version}'`);
|
|
28
29
|
}
|