release-please 13.20.0 → 13.21.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 +12 -0
- package/README.md +8 -1
- package/build/src/github.d.ts +1 -0
- package/build/src/github.js +14 -6
- package/build/src/manifest.d.ts +1 -0
- package/build/src/manifest.js +24 -20
- package/package.json +1 -1
- package/schemas/config.json +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [13.21.0](https://github.com/googleapis/release-please/compare/v13.20.0...v13.21.0) (2022-08-11)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* parse versioning type from the manifest config ([#1572](https://github.com/googleapis/release-please/issues/1572)) ([8a7bfc1](https://github.com/googleapis/release-please/commit/8a7bfc165755cec97cc9a3baa39ccd21e719644c)), closes [#1569](https://github.com/googleapis/release-please/issues/1569)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* throw underlying API error when the manifest fetch commits when determining the latest released version ([#1571](https://github.com/googleapis/release-please/issues/1571)) ([0944bde](https://github.com/googleapis/release-please/commit/0944bdeb04bcee2872e79a07fbe05967847caef0))
|
|
18
|
+
|
|
7
19
|
## [13.20.0](https://github.com/googleapis/release-please/compare/v13.19.9...v13.20.0) (2022-08-08)
|
|
8
20
|
|
|
9
21
|
|
package/README.md
CHANGED
|
@@ -115,11 +115,18 @@ commit message instead of the merged commit message.
|
|
|
115
115
|
Release Please creates a release pull request after it notices the default branch
|
|
116
116
|
contains "releasable units" since the last release.
|
|
117
117
|
A releasable unit is a commit to the branch with one of the following
|
|
118
|
-
prefixes: "feat"
|
|
118
|
+
prefixes: "feat", "fix", and "deps".
|
|
119
|
+
(A "chore" or "build" commit is not a releasable unit.)
|
|
119
120
|
|
|
120
121
|
Some languages have their specific releasable unit configuration. For example,
|
|
121
122
|
"docs" is a prefix for releasable units in Java and Python.
|
|
122
123
|
|
|
124
|
+
If you think Release Please missed to create a release PR after a pull request
|
|
125
|
+
with with releasable unit has been merged, please re-run `release-please`. If you are using
|
|
126
|
+
the GitHub application, add `release-please:force-run` label to the merged pull request. If
|
|
127
|
+
you are using the action, look for the failed invocation and retry the workflow run.
|
|
128
|
+
Release Please will process the pull request immediately to find releasable units.
|
|
129
|
+
|
|
123
130
|
## Strategy (Language) types supported
|
|
124
131
|
|
|
125
132
|
Release Please automates releases for the following flavors of repositories:
|
package/build/src/github.d.ts
CHANGED
package/build/src/github.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// See the License for the specific language governing permissions and
|
|
14
14
|
// limitations under the License.
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.GitHub = exports.GH_GRAPHQL_URL = exports.GH_API_URL = void 0;
|
|
16
|
+
exports.sleepInMs = exports.GitHub = exports.GH_GRAPHQL_URL = exports.GH_API_URL = void 0;
|
|
17
17
|
const code_suggester_1 = require("code-suggester");
|
|
18
18
|
const rest_1 = require("@octokit/rest");
|
|
19
19
|
const request_1 = require("@octokit/request");
|
|
@@ -21,6 +21,7 @@ const graphql_1 = require("@octokit/graphql");
|
|
|
21
21
|
const request_error_1 = require("@octokit/request-error");
|
|
22
22
|
const errors_1 = require("./errors");
|
|
23
23
|
const MAX_ISSUE_BODY_SIZE = 65536;
|
|
24
|
+
const MAX_SLEEP_SECONDS = 20;
|
|
24
25
|
exports.GH_API_URL = 'https://api.github.com';
|
|
25
26
|
exports.GH_GRAPHQL_URL = 'https://api.github.com';
|
|
26
27
|
const logger_1 = require("./util/logger");
|
|
@@ -58,7 +59,9 @@ class GitHub {
|
|
|
58
59
|
}
|
|
59
60
|
return files;
|
|
60
61
|
});
|
|
61
|
-
this.graphqlRequest = wrapAsync(async (opts,
|
|
62
|
+
this.graphqlRequest = wrapAsync(async (opts, options) => {
|
|
63
|
+
var _a;
|
|
64
|
+
let maxRetries = (_a = options === null || options === void 0 ? void 0 : options.maxRetries) !== null && _a !== void 0 ? _a : 5;
|
|
62
65
|
let seconds = 1;
|
|
63
66
|
while (maxRetries >= 0) {
|
|
64
67
|
try {
|
|
@@ -72,13 +75,17 @@ class GitHub {
|
|
|
72
75
|
if (err.status !== 502) {
|
|
73
76
|
throw err;
|
|
74
77
|
}
|
|
75
|
-
|
|
78
|
+
if (maxRetries === 0) {
|
|
79
|
+
logger_1.logger.warn('ran out of retries and response is required');
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
logger_1.logger.info(`received 502 error, ${maxRetries} attempts remaining`);
|
|
76
83
|
}
|
|
77
84
|
maxRetries -= 1;
|
|
78
85
|
if (maxRetries >= 0) {
|
|
79
86
|
logger_1.logger.trace(`sleeping ${seconds} seconds`);
|
|
80
|
-
await sleepInMs(1000 * seconds);
|
|
81
|
-
seconds
|
|
87
|
+
await (0, exports.sleepInMs)(1000 * seconds);
|
|
88
|
+
seconds = Math.min(seconds * 2, MAX_SLEEP_SECONDS);
|
|
82
89
|
}
|
|
83
90
|
}
|
|
84
91
|
logger_1.logger.trace('ran out of retries');
|
|
@@ -687,7 +694,7 @@ class GitHub {
|
|
|
687
694
|
targetBranch,
|
|
688
695
|
states,
|
|
689
696
|
maxFilesChanged: 64,
|
|
690
|
-
}
|
|
697
|
+
});
|
|
691
698
|
if (!((_a = response === null || response === void 0 ? void 0 : response.repository) === null || _a === void 0 ? void 0 : _a.pullRequests)) {
|
|
692
699
|
logger_1.logger.warn(`Could not find merged pull requests for branch ${targetBranch} - it likely does not exist.`);
|
|
693
700
|
return null;
|
|
@@ -1004,4 +1011,5 @@ const wrapAsync = (fn, errorHandler) => {
|
|
|
1004
1011
|
};
|
|
1005
1012
|
};
|
|
1006
1013
|
const sleepInMs = (ms) => new Promise(resolve => setTimeout(resolve, ms));
|
|
1014
|
+
exports.sleepInMs = sleepInMs;
|
|
1007
1015
|
//# sourceMappingURL=github.js.map
|
package/build/src/manifest.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export interface CandidateRelease extends Release {
|
|
|
69
69
|
}
|
|
70
70
|
interface ReleaserConfigJson {
|
|
71
71
|
'release-type'?: ReleaseType;
|
|
72
|
+
versioning?: VersioningStrategyType;
|
|
72
73
|
'bump-minor-pre-major'?: boolean;
|
|
73
74
|
'bump-patch-for-minor-pre-major'?: boolean;
|
|
74
75
|
'changelog-sections'?: ChangelogSection[];
|
package/build/src/manifest.js
CHANGED
|
@@ -713,6 +713,7 @@ function extractReleaserConfig(config) {
|
|
|
713
713
|
releaseType: config['release-type'],
|
|
714
714
|
bumpMinorPreMajor: config['bump-minor-pre-major'],
|
|
715
715
|
bumpPatchForMinorPreMajor: config['bump-patch-for-minor-pre-major'],
|
|
716
|
+
versioning: config['versioning'],
|
|
716
717
|
changelogSections: config['changelog-sections'],
|
|
717
718
|
changelogPath: config['changelog-path'],
|
|
718
719
|
changelogHost: config['changelog-host'],
|
|
@@ -867,7 +868,9 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
|
|
|
867
868
|
// only look at the last 250 or so commits to find the latest tag - we
|
|
868
869
|
// don't want to scan the entire repository history if this repo has never
|
|
869
870
|
// been released
|
|
870
|
-
const generator = github.mergeCommitIterator(targetBranch, {
|
|
871
|
+
const generator = github.mergeCommitIterator(targetBranch, {
|
|
872
|
+
maxResults: 250,
|
|
873
|
+
});
|
|
871
874
|
for await (const commitWithPullRequest of generator) {
|
|
872
875
|
commitShas.add(commitWithPullRequest.sha);
|
|
873
876
|
const mergedPullRequest = commitWithPullRequest.pullRequest;
|
|
@@ -938,29 +941,30 @@ async function latestReleaseVersion(github, targetBranch, releaseFilter, config,
|
|
|
938
941
|
return candidateTagVersion.sort((a, b) => b.compare(a))[0];
|
|
939
942
|
}
|
|
940
943
|
function mergeReleaserConfig(defaultConfig, pathConfig) {
|
|
941
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
944
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
942
945
|
return {
|
|
943
946
|
releaseType: (_b = (_a = pathConfig.releaseType) !== null && _a !== void 0 ? _a : defaultConfig.releaseType) !== null && _b !== void 0 ? _b : 'node',
|
|
944
947
|
bumpMinorPreMajor: (_c = pathConfig.bumpMinorPreMajor) !== null && _c !== void 0 ? _c : defaultConfig.bumpMinorPreMajor,
|
|
945
948
|
bumpPatchForMinorPreMajor: (_d = pathConfig.bumpPatchForMinorPreMajor) !== null && _d !== void 0 ? _d : defaultConfig.bumpPatchForMinorPreMajor,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
949
|
+
versioning: (_e = pathConfig.versioning) !== null && _e !== void 0 ? _e : defaultConfig.versioning,
|
|
950
|
+
changelogSections: (_f = pathConfig.changelogSections) !== null && _f !== void 0 ? _f : defaultConfig.changelogSections,
|
|
951
|
+
changelogPath: (_g = pathConfig.changelogPath) !== null && _g !== void 0 ? _g : defaultConfig.changelogPath,
|
|
952
|
+
changelogHost: (_h = pathConfig.changelogHost) !== null && _h !== void 0 ? _h : defaultConfig.changelogHost,
|
|
953
|
+
changelogType: (_j = pathConfig.changelogType) !== null && _j !== void 0 ? _j : defaultConfig.changelogType,
|
|
954
|
+
releaseAs: (_k = pathConfig.releaseAs) !== null && _k !== void 0 ? _k : defaultConfig.releaseAs,
|
|
955
|
+
skipGithubRelease: (_l = pathConfig.skipGithubRelease) !== null && _l !== void 0 ? _l : defaultConfig.skipGithubRelease,
|
|
956
|
+
draft: (_m = pathConfig.draft) !== null && _m !== void 0 ? _m : defaultConfig.draft,
|
|
957
|
+
prerelease: (_o = pathConfig.prerelease) !== null && _o !== void 0 ? _o : defaultConfig.prerelease,
|
|
958
|
+
component: (_p = pathConfig.component) !== null && _p !== void 0 ? _p : defaultConfig.component,
|
|
959
|
+
packageName: (_q = pathConfig.packageName) !== null && _q !== void 0 ? _q : defaultConfig.packageName,
|
|
960
|
+
versionFile: (_r = pathConfig.versionFile) !== null && _r !== void 0 ? _r : defaultConfig.versionFile,
|
|
961
|
+
extraFiles: (_s = pathConfig.extraFiles) !== null && _s !== void 0 ? _s : defaultConfig.extraFiles,
|
|
962
|
+
includeComponentInTag: (_t = pathConfig.includeComponentInTag) !== null && _t !== void 0 ? _t : defaultConfig.includeComponentInTag,
|
|
963
|
+
includeVInTag: (_u = pathConfig.includeVInTag) !== null && _u !== void 0 ? _u : defaultConfig.includeVInTag,
|
|
964
|
+
tagSeparator: (_v = pathConfig.tagSeparator) !== null && _v !== void 0 ? _v : defaultConfig.tagSeparator,
|
|
965
|
+
pullRequestTitlePattern: (_w = pathConfig.pullRequestTitlePattern) !== null && _w !== void 0 ? _w : defaultConfig.pullRequestTitlePattern,
|
|
966
|
+
separatePullRequests: (_x = pathConfig.separatePullRequests) !== null && _x !== void 0 ? _x : defaultConfig.separatePullRequests,
|
|
967
|
+
skipSnapshot: (_y = pathConfig.skipSnapshot) !== null && _y !== void 0 ? _y : defaultConfig.skipSnapshot,
|
|
964
968
|
};
|
|
965
969
|
}
|
|
966
970
|
/**
|
package/package.json
CHANGED
package/schemas/config.json
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"description": "Feature changes only bump semver patch if version < 1.0.0",
|
|
21
21
|
"type": "boolean"
|
|
22
22
|
},
|
|
23
|
+
"versioning": {
|
|
24
|
+
"description": "Versioning strategy. Defaults to `default`",
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
23
27
|
"changelog-sections": {
|
|
24
28
|
"description": "Override the Changelog configuration sections",
|
|
25
29
|
"type": "array",
|
|
@@ -305,6 +309,7 @@
|
|
|
305
309
|
"release-type": true,
|
|
306
310
|
"bump-minor-pre-major": true,
|
|
307
311
|
"bump-patch-for-minor-pre-major": true,
|
|
312
|
+
"versioning": true,
|
|
308
313
|
"changelog-sections": true,
|
|
309
314
|
"release-as": true,
|
|
310
315
|
"skip-github-release": true,
|