release-please 15.5.0 → 15.6.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 +14 -0
- package/build/src/updaters/changelog-json.js +19 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [15.6.0](https://github.com/googleapis/release-please/compare/v15.5.1...v15.6.0) (2023-02-01)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **changelog.json:** Add pr suffix to issues array ([#1839](https://github.com/googleapis/release-please/issues/1839)) ([fdd75ef](https://github.com/googleapis/release-please/commit/fdd75efbc276d432f1d9d54f1790f4852a4aa3f7))
|
|
13
|
+
|
|
14
|
+
## [15.5.1](https://github.com/googleapis/release-please/compare/v15.5.0...v15.5.1) (2023-01-30)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* Support TOML up to v1.0.0-rc.1 spec. ([#1837](https://github.com/googleapis/release-please/issues/1837)) ([a3d94ee](https://github.com/googleapis/release-please/commit/a3d94eec209e00b6f513caa379096d082af7a72b))
|
|
20
|
+
|
|
7
21
|
## [15.5.0](https://github.com/googleapis/release-please/compare/v15.4.0...v15.5.0) (2023-01-27)
|
|
8
22
|
|
|
9
23
|
|
|
@@ -19,6 +19,7 @@ const default_1 = require("./default");
|
|
|
19
19
|
const crypto_1 = require("crypto");
|
|
20
20
|
const BREAKING_CHANGE_TITLE = 'BREAKING CHANGE';
|
|
21
21
|
const COMMIT_PREFIX = /^[^:]+: ?/;
|
|
22
|
+
const PR_SUFFIX_REGEX = / ?\(#(?<pr>[0-9]+)\)$/;
|
|
22
23
|
/**
|
|
23
24
|
* Maintians a machine readable CHANGELOG in chnagelog.json.
|
|
24
25
|
* See: https://gist.github.com/bcoe/50ef0a0024bbf107cd5bc0adbdc04758
|
|
@@ -40,17 +41,33 @@ class ChangelogJson extends default_1.DefaultUpdater {
|
|
|
40
41
|
* @returns {string} The updated content
|
|
41
42
|
*/
|
|
42
43
|
updateContent(content, logger = logger_1.logger) {
|
|
44
|
+
var _a;
|
|
43
45
|
const parsed = JSON.parse(content);
|
|
44
46
|
logger.info(`adding release ${this.version} for ${this.artifactName}`);
|
|
45
47
|
const changes = [];
|
|
46
48
|
for (const commit of this.commits) {
|
|
49
|
+
const issues = new Set();
|
|
47
50
|
// The commit.message field contains the type/scope prefix.
|
|
48
|
-
|
|
51
|
+
let message = commit.message.replace(COMMIT_PREFIX, '');
|
|
52
|
+
// When squashing commits, GitHub adds a suffix refrencing
|
|
53
|
+
// the # of the PR, e.g., chore(main): release 15.5.1 (#1838)
|
|
54
|
+
// this logic removes this suffix and prepends it to the
|
|
55
|
+
// issues array.
|
|
56
|
+
const match = message.match(PR_SUFFIX_REGEX);
|
|
57
|
+
if (match && ((_a = match.groups) === null || _a === void 0 ? void 0 : _a.pr)) {
|
|
58
|
+
message = message.replace(match[0], '');
|
|
59
|
+
issues.add(match.groups.pr);
|
|
60
|
+
}
|
|
61
|
+
// Array.from(someSet) will maintain elements in insertion
|
|
62
|
+
// order, given this we add references after the pr suffix.
|
|
63
|
+
for (const ref of commit.references) {
|
|
64
|
+
issues.add(ref.issue);
|
|
65
|
+
}
|
|
49
66
|
const change = {
|
|
50
67
|
type: commit.type,
|
|
51
68
|
sha: commit.sha,
|
|
52
69
|
message: message,
|
|
53
|
-
issues:
|
|
70
|
+
issues: Array.from(issues),
|
|
54
71
|
};
|
|
55
72
|
if (commit.scope)
|
|
56
73
|
change.scope = commit.scope;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-please",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.6.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",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@conventional-commits/parser": "^0.4.1",
|
|
71
71
|
"@google-automations/git-file-utils": "^1.2.5",
|
|
72
|
-
"@iarna/toml": "^
|
|
72
|
+
"@iarna/toml": "^3.0.0",
|
|
73
73
|
"@lerna/collect-updates": "^6.4.1",
|
|
74
74
|
"@lerna/package": "^6.4.1",
|
|
75
75
|
"@lerna/package-graph": "^6.4.1",
|