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
|
@@ -1,66 +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.Helm = void 0;
|
|
17
|
-
const release_pr_1 = require("../release-pr");
|
|
18
|
-
// Generic
|
|
19
|
-
const changelog_1 = require("../updaters/changelog");
|
|
20
|
-
const yaml = require("js-yaml");
|
|
21
|
-
// helm
|
|
22
|
-
const chart_yaml_1 = require("../updaters/helm/chart-yaml");
|
|
23
|
-
class Helm extends release_pr_1.ReleasePR {
|
|
24
|
-
async buildUpdates(changelogEntry, candidate, packageName) {
|
|
25
|
-
const updates = [];
|
|
26
|
-
updates.push(new changelog_1.Changelog({
|
|
27
|
-
path: this.addPath(this.changelogPath),
|
|
28
|
-
changelogEntry,
|
|
29
|
-
version: candidate.version,
|
|
30
|
-
packageName: packageName.name,
|
|
31
|
-
}));
|
|
32
|
-
updates.push(new chart_yaml_1.ChartYaml({
|
|
33
|
-
path: this.addPath('Chart.yaml'),
|
|
34
|
-
changelogEntry,
|
|
35
|
-
version: candidate.version,
|
|
36
|
-
packageName: packageName.name,
|
|
37
|
-
contents: await this.getChartYmlContents(),
|
|
38
|
-
}));
|
|
39
|
-
return updates;
|
|
40
|
-
}
|
|
41
|
-
async getPackageName() {
|
|
42
|
-
var _a;
|
|
43
|
-
if (this._packageName === undefined) {
|
|
44
|
-
const chartYmlContents = await this.getChartYmlContents();
|
|
45
|
-
const chart = yaml.load(chartYmlContents.parsedContent, { json: true });
|
|
46
|
-
if (typeof chart === 'object') {
|
|
47
|
-
this.packageName = this._packageName = (_a = chart.name) !== null && _a !== void 0 ? _a : this.packageName;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
this._packageName = this.packageName;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
name: this.packageName,
|
|
55
|
-
getComponent: () => this.packageName,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
async getChartYmlContents() {
|
|
59
|
-
if (!this.chartYmlContents) {
|
|
60
|
-
this.chartYmlContents = await this.gh.getFileContents(this.addPath('Chart.yaml'));
|
|
61
|
-
}
|
|
62
|
-
return this.chartYmlContents;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.Helm = Helm;
|
|
66
|
-
//# sourceMappingURL=helm.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReleasePR } from '../release-pr';
|
|
2
|
-
export declare type ReleaseType = 'go' | 'go-yoshi' | 'java-bom' | 'java-lts' | 'java-yoshi' | 'krm-blueprint' | 'node' | 'ocaml' | 'php' | 'php-yoshi' | 'python' | 'ruby' | 'ruby-yoshi' | 'rust' | 'simple' | 'terraform-module' | 'helm' | 'elixir';
|
|
3
|
-
declare type Releasers = Record<ReleaseType, typeof ReleasePR>;
|
|
4
|
-
export declare function getReleasers(): Releasers;
|
|
5
|
-
export declare function getReleaserNames(): string[];
|
|
6
|
-
export declare function getReleaserTypes(): readonly ReleaseType[];
|
|
7
|
-
export {};
|
|
@@ -1,72 +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.getReleaserTypes = exports.getReleaserNames = exports.getReleasers = void 0;
|
|
17
|
-
const go_1 = require("./go");
|
|
18
|
-
const go_yoshi_1 = require("./go-yoshi");
|
|
19
|
-
const java_bom_1 = require("./java-bom");
|
|
20
|
-
const java_lts_1 = require("./java-lts");
|
|
21
|
-
const java_yoshi_1 = require("./java-yoshi");
|
|
22
|
-
const krm_blueprint_1 = require("./krm-blueprint");
|
|
23
|
-
const node_1 = require("./node");
|
|
24
|
-
const php_1 = require("./php");
|
|
25
|
-
const php_yoshi_1 = require("./php-yoshi");
|
|
26
|
-
const python_1 = require("./python");
|
|
27
|
-
const ruby_yoshi_1 = require("./ruby-yoshi");
|
|
28
|
-
const ruby_1 = require("./ruby");
|
|
29
|
-
const simple_1 = require("./simple");
|
|
30
|
-
const terraform_module_1 = require("./terraform-module");
|
|
31
|
-
const rust_1 = require("./rust");
|
|
32
|
-
const ocaml_1 = require("./ocaml");
|
|
33
|
-
const helm_1 = require("./helm");
|
|
34
|
-
const elixir_1 = require("./elixir");
|
|
35
|
-
const releasers = {
|
|
36
|
-
go: go_1.Go,
|
|
37
|
-
'go-yoshi': go_yoshi_1.GoYoshi,
|
|
38
|
-
'java-bom': java_bom_1.JavaBom,
|
|
39
|
-
'java-lts': java_lts_1.JavaLTS,
|
|
40
|
-
'java-yoshi': java_yoshi_1.JavaYoshi,
|
|
41
|
-
'krm-blueprint': krm_blueprint_1.KRMBlueprint,
|
|
42
|
-
node: node_1.Node,
|
|
43
|
-
ocaml: ocaml_1.OCaml,
|
|
44
|
-
php: php_1.PHP,
|
|
45
|
-
'php-yoshi': php_yoshi_1.PHPYoshi,
|
|
46
|
-
python: python_1.Python,
|
|
47
|
-
ruby: ruby_1.Ruby,
|
|
48
|
-
'ruby-yoshi': ruby_yoshi_1.RubyYoshi,
|
|
49
|
-
rust: rust_1.Rust,
|
|
50
|
-
simple: simple_1.Simple,
|
|
51
|
-
'terraform-module': terraform_module_1.TerraformModule,
|
|
52
|
-
helm: helm_1.Helm,
|
|
53
|
-
elixir: elixir_1.Elixir,
|
|
54
|
-
};
|
|
55
|
-
function getReleasers() {
|
|
56
|
-
return releasers;
|
|
57
|
-
}
|
|
58
|
-
exports.getReleasers = getReleasers;
|
|
59
|
-
// deprecated, use getReleaserTypes
|
|
60
|
-
function getReleaserNames() {
|
|
61
|
-
return getReleaserTypes();
|
|
62
|
-
}
|
|
63
|
-
exports.getReleaserNames = getReleaserNames;
|
|
64
|
-
function getReleaserTypes() {
|
|
65
|
-
const names = [];
|
|
66
|
-
for (const releaseType of Object.keys(releasers)) {
|
|
67
|
-
names.push(releaseType);
|
|
68
|
-
}
|
|
69
|
-
return names;
|
|
70
|
-
}
|
|
71
|
-
exports.getReleaserTypes = getReleaserTypes;
|
|
72
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as semver from 'semver';
|
|
2
|
-
export declare type BumpType = 'major' | 'minor' | 'patch' | 'snapshot' | 'lts' | 'lts-snapshot';
|
|
3
|
-
export declare function maxBumpType(bumpTypes: BumpType[]): BumpType;
|
|
4
|
-
export declare function fromSemverReleaseType(releaseType: semver.ReleaseType): "patch" | "major" | "minor";
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 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.fromSemverReleaseType = exports.maxBumpType = void 0;
|
|
17
|
-
function maxBumpType(bumpTypes) {
|
|
18
|
-
if (bumpTypes.some(bumpType => bumpType === 'major')) {
|
|
19
|
-
return 'major';
|
|
20
|
-
}
|
|
21
|
-
if (bumpTypes.some(bumpType => bumpType === 'minor')) {
|
|
22
|
-
return 'minor';
|
|
23
|
-
}
|
|
24
|
-
return 'patch';
|
|
25
|
-
}
|
|
26
|
-
exports.maxBumpType = maxBumpType;
|
|
27
|
-
function fromSemverReleaseType(releaseType) {
|
|
28
|
-
switch (releaseType) {
|
|
29
|
-
case 'major':
|
|
30
|
-
case 'minor':
|
|
31
|
-
case 'patch':
|
|
32
|
-
return releaseType;
|
|
33
|
-
default:
|
|
34
|
-
throw Error(`unsupported release type ${releaseType}`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.fromSemverReleaseType = fromSemverReleaseType;
|
|
38
|
-
//# sourceMappingURL=bump_type.js.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 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.isStableArtifact = void 0;
|
|
17
|
-
const VERSIONED_ARTIFACT_REGEX = /^.*-(v\d+[^-]*)$/;
|
|
18
|
-
const VERSION_REGEX = /^v\d+(.*)$/;
|
|
19
|
-
/**
|
|
20
|
-
* Returns true if the artifact should be considered stable
|
|
21
|
-
* @param artifact name of the artifact to check
|
|
22
|
-
*/
|
|
23
|
-
function isStableArtifact(artifact) {
|
|
24
|
-
const match = artifact.match(VERSIONED_ARTIFACT_REGEX);
|
|
25
|
-
if (!match) {
|
|
26
|
-
// The artifact does not have a version qualifier at the end
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
const versionMatch = match[1].match(VERSION_REGEX);
|
|
30
|
-
if (versionMatch && versionMatch[1]) {
|
|
31
|
-
// The version is not stable (probably alpha/beta/rc)
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
exports.isStableArtifact = isStableArtifact;
|
|
37
|
-
//# sourceMappingURL=stability.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BumpType } from './bump_type';
|
|
2
|
-
export declare class Version {
|
|
3
|
-
major: number;
|
|
4
|
-
minor: number;
|
|
5
|
-
patch: number;
|
|
6
|
-
extra: string;
|
|
7
|
-
snapshot: boolean;
|
|
8
|
-
lts?: number;
|
|
9
|
-
constructor(major: number, minor: number, patch: number, extra: string, snapshot: boolean, lts?: number);
|
|
10
|
-
static parse(version: string): Version;
|
|
11
|
-
bump(bumpType: BumpType): Version;
|
|
12
|
-
toString(): string;
|
|
13
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 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
|
-
const VERSION_REGEX = /(\d+)\.(\d+)\.(\d+)(-.+)?/;
|
|
18
|
-
const LTS_REGEX = /(-.+)?-sp.(\d+)/;
|
|
19
|
-
class Version {
|
|
20
|
-
constructor(major, minor, patch, extra, snapshot, lts) {
|
|
21
|
-
this.major = major;
|
|
22
|
-
this.minor = minor;
|
|
23
|
-
this.patch = patch;
|
|
24
|
-
this.extra = extra;
|
|
25
|
-
this.snapshot = snapshot;
|
|
26
|
-
this.lts = lts;
|
|
27
|
-
}
|
|
28
|
-
static parse(version) {
|
|
29
|
-
var _a;
|
|
30
|
-
let extra = '';
|
|
31
|
-
let snapshot = false;
|
|
32
|
-
if (version.endsWith('-SNAPSHOT')) {
|
|
33
|
-
snapshot = true;
|
|
34
|
-
version = version.slice(0, -9);
|
|
35
|
-
}
|
|
36
|
-
const match = version.match(VERSION_REGEX);
|
|
37
|
-
if (!match) {
|
|
38
|
-
throw Error(`unable to parse version string: ${version}`);
|
|
39
|
-
}
|
|
40
|
-
const major = Number(match[1]);
|
|
41
|
-
const minor = Number(match[2]);
|
|
42
|
-
const patch = Number(match[3]);
|
|
43
|
-
let lts = undefined;
|
|
44
|
-
if (match[4]) {
|
|
45
|
-
const ltsMatch = match[4].match(LTS_REGEX);
|
|
46
|
-
if (ltsMatch && ltsMatch[2]) {
|
|
47
|
-
extra = (_a = ltsMatch[1]) !== null && _a !== void 0 ? _a : '';
|
|
48
|
-
lts = Number(ltsMatch[2]);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
extra = match[4];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return new Version(major, minor, patch, extra, snapshot, lts);
|
|
55
|
-
}
|
|
56
|
-
bump(bumpType) {
|
|
57
|
-
switch (bumpType) {
|
|
58
|
-
case 'major':
|
|
59
|
-
this.major += 1;
|
|
60
|
-
this.minor = 0;
|
|
61
|
-
this.patch = 0;
|
|
62
|
-
this.snapshot = false;
|
|
63
|
-
break;
|
|
64
|
-
case 'minor':
|
|
65
|
-
this.minor += 1;
|
|
66
|
-
this.patch = 0;
|
|
67
|
-
this.snapshot = false;
|
|
68
|
-
break;
|
|
69
|
-
case 'patch':
|
|
70
|
-
this.patch += 1;
|
|
71
|
-
this.snapshot = false;
|
|
72
|
-
break;
|
|
73
|
-
case 'snapshot':
|
|
74
|
-
if (this.lts) {
|
|
75
|
-
this.lts += 1;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.patch += 1;
|
|
79
|
-
}
|
|
80
|
-
this.snapshot = true;
|
|
81
|
-
break;
|
|
82
|
-
case 'lts':
|
|
83
|
-
if (this.lts) {
|
|
84
|
-
if (!this.snapshot) {
|
|
85
|
-
this.lts += 1;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.lts = 1;
|
|
90
|
-
}
|
|
91
|
-
this.snapshot = false;
|
|
92
|
-
break;
|
|
93
|
-
case 'lts-snapshot':
|
|
94
|
-
if (this.lts) {
|
|
95
|
-
this.lts += 1;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
this.lts = 1;
|
|
99
|
-
}
|
|
100
|
-
this.snapshot = true;
|
|
101
|
-
break;
|
|
102
|
-
default:
|
|
103
|
-
throw Error(`unsupported bump type: ${bumpType}`);
|
|
104
|
-
}
|
|
105
|
-
return this;
|
|
106
|
-
}
|
|
107
|
-
toString() {
|
|
108
|
-
return `${this.major}.${this.minor}.${this.patch}${this.extra}${this.lts ? `-sp.${this.lts}` : ''}${this.snapshot ? '-SNAPSHOT' : ''}`;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
exports.Version = Version;
|
|
112
|
-
//# sourceMappingURL=version.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ReleaseCandidate } from '../release-pr';
|
|
2
|
-
import { ConventionalCommits } from '../conventional-commits';
|
|
3
|
-
import { GitHubTag } from '../github';
|
|
4
|
-
import { VersionsMap } from '../updaters/update';
|
|
5
|
-
import { Commit } from '../graphql-to-commits';
|
|
6
|
-
import { BumpType } from './java/bump_type';
|
|
7
|
-
import { JavaYoshi } from './java-yoshi';
|
|
8
|
-
export declare class JavaBom extends JavaYoshi {
|
|
9
|
-
private bumpType?;
|
|
10
|
-
protected coerceVersions(cc: ConventionalCommits, _candidate: ReleaseCandidate, latestTag: GitHubTag | undefined, currentVersions: VersionsMap): Promise<VersionsMap>;
|
|
11
|
-
private getBumpType;
|
|
12
|
-
protected coerceReleaseCandidate(cc: ConventionalCommits, latestTag: GitHubTag | undefined, _preRelease?: boolean): Promise<ReleaseCandidate>;
|
|
13
|
-
static dependencyUpdates(commits: Commit[]): VersionsMap;
|
|
14
|
-
static isNonPatchVersion(commit: Commit): boolean;
|
|
15
|
-
static determineBumpType(commits: Commit[]): BumpType;
|
|
16
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2020 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.JavaBom = void 0;
|
|
17
|
-
// Java
|
|
18
|
-
const bump_type_1 = require("./java/bump_type");
|
|
19
|
-
const version_1 = require("./java/version");
|
|
20
|
-
const java_yoshi_1 = require("./java-yoshi");
|
|
21
|
-
const DEPENDENCY_UPDATE_REGEX = /^deps: update dependency (.*) to (v.*)(\s\(#\d+\))?$/m;
|
|
22
|
-
const DEPENDENCY_PATCH_VERSION_REGEX = /^v\d+\.\d+\.[1-9]\d*(-.*)?/;
|
|
23
|
-
class JavaBom extends java_yoshi_1.JavaYoshi {
|
|
24
|
-
async coerceVersions(cc, _candidate, latestTag, currentVersions) {
|
|
25
|
-
const bumpType = await this.getBumpType(cc, latestTag);
|
|
26
|
-
const newVersions = new Map();
|
|
27
|
-
for (const [k, version] of currentVersions) {
|
|
28
|
-
newVersions.set(k, version_1.Version.parse(version).bump(bumpType).toString());
|
|
29
|
-
}
|
|
30
|
-
return newVersions;
|
|
31
|
-
}
|
|
32
|
-
async getBumpType(cc, latestTag) {
|
|
33
|
-
if (!this.bumpType) {
|
|
34
|
-
this.bumpType = this.snapshot
|
|
35
|
-
? 'snapshot'
|
|
36
|
-
: bump_type_1.maxBumpType([
|
|
37
|
-
JavaBom.determineBumpType(cc.commits),
|
|
38
|
-
bump_type_1.fromSemverReleaseType((await cc.suggestBump((latestTag === null || latestTag === void 0 ? void 0 : latestTag.version) || this.defaultInitialVersion())).releaseType),
|
|
39
|
-
]);
|
|
40
|
-
}
|
|
41
|
-
return this.bumpType;
|
|
42
|
-
}
|
|
43
|
-
async coerceReleaseCandidate(cc, latestTag, _preRelease = false) {
|
|
44
|
-
const bumpType = await this.getBumpType(cc, latestTag);
|
|
45
|
-
return {
|
|
46
|
-
version: latestTag
|
|
47
|
-
? version_1.Version.parse(latestTag.version).bump(bumpType).toString()
|
|
48
|
-
: this.defaultInitialVersion(),
|
|
49
|
-
previousTag: latestTag === null || latestTag === void 0 ? void 0 : latestTag.version,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
static dependencyUpdates(commits) {
|
|
53
|
-
const versionsMap = new Map();
|
|
54
|
-
commits.forEach(commit => {
|
|
55
|
-
const match = commit.message.match(DEPENDENCY_UPDATE_REGEX);
|
|
56
|
-
if (!match)
|
|
57
|
-
return;
|
|
58
|
-
// commits are sorted by latest first, so if there is a collision,
|
|
59
|
-
// then we've already recorded the latest version
|
|
60
|
-
if (versionsMap.has(match[1]))
|
|
61
|
-
return;
|
|
62
|
-
versionsMap.set(match[1], match[2]);
|
|
63
|
-
});
|
|
64
|
-
return versionsMap;
|
|
65
|
-
}
|
|
66
|
-
static isNonPatchVersion(commit) {
|
|
67
|
-
let match = commit.message.match(DEPENDENCY_UPDATE_REGEX);
|
|
68
|
-
if (!match)
|
|
69
|
-
return false;
|
|
70
|
-
match = match[2].match(DEPENDENCY_PATCH_VERSION_REGEX);
|
|
71
|
-
if (!match)
|
|
72
|
-
return true;
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
static determineBumpType(commits) {
|
|
76
|
-
if (commits.some(this.isNonPatchVersion)) {
|
|
77
|
-
return 'minor';
|
|
78
|
-
}
|
|
79
|
-
return 'patch';
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.JavaBom = JavaBom;
|
|
83
|
-
//# sourceMappingURL=java-bom.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReleaseCandidate } from '../release-pr';
|
|
2
|
-
import { ConventionalCommits } from '../conventional-commits';
|
|
3
|
-
import { GitHubTag } from '../github';
|
|
4
|
-
import { VersionsMap } from '../updaters/update';
|
|
5
|
-
import { JavaYoshi } from './java-yoshi';
|
|
6
|
-
export declare class JavaLTS extends JavaYoshi {
|
|
7
|
-
protected coerceVersions(_cc: ConventionalCommits, _candidate: ReleaseCandidate, _latestTag: GitHubTag | undefined, currentVersions: VersionsMap): Promise<VersionsMap>;
|
|
8
|
-
protected coerceReleaseCandidate(cc: ConventionalCommits, latestTag: GitHubTag | undefined, _preRelease?: boolean): Promise<ReleaseCandidate>;
|
|
9
|
-
}
|
|
@@ -1,47 +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.JavaLTS = void 0;
|
|
17
|
-
// Java
|
|
18
|
-
const version_1 = require("./java/version");
|
|
19
|
-
const java_yoshi_1 = require("./java-yoshi");
|
|
20
|
-
class JavaLTS extends java_yoshi_1.JavaYoshi {
|
|
21
|
-
async coerceVersions(_cc, _candidate, _latestTag, currentVersions) {
|
|
22
|
-
// Example versioning:
|
|
23
|
-
// 1.2.3
|
|
24
|
-
// 1.2.3-sp.1-SNAPSHOT
|
|
25
|
-
// 1.2.3-sp.1
|
|
26
|
-
// 1.2.3-sp.2-SNAPSHOT
|
|
27
|
-
const bumpType = this.snapshot ? 'lts-snapshot' : 'lts';
|
|
28
|
-
const newVersions = new Map();
|
|
29
|
-
for (const [k, version] of currentVersions) {
|
|
30
|
-
newVersions.set(k, version_1.Version.parse(version).bump(bumpType).toString());
|
|
31
|
-
}
|
|
32
|
-
return newVersions;
|
|
33
|
-
}
|
|
34
|
-
async coerceReleaseCandidate(cc, latestTag, _preRelease = false) {
|
|
35
|
-
var _a;
|
|
36
|
-
const bumpType = this.snapshot ? 'lts-snapshot' : 'lts';
|
|
37
|
-
const version = version_1.Version.parse((_a = latestTag === null || latestTag === void 0 ? void 0 : latestTag.version) !== null && _a !== void 0 ? _a : this.defaultInitialVersion())
|
|
38
|
-
.bump(bumpType)
|
|
39
|
-
.toString();
|
|
40
|
-
return {
|
|
41
|
-
previousTag: latestTag === null || latestTag === void 0 ? void 0 : latestTag.version,
|
|
42
|
-
version,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.JavaLTS = JavaLTS;
|
|
47
|
-
//# sourceMappingURL=java-lts.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BranchName } from '../util/branch-name';
|
|
2
|
-
import { GitHubFileContents, GitHubTag } from '../github';
|
|
3
|
-
import { ConventionalCommits } from '../conventional-commits';
|
|
4
|
-
import { ReleaseCandidate } from '..';
|
|
5
|
-
import { VersionsMap, Update } from '../updaters/update';
|
|
6
|
-
import { PackageName, ReleasePR } from '../release-pr';
|
|
7
|
-
export declare class JavaYoshi extends ReleasePR {
|
|
8
|
-
private versionsManifestContent?;
|
|
9
|
-
protected getVersionManifestContent(): Promise<GitHubFileContents>;
|
|
10
|
-
protected _run(): Promise<number | undefined>;
|
|
11
|
-
protected generateChangelog(cc: ConventionalCommits, candidate: ReleaseCandidate): Promise<string>;
|
|
12
|
-
protected coerceReleaseCandidate(cc: ConventionalCommits, latestTag: GitHubTag | undefined, preRelease?: boolean): Promise<ReleaseCandidate>;
|
|
13
|
-
protected buildJavaUpdates(changelogEntry: string, candidateVersions: VersionsMap, candidate: ReleaseCandidate, packageName: PackageName): Promise<Update[]>;
|
|
14
|
-
protected supportsSnapshots(): boolean;
|
|
15
|
-
defaultInitialVersion(): string;
|
|
16
|
-
protected coerceVersions(cc: ConventionalCommits, candidate: ReleaseCandidate, _latestTag: GitHubTag | undefined, currentVersions: VersionsMap): Promise<VersionsMap>;
|
|
17
|
-
protected buildBranchName(_version: string, includePackageName: boolean): Promise<BranchName>;
|
|
18
|
-
protected buildPullRequestTitle(version: string, includePackageName: boolean): Promise<string>;
|
|
19
|
-
/**
|
|
20
|
-
* Normalize version parsing when searching for a latest release.
|
|
21
|
-
*
|
|
22
|
-
* @param version The raw version string
|
|
23
|
-
* @param preRelease Whether to allow pre-release versions or not
|
|
24
|
-
* @returns {string|null} The normalized version string or null if
|
|
25
|
-
* we want to disallow this version.
|
|
26
|
-
*/
|
|
27
|
-
protected normalizeVersion(version: string, preRelease?: boolean): string | null;
|
|
28
|
-
}
|