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.
- package/CHANGELOG.md +7 -0
- package/build/src/bootstrapper.d.ts +12 -0
- package/build/src/bootstrapper.js +60 -0
- package/build/src/changelog-notes/default.d.ts +15 -0
- package/build/src/changelog-notes/default.js +71 -0
- package/build/src/changelog-notes/github.d.ts +8 -0
- package/build/src/changelog-notes/github.js +26 -0
- package/build/src/changelog-notes.d.ts +19 -0
- package/build/src/changelog-notes.js +16 -0
- package/build/src/commit.d.ts +26 -0
- package/build/src/commit.js +316 -0
- package/build/src/github.js +1 -1
- package/build/src/plugin.d.ts +20 -0
- package/build/src/plugin.js +31 -0
- package/build/src/plugins/merge.d.ts +11 -0
- package/build/src/plugins/merge.js +83 -0
- 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/pull-request.js +16 -0
- 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/release-pull-request.js +16 -0
- 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/strategies/elixir.js +45 -0
- package/build/src/strategies/go-yoshi.d.ts +13 -0
- package/build/src/strategies/go-yoshi.js +114 -0
- package/build/src/strategies/go.d.ts +5 -0
- package/build/src/strategies/go.js +36 -0
- 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 +25 -0
- package/build/src/strategies/java-yoshi.js +259 -0
- package/build/src/strategies/krm-blueprint.d.ts +7 -0
- package/build/src/strategies/krm-blueprint.js +64 -0
- 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/strategies/ocaml.js +75 -0
- package/build/src/strategies/php-yoshi.d.ts +10 -0
- package/build/src/strategies/php-yoshi.js +214 -0
- package/build/src/strategies/php.d.ts +6 -0
- package/build/src/strategies/php.js +67 -0
- 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/strategies/ruby.js +61 -0
- 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/strategies/simple.js +45 -0
- package/build/src/strategies/terraform-module.d.ts +7 -0
- package/build/src/strategies/terraform-module.js +72 -0
- package/build/src/strategy.d.ts +103 -0
- package/build/src/strategy.js +249 -0
- package/build/src/update.d.ts +23 -0
- package/build/src/update.js +16 -0
- 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/default.js +36 -0
- package/build/src/updaters/dotnet/csproj.d.ts +12 -0
- package/build/src/updaters/dotnet/csproj.js +33 -0
- package/build/src/updaters/elixir/elixir-mix-exs.d.ts +12 -0
- package/build/src/updaters/elixir/elixir-mix-exs.js +37 -0
- package/build/src/updaters/go/version-go.d.ts +4 -0
- package/build/src/updaters/go/version-go.js +24 -0
- package/build/src/updaters/java/java-update.d.ts +14 -0
- package/build/src/updaters/java/java-update.js +76 -0
- package/build/src/updaters/node/package-json.d.ts +12 -0
- package/build/src/updaters/node/package-json.js +37 -0
- 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/node/samples-package-json.js +49 -0
- package/build/src/updaters/php/php-client-version.d.ts +12 -0
- package/build/src/updaters/php/php-client-version.js +32 -0
- package/build/src/updaters/php/php-manifest.d.ts +13 -0
- package/build/src/updaters/php/php-manifest.js +55 -0
- package/build/src/updaters/php/root-composer-update-packages.d.ts +12 -0
- package/build/src/updaters/php/root-composer-update-packages.js +47 -0
- package/build/src/updaters/raw-content.d.ts +19 -0
- package/build/src/updaters/raw-content.js +39 -0
- 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/ruby/version-rb.d.ts +12 -0
- package/build/src/updaters/ruby/version-rb.js +32 -0
- package/build/src/updaters/rust/cargo-toml.js +5 -1
- package/build/src/util/commit-split.d.ts +11 -0
- package/build/src/util/commit-split.js +94 -0
- 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/tag-name.d.ts +9 -0
- package/build/src/util/tag-name.js +41 -0
- package/build/src/util/toml-edit.d.ts +8 -0
- package/build/src/util/toml-edit.js +125 -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/versioning-strategies/always-bump-patch.js +25 -0
- 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 +2 -2
|
@@ -0,0 +1,90 @@
|
|
|
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.DependencyManifest = void 0;
|
|
17
|
+
const version_1 = require("../version");
|
|
18
|
+
const semver = require("semver");
|
|
19
|
+
const default_1 = require("./default");
|
|
20
|
+
const versioning_strategy_1 = require("../versioning-strategy");
|
|
21
|
+
const DEPENDENCY_UPDATE_REGEX = /^deps: update dependency (.*) to (v.*)(\s\(#\d+\))?$/m;
|
|
22
|
+
class DependencyManifest extends default_1.DefaultVersioningStrategy {
|
|
23
|
+
determineReleaseType(version, commits) {
|
|
24
|
+
const regularBump = super.determineReleaseType(version, commits);
|
|
25
|
+
const dependencyUpdates = buildDependencyUpdates(commits);
|
|
26
|
+
let breaking = 0;
|
|
27
|
+
let features = 0;
|
|
28
|
+
for (const dep in dependencyUpdates) {
|
|
29
|
+
const version = dependencyUpdates[dep];
|
|
30
|
+
if (version.patch === 0) {
|
|
31
|
+
if (version.minor === 0) {
|
|
32
|
+
breaking++;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
features++;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
let dependencyBump;
|
|
40
|
+
if (breaking > 0) {
|
|
41
|
+
if (version.major < 1 && this.bumpMinorPreMajor) {
|
|
42
|
+
dependencyBump = new versioning_strategy_1.MinorVersionUpdate();
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
dependencyBump = new versioning_strategy_1.MajorVersionUpdate();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else if (features > 0) {
|
|
49
|
+
if (version.major < 1 && this.bumpPatchForMinorPreMajor) {
|
|
50
|
+
dependencyBump = new versioning_strategy_1.PatchVersionUpdate();
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
dependencyBump = new versioning_strategy_1.MinorVersionUpdate();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
dependencyBump = new versioning_strategy_1.PatchVersionUpdate();
|
|
58
|
+
}
|
|
59
|
+
if (semver.lte(dependencyBump.bump(version).toString(), regularBump.bump(version).toString())) {
|
|
60
|
+
return regularBump;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return dependencyBump;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.DependencyManifest = DependencyManifest;
|
|
68
|
+
function buildDependencyUpdates(commits) {
|
|
69
|
+
const versionsMap = {};
|
|
70
|
+
for (const commit of commits) {
|
|
71
|
+
const match = commit.message.match(DEPENDENCY_UPDATE_REGEX);
|
|
72
|
+
if (!match)
|
|
73
|
+
continue;
|
|
74
|
+
const versionString = match[2];
|
|
75
|
+
let version;
|
|
76
|
+
try {
|
|
77
|
+
version = version_1.Version.parse(versionString);
|
|
78
|
+
}
|
|
79
|
+
catch (_a) {
|
|
80
|
+
version = version_1.Version.parse(`${versionString}.0.0`);
|
|
81
|
+
}
|
|
82
|
+
// commits are sorted by latest first, so if there is a collision,
|
|
83
|
+
// then we've already recorded the latest version
|
|
84
|
+
if (versionsMap[match[1]])
|
|
85
|
+
continue;
|
|
86
|
+
versionsMap[match[1]] = version;
|
|
87
|
+
}
|
|
88
|
+
return versionsMap;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=dependency-manifest.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VersioningStrategy, VersionUpdater } from '../versioning-strategy';
|
|
2
|
+
import { Version } from '../version';
|
|
3
|
+
import { ConventionalCommit } from '../commit';
|
|
4
|
+
export declare class JavaAddSnapshot implements VersioningStrategy {
|
|
5
|
+
strategy: VersioningStrategy;
|
|
6
|
+
constructor(strategy: VersioningStrategy);
|
|
7
|
+
determineReleaseType(_version: Version, _commits: ConventionalCommit[]): VersionUpdater;
|
|
8
|
+
bump(version: Version, commits: ConventionalCommit[]): Version;
|
|
9
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.JavaAddSnapshot = void 0;
|
|
17
|
+
const fakeCommit = {
|
|
18
|
+
message: 'fix: fake fix',
|
|
19
|
+
type: 'fix',
|
|
20
|
+
scope: null,
|
|
21
|
+
notes: [],
|
|
22
|
+
references: [],
|
|
23
|
+
bareMessage: 'fake fix',
|
|
24
|
+
breaking: false,
|
|
25
|
+
sha: 'abc123',
|
|
26
|
+
files: [],
|
|
27
|
+
};
|
|
28
|
+
class AddSnapshotVersionUpdate {
|
|
29
|
+
constructor(strategy) {
|
|
30
|
+
this.name = 'java-snapshot';
|
|
31
|
+
this.strategy = strategy;
|
|
32
|
+
}
|
|
33
|
+
bump(version) {
|
|
34
|
+
const nextPatch = this.strategy.bump(version, [fakeCommit]);
|
|
35
|
+
nextPatch.preRelease = nextPatch.preRelease
|
|
36
|
+
? `${nextPatch.preRelease}-SNAPSHOT`
|
|
37
|
+
: 'SNAPSHOT';
|
|
38
|
+
return nextPatch;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class JavaAddSnapshot {
|
|
42
|
+
constructor(strategy) {
|
|
43
|
+
this.strategy = strategy;
|
|
44
|
+
}
|
|
45
|
+
determineReleaseType(_version, _commits) {
|
|
46
|
+
return new AddSnapshotVersionUpdate(this.strategy);
|
|
47
|
+
}
|
|
48
|
+
bump(version, commits) {
|
|
49
|
+
return this.determineReleaseType(version, commits).bump(version);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.JavaAddSnapshot = JavaAddSnapshot;
|
|
53
|
+
//# sourceMappingURL=java-add-snapshot.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VersioningStrategy, VersionUpdater } from '../versioning-strategy';
|
|
2
|
+
import { Version } from '../version';
|
|
3
|
+
import { ConventionalCommit } from '../commit';
|
|
4
|
+
export declare class JavaSnapshot implements VersioningStrategy {
|
|
5
|
+
strategy: VersioningStrategy;
|
|
6
|
+
constructor(strategy: VersioningStrategy);
|
|
7
|
+
determineReleaseType(version: Version, commits: ConventionalCommit[]): VersionUpdater;
|
|
8
|
+
bump(version: Version, commits: ConventionalCommit[]): Version;
|
|
9
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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.JavaSnapshot = void 0;
|
|
17
|
+
const version_1 = require("../version");
|
|
18
|
+
const fakeCommit = {
|
|
19
|
+
message: 'fix: fake fix',
|
|
20
|
+
type: 'fix',
|
|
21
|
+
scope: null,
|
|
22
|
+
notes: [],
|
|
23
|
+
references: [],
|
|
24
|
+
bareMessage: 'fake fix',
|
|
25
|
+
breaking: false,
|
|
26
|
+
sha: 'abc123',
|
|
27
|
+
files: [],
|
|
28
|
+
};
|
|
29
|
+
class RemoveSnapshotVersionUpdate {
|
|
30
|
+
constructor(parent) {
|
|
31
|
+
this.name = 'remove-snapshot';
|
|
32
|
+
this.parent = parent;
|
|
33
|
+
}
|
|
34
|
+
bump(version) {
|
|
35
|
+
if (this.parent) {
|
|
36
|
+
version = this.parent.bump(version);
|
|
37
|
+
}
|
|
38
|
+
return new version_1.Version(version.major, version.minor, version.patch, version.preRelease
|
|
39
|
+
? version.preRelease.replace(/-?SNAPSHOT/, '')
|
|
40
|
+
: undefined, version.build);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
class JavaSnapshot {
|
|
44
|
+
constructor(strategy) {
|
|
45
|
+
this.strategy = strategy;
|
|
46
|
+
}
|
|
47
|
+
determineReleaseType(version, commits) {
|
|
48
|
+
var _a;
|
|
49
|
+
const parentBump = this.strategy.determineReleaseType(version, commits);
|
|
50
|
+
if ((_a = version.preRelease) === null || _a === void 0 ? void 0 : _a.match(/-?SNAPSHOT/)) {
|
|
51
|
+
const patchBumpVersion = this.strategy
|
|
52
|
+
.determineReleaseType(version, [fakeCommit])
|
|
53
|
+
.bump(version);
|
|
54
|
+
const parentBumpVersion = parentBump.bump(version);
|
|
55
|
+
if (patchBumpVersion.toString() === parentBumpVersion.toString()) {
|
|
56
|
+
return new RemoveSnapshotVersionUpdate();
|
|
57
|
+
}
|
|
58
|
+
return new RemoveSnapshotVersionUpdate(parentBump);
|
|
59
|
+
}
|
|
60
|
+
return parentBump;
|
|
61
|
+
}
|
|
62
|
+
bump(version, commits) {
|
|
63
|
+
return this.determineReleaseType(version, commits).bump(version);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.JavaSnapshot = JavaSnapshot;
|
|
67
|
+
//# sourceMappingURL=java-snapshot.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Version } from '../version';
|
|
2
|
+
import { DefaultVersioningStrategy } from './default';
|
|
3
|
+
import { ConventionalCommit } from '../commit';
|
|
4
|
+
import { VersionUpdater } from '../versioning-strategy';
|
|
5
|
+
export declare class ServicePackVersioningStrategy extends DefaultVersioningStrategy {
|
|
6
|
+
determineReleaseType(_version: Version, _commits: ConventionalCommit[]): VersionUpdater;
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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.ServicePackVersioningStrategy = void 0;
|
|
17
|
+
const version_1 = require("../version");
|
|
18
|
+
const default_1 = require("./default");
|
|
19
|
+
const SERVICE_PACK_PATTERN = /sp\.(\d+)/;
|
|
20
|
+
class ServicePackVersionUpdate {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.name = 'service-pack';
|
|
23
|
+
}
|
|
24
|
+
bump(version) {
|
|
25
|
+
var _a;
|
|
26
|
+
const match = (_a = version.preRelease) === null || _a === void 0 ? void 0 : _a.match(SERVICE_PACK_PATTERN);
|
|
27
|
+
if (match) {
|
|
28
|
+
const spNumber = Number(match[1]);
|
|
29
|
+
return new version_1.Version(version.major, version.minor, version.patch, `sp.${spNumber + 1}`, version.build);
|
|
30
|
+
}
|
|
31
|
+
return new version_1.Version(version.major, version.minor, version.patch, 'sp.1', version.build);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class ServicePackVersioningStrategy extends default_1.DefaultVersioningStrategy {
|
|
35
|
+
determineReleaseType(_version, _commits) {
|
|
36
|
+
return new ServicePackVersionUpdate();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ServicePackVersioningStrategy = ServicePackVersioningStrategy;
|
|
40
|
+
//# sourceMappingURL=service-pack.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Version } from './version';
|
|
2
|
+
import { ConventionalCommit } from './commit';
|
|
3
|
+
export interface VersionUpdater {
|
|
4
|
+
bump(version: Version): Version;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class MajorVersionUpdate implements VersionUpdater {
|
|
8
|
+
name: string;
|
|
9
|
+
bump(version: Version): Version;
|
|
10
|
+
}
|
|
11
|
+
export declare class MinorVersionUpdate implements VersionUpdater {
|
|
12
|
+
name: string;
|
|
13
|
+
bump(version: Version): Version;
|
|
14
|
+
}
|
|
15
|
+
export declare class PatchVersionUpdate implements VersionUpdater {
|
|
16
|
+
name: string;
|
|
17
|
+
bump(version: Version): Version;
|
|
18
|
+
}
|
|
19
|
+
export declare class CustomVersionUpdate implements VersionUpdater {
|
|
20
|
+
name: string;
|
|
21
|
+
private versionString;
|
|
22
|
+
constructor(versionString: string);
|
|
23
|
+
bump(_version: Version): Version;
|
|
24
|
+
}
|
|
25
|
+
export interface VersioningStrategy {
|
|
26
|
+
bump(version: Version, commits: ConventionalCommit[]): Version;
|
|
27
|
+
determineReleaseType(version: Version, commits: ConventionalCommit[]): VersionUpdater;
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.CustomVersionUpdate = exports.PatchVersionUpdate = exports.MinorVersionUpdate = exports.MajorVersionUpdate = void 0;
|
|
17
|
+
const version_1 = require("./version");
|
|
18
|
+
class MajorVersionUpdate {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.name = 'major';
|
|
21
|
+
}
|
|
22
|
+
bump(version) {
|
|
23
|
+
return new version_1.Version(version.major + 1, 0, 0, version.preRelease, version.build);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.MajorVersionUpdate = MajorVersionUpdate;
|
|
27
|
+
class MinorVersionUpdate {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.name = 'minor';
|
|
30
|
+
}
|
|
31
|
+
bump(version) {
|
|
32
|
+
return new version_1.Version(version.major, version.minor + 1, 0, version.preRelease, version.build);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.MinorVersionUpdate = MinorVersionUpdate;
|
|
36
|
+
class PatchVersionUpdate {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.name = 'patch';
|
|
39
|
+
}
|
|
40
|
+
bump(version) {
|
|
41
|
+
return new version_1.Version(version.major, version.minor, version.patch + 1, version.preRelease, version.build);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PatchVersionUpdate = PatchVersionUpdate;
|
|
45
|
+
class CustomVersionUpdate {
|
|
46
|
+
constructor(versionString) {
|
|
47
|
+
this.name = 'custom';
|
|
48
|
+
this.versionString = versionString;
|
|
49
|
+
}
|
|
50
|
+
bump(_version) {
|
|
51
|
+
return version_1.Version.parse(this.versionString);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.CustomVersionUpdate = CustomVersionUpdate;
|
|
55
|
+
//# sourceMappingURL=versioning-strategy.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-please",
|
|
3
|
-
"version": "12.6.
|
|
3
|
+
"version": "12.6.1",
|
|
4
4
|
"description": "generate release PRs based on the conventionalcommits.org spec",
|
|
5
5
|
"main": "./build/src/index.js",
|
|
6
6
|
"bin": "./build/src/bin/release-please.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/iarna__toml": "^2.0.1",
|
|
43
43
|
"@types/js-yaml": "^4.0.0",
|
|
44
44
|
"@types/mocha": "^8.0.0",
|
|
45
|
-
"@types/node": "^
|
|
45
|
+
"@types/node": "^16.0.0",
|
|
46
46
|
"@types/pino": "^6.3.0",
|
|
47
47
|
"@types/semver": "^7.0.0",
|
|
48
48
|
"@types/sinon": "^10.0.0",
|