release-please 13.0.0-candidate.2 → 13.0.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 +52 -0
- package/README.md +33 -131
- package/build/src/bin/release-please.d.ts +0 -1
- package/build/src/bin/release-please.js +24 -6
- package/build/src/changelog-notes/default.d.ts +1 -3
- package/build/src/changelog-notes/default.js +2 -3
- 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 +3 -0
- package/build/src/changelog-notes.js +24 -0
- package/build/src/commit.d.ts +1 -1
- package/build/src/commit.js +14 -1
- package/build/src/factory.d.ts +13 -0
- package/build/src/factory.js +26 -1
- package/build/src/github.d.ts +48 -7
- package/build/src/github.js +73 -19
- package/build/src/manifest.d.ts +7 -3
- package/build/src/manifest.js +94 -25
- package/build/src/plugins/cargo-workspace.js +2 -2
- package/build/src/plugins/merge.js +4 -1
- package/build/src/plugins/node-workspace.js +2 -2
- package/build/src/pull-request.d.ts +8 -8
- package/build/src/release-pull-request.d.ts +6 -6
- package/build/src/strategies/base.d.ts +108 -0
- package/build/src/strategies/base.js +253 -0
- package/build/src/strategies/dart.d.ts +2 -2
- package/build/src/strategies/dart.js +2 -2
- package/build/src/strategies/elixir.d.ts +2 -2
- package/build/src/strategies/elixir.js +2 -2
- package/build/src/strategies/go-yoshi.d.ts +3 -3
- package/build/src/strategies/go-yoshi.js +10 -2
- package/build/src/strategies/go.d.ts +2 -2
- package/build/src/strategies/go.js +2 -2
- package/build/src/strategies/helm.d.ts +2 -2
- package/build/src/strategies/helm.js +2 -2
- package/build/src/strategies/java-yoshi.d.ts +5 -4
- package/build/src/strategies/java-yoshi.js +58 -2
- package/build/src/strategies/krm-blueprint.d.ts +2 -2
- package/build/src/strategies/krm-blueprint.js +3 -3
- package/build/src/strategies/node.d.ts +2 -2
- package/build/src/strategies/node.js +2 -2
- package/build/src/strategies/ocaml.d.ts +2 -2
- package/build/src/strategies/ocaml.js +2 -2
- package/build/src/strategies/php-yoshi.d.ts +3 -3
- package/build/src/strategies/php-yoshi.js +3 -2
- package/build/src/strategies/php.d.ts +3 -3
- package/build/src/strategies/php.js +2 -2
- package/build/src/strategies/python.d.ts +2 -2
- package/build/src/strategies/python.js +2 -2
- package/build/src/strategies/ruby-yoshi.d.ts +3 -3
- package/build/src/strategies/ruby-yoshi.js +7 -2
- package/build/src/strategies/ruby.d.ts +3 -3
- package/build/src/strategies/ruby.js +2 -2
- package/build/src/strategies/rust.d.ts +2 -2
- package/build/src/strategies/rust.js +2 -2
- package/build/src/strategies/simple.d.ts +2 -2
- package/build/src/strategies/simple.js +2 -2
- package/build/src/strategies/terraform-module.d.ts +2 -2
- package/build/src/strategies/terraform-module.js +2 -2
- package/build/src/strategy.d.ts +8 -70
- package/build/src/strategy.js +0 -217
- 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/rust/cargo-toml.js +5 -1
- package/build/src/util/branch-name.js +65 -7
- package/build/src/util/commit-split.js +3 -0
- package/build/src/util/pull-request-title.js +1 -0
- package/build/src/version.d.ts +28 -5
- package/build/src/version.js +26 -0
- package/build/src/versioning-strategies/always-bump-patch.d.ts +4 -0
- package/build/src/versioning-strategies/always-bump-patch.js +4 -0
- package/build/src/versioning-strategies/default.d.ts +31 -0
- package/build/src/versioning-strategies/default.js +31 -0
- package/build/src/versioning-strategies/dependency-manifest.d.ts +8 -0
- package/build/src/versioning-strategies/dependency-manifest.js +8 -0
- package/build/src/versioning-strategies/java-add-snapshot.d.ts +4 -0
- package/build/src/versioning-strategies/java-add-snapshot.js +6 -5
- package/build/src/versioning-strategies/java-snapshot.d.ts +4 -0
- package/build/src/versioning-strategies/java-snapshot.js +4 -1
- package/build/src/versioning-strategies/service-pack.d.ts +5 -0
- package/build/src/versioning-strategies/service-pack.js +10 -3
- package/build/src/versioning-strategy.d.ts +67 -5
- package/build/src/versioning-strategy.js +37 -10
- package/package.json +4 -4
- package/build/src/release-notes.d.ts +0 -29
- package/build/src/release-notes.js +0 -71
|
@@ -15,38 +15,65 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.CustomVersionUpdate = exports.PatchVersionUpdate = exports.MinorVersionUpdate = exports.MajorVersionUpdate = void 0;
|
|
17
17
|
const version_1 = require("./version");
|
|
18
|
+
/**
|
|
19
|
+
* This VersionUpdater performs a SemVer major version bump.
|
|
20
|
+
*/
|
|
18
21
|
class MajorVersionUpdate {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Returns the new bumped version
|
|
24
|
+
*
|
|
25
|
+
* @param {Version} version The current version
|
|
26
|
+
* @returns {Version} The bumped version
|
|
27
|
+
*/
|
|
22
28
|
bump(version) {
|
|
23
29
|
return new version_1.Version(version.major + 1, 0, 0, version.preRelease, version.build);
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
32
|
exports.MajorVersionUpdate = MajorVersionUpdate;
|
|
33
|
+
/**
|
|
34
|
+
* This VersionUpdater performs a SemVer minor version bump.
|
|
35
|
+
*/
|
|
27
36
|
class MinorVersionUpdate {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Returns the new bumped version
|
|
39
|
+
*
|
|
40
|
+
* @param {Version} version The current version
|
|
41
|
+
* @returns {Version} The bumped version
|
|
42
|
+
*/
|
|
31
43
|
bump(version) {
|
|
32
44
|
return new version_1.Version(version.major, version.minor + 1, 0, version.preRelease, version.build);
|
|
33
45
|
}
|
|
34
46
|
}
|
|
35
47
|
exports.MinorVersionUpdate = MinorVersionUpdate;
|
|
48
|
+
/**
|
|
49
|
+
* This VersionUpdater performs a SemVer patch version bump.
|
|
50
|
+
*/
|
|
36
51
|
class PatchVersionUpdate {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Returns the new bumped version
|
|
54
|
+
*
|
|
55
|
+
* @param {Version} version The current version
|
|
56
|
+
* @returns {Version} The bumped version
|
|
57
|
+
*/
|
|
40
58
|
bump(version) {
|
|
41
59
|
return new version_1.Version(version.major, version.minor, version.patch + 1, version.preRelease, version.build);
|
|
42
60
|
}
|
|
43
61
|
}
|
|
44
62
|
exports.PatchVersionUpdate = PatchVersionUpdate;
|
|
63
|
+
/**
|
|
64
|
+
* This VersionUpdater sets the version to a specific version.
|
|
65
|
+
*/
|
|
45
66
|
class CustomVersionUpdate {
|
|
46
67
|
constructor(versionString) {
|
|
47
|
-
this.name = 'custom';
|
|
48
68
|
this.versionString = versionString;
|
|
49
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns the new bumped version. This version is specified
|
|
72
|
+
* at initialization.
|
|
73
|
+
*
|
|
74
|
+
* @param {Version} version The current version
|
|
75
|
+
* @returns {Version} The bumped version
|
|
76
|
+
*/
|
|
50
77
|
bump(_version) {
|
|
51
78
|
return version_1.Version.parse(this.versionString);
|
|
52
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-please",
|
|
3
|
-
"version": "13.0.0
|
|
3
|
+
"version": "13.0.0",
|
|
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",
|
|
@@ -66,13 +66,14 @@
|
|
|
66
66
|
"@octokit/graphql": "^4.3.1",
|
|
67
67
|
"@octokit/request": "^5.6.0",
|
|
68
68
|
"@octokit/request-error": "^2.1.0",
|
|
69
|
-
"@octokit/rest": "^18.
|
|
69
|
+
"@octokit/rest": "^18.12.0",
|
|
70
70
|
"@types/npm-package-arg": "^6.1.0",
|
|
71
71
|
"chalk": "^4.0.0",
|
|
72
72
|
"code-suggester": "^2.0.0",
|
|
73
73
|
"conventional-changelog-conventionalcommits": "^4.6.0",
|
|
74
74
|
"conventional-changelog-writer": "^5.0.0",
|
|
75
75
|
"conventional-commits-filter": "^2.0.2",
|
|
76
|
+
"detect-indent": "^6.1.0",
|
|
76
77
|
"figures": "^3.0.0",
|
|
77
78
|
"js-yaml": "^4.0.0",
|
|
78
79
|
"node-html-parser": "^5.0.0",
|
|
@@ -82,8 +83,7 @@
|
|
|
82
83
|
"typescript": "^3.8.3",
|
|
83
84
|
"unist-util-visit": "^2.0.3",
|
|
84
85
|
"unist-util-visit-parents": "^3.1.1",
|
|
85
|
-
"yargs": "^17.0.0"
|
|
86
|
-
"detect-indent": "^6.1.0"
|
|
86
|
+
"yargs": "^17.0.0"
|
|
87
87
|
},
|
|
88
88
|
"engines": {
|
|
89
89
|
"node": ">=12.18.0"
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ConventionalCommit } from './commit';
|
|
2
|
-
export interface ChangelogSection {
|
|
3
|
-
type: string;
|
|
4
|
-
section: string;
|
|
5
|
-
hidden?: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface ReleaseNotesOptions {
|
|
8
|
-
changelogSections?: ChangelogSection[];
|
|
9
|
-
commitPartial?: string;
|
|
10
|
-
headerPartial?: string;
|
|
11
|
-
mainTemplate?: string;
|
|
12
|
-
}
|
|
13
|
-
interface BuildNotesOptions {
|
|
14
|
-
host?: string;
|
|
15
|
-
owner: string;
|
|
16
|
-
repository: string;
|
|
17
|
-
version: string;
|
|
18
|
-
previousTag?: string;
|
|
19
|
-
currentTag: string;
|
|
20
|
-
}
|
|
21
|
-
export declare class ReleaseNotes {
|
|
22
|
-
private changelogSections?;
|
|
23
|
-
private commitPartial?;
|
|
24
|
-
private headerPartial?;
|
|
25
|
-
private mainTemplate?;
|
|
26
|
-
constructor(options?: ReleaseNotesOptions);
|
|
27
|
-
buildNotes(commits: ConventionalCommit[], options: BuildNotesOptions): Promise<string>;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,71 +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.ReleaseNotes = void 0;
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
18
|
-
const conventionalChangelogWriter = require('conventional-changelog-writer');
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
20
|
-
const presetFactory = require('conventional-changelog-conventionalcommits');
|
|
21
|
-
class ReleaseNotes {
|
|
22
|
-
constructor(options = {}) {
|
|
23
|
-
this.changelogSections = options.changelogSections;
|
|
24
|
-
this.commitPartial = options.commitPartial;
|
|
25
|
-
this.headerPartial = options.headerPartial;
|
|
26
|
-
this.mainTemplate = options.mainTemplate;
|
|
27
|
-
}
|
|
28
|
-
async buildNotes(commits, options) {
|
|
29
|
-
const context = {
|
|
30
|
-
host: options.host || 'https://github.com',
|
|
31
|
-
owner: options.owner,
|
|
32
|
-
repository: options.repository,
|
|
33
|
-
version: options.version,
|
|
34
|
-
previousTag: options.previousTag,
|
|
35
|
-
currentTag: options.currentTag,
|
|
36
|
-
linkCompare: !!options.previousTag,
|
|
37
|
-
};
|
|
38
|
-
const config = {};
|
|
39
|
-
if (this.changelogSections) {
|
|
40
|
-
config.types = this.changelogSections;
|
|
41
|
-
}
|
|
42
|
-
const preset = await presetFactory(config);
|
|
43
|
-
preset.writerOpts.commitPartial =
|
|
44
|
-
this.commitPartial || preset.writerOpts.commitPartial;
|
|
45
|
-
preset.writerOpts.headerPartial =
|
|
46
|
-
this.headerPartial || preset.writerOpts.headerPartial;
|
|
47
|
-
preset.writerOpts.mainTemplate =
|
|
48
|
-
this.mainTemplate || preset.writerOpts.mainTemplate;
|
|
49
|
-
const changelogCommits = commits.map(commit => {
|
|
50
|
-
return {
|
|
51
|
-
body: '',
|
|
52
|
-
subject: commit.bareMessage,
|
|
53
|
-
type: commit.type,
|
|
54
|
-
scope: commit.scope,
|
|
55
|
-
notes: commit.notes,
|
|
56
|
-
references: commit.references,
|
|
57
|
-
mentions: [],
|
|
58
|
-
merge: null,
|
|
59
|
-
revert: null,
|
|
60
|
-
header: commit.message,
|
|
61
|
-
footer: null,
|
|
62
|
-
hash: commit.sha,
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
return conventionalChangelogWriter
|
|
66
|
-
.parseArray(changelogCommits, context, preset.writerOpts)
|
|
67
|
-
.trim();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
exports.ReleaseNotes = ReleaseNotes;
|
|
71
|
-
//# sourceMappingURL=release-notes.js.map
|