release-please 16.10.1 → 16.11.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/README.md +1 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +1 -1
- package/build/src/manifest.d.ts +2 -0
- package/build/src/manifest.js +1 -0
- package/build/src/plugins/node-workspace.js +3 -0
- package/build/src/strategies/php-yoshi.js +26 -2
- package/build/src/updaters/node/package-json.d.ts +6 -1
- package/build/src/updaters/node/package-json.js +6 -1
- package/package.json +4 -4
- package/schemas/config.json +1 -1
- package/build/src/updaters/terraform/readme.js.map +0 -1
package/README.md
CHANGED
|
@@ -207,7 +207,7 @@ There are a variety of ways you can deploy release-please:
|
|
|
207
207
|
|
|
208
208
|
### GitHub Action (recommended)
|
|
209
209
|
|
|
210
|
-
The easiest way to run Release Please is as a GitHub action. Please see [
|
|
210
|
+
The easiest way to run Release Please is as a GitHub action. Please see [googleapis/release-please-action](https://github.com/googleapis/release-please-action) for installation and configuration instructions.
|
|
211
211
|
|
|
212
212
|
### Running as CLI
|
|
213
213
|
|
package/build/src/index.d.ts
CHANGED
package/build/src/index.js
CHANGED
|
@@ -36,6 +36,6 @@ Object.defineProperty(exports, "GitHub", { enumerable: true, get: function () {
|
|
|
36
36
|
exports.configSchema = require('../../schemas/config.json');
|
|
37
37
|
exports.manifestSchema = require('../../schemas/manifest.json');
|
|
38
38
|
// x-release-please-start-version
|
|
39
|
-
exports.VERSION = '16.
|
|
39
|
+
exports.VERSION = '16.11.0';
|
|
40
40
|
// x-release-please-end
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
package/build/src/manifest.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export interface ReleaserConfig {
|
|
|
69
69
|
releaseLabels?: string[];
|
|
70
70
|
extraLabels?: string[];
|
|
71
71
|
initialVersion?: string;
|
|
72
|
+
signoff?: string;
|
|
72
73
|
changelogSections?: ChangelogSection[];
|
|
73
74
|
changelogPath?: string;
|
|
74
75
|
changelogType?: ChangelogNotesType;
|
|
@@ -99,6 +100,7 @@ interface ReleaserConfigJson {
|
|
|
99
100
|
'changelog-sections'?: ChangelogSection[];
|
|
100
101
|
'release-as'?: string;
|
|
101
102
|
'skip-github-release'?: boolean;
|
|
103
|
+
signoff?: string;
|
|
102
104
|
draft?: boolean;
|
|
103
105
|
prerelease?: boolean;
|
|
104
106
|
'draft-pull-request'?: boolean;
|
package/build/src/manifest.js
CHANGED
|
@@ -114,6 +114,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
114
114
|
const updater = new package_json_1.PackageJson({
|
|
115
115
|
version: newVersion,
|
|
116
116
|
versionsMap: updatedVersions,
|
|
117
|
+
updatePeerDependencies: this.updatePeerDependencies,
|
|
117
118
|
});
|
|
118
119
|
const dependencyNotes = getChangelogDepsNotes(pkg, updatedPackage, updatedVersions, this.logger);
|
|
119
120
|
existingCandidate.pullRequest.updates =
|
|
@@ -194,6 +195,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
194
195
|
updater: new package_json_1.PackageJson({
|
|
195
196
|
version: newVersion,
|
|
196
197
|
versionsMap: updatedVersions,
|
|
198
|
+
updatePeerDependencies: this.updatePeerDependencies,
|
|
197
199
|
}),
|
|
198
200
|
},
|
|
199
201
|
{
|
|
@@ -202,6 +204,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
202
204
|
updater: new package_json_1.PackageJson({
|
|
203
205
|
version: newVersion,
|
|
204
206
|
versionsMap: updatedVersions,
|
|
207
|
+
updatePeerDependencies: this.updatePeerDependencies,
|
|
205
208
|
}),
|
|
206
209
|
},
|
|
207
210
|
{
|
|
@@ -55,6 +55,13 @@ class PHPYoshi extends base_1.BaseStrategy {
|
|
|
55
55
|
this.logger.info(`No commits for path: ${this.path}, skipping`);
|
|
56
56
|
return undefined;
|
|
57
57
|
}
|
|
58
|
+
const versionOverrides = {};
|
|
59
|
+
commits.forEach(commit => {
|
|
60
|
+
var _a;
|
|
61
|
+
Object.entries(parseVersionOverrides(((_a = commit.pullRequest) === null || _a === void 0 ? void 0 : _a.body) || '')).forEach(([directory, version]) => {
|
|
62
|
+
versionOverrides[directory] = version;
|
|
63
|
+
});
|
|
64
|
+
});
|
|
58
65
|
const newVersion = latestRelease
|
|
59
66
|
? await this.versioningStrategy.bump(latestRelease.tag.version, conventionalCommits)
|
|
60
67
|
: this.initialReleaseVersion();
|
|
@@ -69,13 +76,14 @@ class PHPYoshi extends base_1.BaseStrategy {
|
|
|
69
76
|
for (const directory of topLevelDirectories) {
|
|
70
77
|
try {
|
|
71
78
|
const contents = await this.github.getFileContentsOnBranch(this.addPath(`${directory}/VERSION`), this.targetBranch);
|
|
72
|
-
const version = version_1.Version.parse(contents.parsedContent);
|
|
73
79
|
const composer = await this.github.getFileJson(this.addPath(`${directory}/composer.json`), this.targetBranch);
|
|
74
80
|
directoryVersionContents[directory] = {
|
|
75
81
|
versionContents: contents,
|
|
76
82
|
composer,
|
|
77
83
|
};
|
|
78
|
-
const newVersion =
|
|
84
|
+
const newVersion = versionOverrides[directory]
|
|
85
|
+
? version_1.Version.parse(versionOverrides[directory])
|
|
86
|
+
: await this.versioningStrategy.bump(version_1.Version.parse(contents.parsedContent), splitCommits[directory]);
|
|
79
87
|
versionsMap.set(composer.name, newVersion);
|
|
80
88
|
const partialReleaseNotes = await this.changelogNotes.buildNotes(splitCommits[directory], {
|
|
81
89
|
host: this.changelogHost,
|
|
@@ -211,6 +219,22 @@ class PHPYoshi extends base_1.BaseStrategy {
|
|
|
211
219
|
}
|
|
212
220
|
}
|
|
213
221
|
exports.PHPYoshi = PHPYoshi;
|
|
222
|
+
function parseVersionOverrides(body) {
|
|
223
|
+
// look for 'BEGIN_VERSION_OVERRIDE' section of pull request body
|
|
224
|
+
const versionOverrides = {};
|
|
225
|
+
if (body) {
|
|
226
|
+
const overrideMessage = (body.split('BEGIN_VERSION_OVERRIDE')[1] || '')
|
|
227
|
+
.split('END_VERSION_OVERRIDE')[0]
|
|
228
|
+
.trim();
|
|
229
|
+
if (overrideMessage) {
|
|
230
|
+
overrideMessage.split('\n').forEach(line => {
|
|
231
|
+
const [directory, version] = line.split(':');
|
|
232
|
+
versionOverrides[directory.trim()] = version.trim();
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return versionOverrides;
|
|
237
|
+
}
|
|
214
238
|
function updatePHPChangelogEntry(pkgKey, changelogEntry, entryUpdate) {
|
|
215
239
|
// Remove the first line of the entry, in favor of <summary>.
|
|
216
240
|
// This also allows us to use the same regex for extracting release
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Logger } from '../../util/logger';
|
|
2
2
|
import { Version, VersionsMap } from '../../version';
|
|
3
|
-
import { DefaultUpdater } from '../default';
|
|
3
|
+
import { DefaultUpdater, UpdateOptions } from '../default';
|
|
4
4
|
export type PackageJsonDescriptor = {
|
|
5
5
|
name?: string;
|
|
6
6
|
resolved?: string;
|
|
@@ -11,10 +11,15 @@ export type PackageJsonDescriptor = {
|
|
|
11
11
|
peerDependencies?: Record<string, string>;
|
|
12
12
|
optionalDependencies?: Record<string, string>;
|
|
13
13
|
};
|
|
14
|
+
export interface PackageJsonOptions extends UpdateOptions {
|
|
15
|
+
updatePeerDependencies?: boolean;
|
|
16
|
+
}
|
|
14
17
|
/**
|
|
15
18
|
* This updates a Node.js package.json file's main version.
|
|
16
19
|
*/
|
|
17
20
|
export declare class PackageJson extends DefaultUpdater {
|
|
21
|
+
private updatePeerDependencies;
|
|
22
|
+
constructor(options: PackageJsonOptions);
|
|
18
23
|
/**
|
|
19
24
|
* Given initial file contents, return updated contents.
|
|
20
25
|
* @param {string} content The initial content
|
|
@@ -21,6 +21,11 @@ const default_1 = require("../default");
|
|
|
21
21
|
* This updates a Node.js package.json file's main version.
|
|
22
22
|
*/
|
|
23
23
|
class PackageJson extends default_1.DefaultUpdater {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super(options);
|
|
26
|
+
this.updatePeerDependencies = false;
|
|
27
|
+
this.updatePeerDependencies = options.updatePeerDependencies || false;
|
|
28
|
+
}
|
|
24
29
|
/**
|
|
25
30
|
* Given initial file contents, return updated contents.
|
|
26
31
|
* @param {string} content The initial content
|
|
@@ -40,7 +45,7 @@ class PackageJson extends default_1.DefaultUpdater {
|
|
|
40
45
|
if (parsed.devDependencies) {
|
|
41
46
|
updateDependencies(parsed.devDependencies, this.versionsMap);
|
|
42
47
|
}
|
|
43
|
-
if (parsed.peerDependencies) {
|
|
48
|
+
if (parsed.peerDependencies && this.updatePeerDependencies) {
|
|
44
49
|
updateDependencies(parsed.peerDependencies, this.versionsMap);
|
|
45
50
|
}
|
|
46
51
|
if (parsed.optionalDependencies) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-please",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.11.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",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"@types/npmlog": "^7.0.0",
|
|
51
51
|
"@types/pino": "^7.0.0",
|
|
52
52
|
"@types/semver": "^7.0.0",
|
|
53
|
-
"@types/sinon": "^
|
|
53
|
+
"@types/sinon": "^17.0.0",
|
|
54
54
|
"@types/xmldom": "^0.1.31",
|
|
55
55
|
"@types/yargs": "^17.0.0",
|
|
56
56
|
"ajv": "^8.11.0",
|
|
57
|
-
"ajv-formats": "^
|
|
57
|
+
"ajv-formats": "^3.0.0",
|
|
58
58
|
"c8": "^9.0.0",
|
|
59
59
|
"chai": "^4.2.0",
|
|
60
60
|
"config-chain": "^1.1.13",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"gts": "^3.1.0",
|
|
63
63
|
"mocha": "^9.2.2",
|
|
64
64
|
"nock": "^13.0.0",
|
|
65
|
-
"sinon": "
|
|
65
|
+
"sinon": "18.0.0",
|
|
66
66
|
"snap-shot-it": "^7.0.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
package/schemas/config.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type": "boolean"
|
|
22
22
|
},
|
|
23
23
|
"prerelease-type": {
|
|
24
|
-
"description": "Configuration option for the
|
|
24
|
+
"description": "Configuration option for the prerelease versioning strategy. If prerelease strategy used and type set, will set the prerelease part of the version to the provided value in case prerelease part is not present.",
|
|
25
25
|
"type": "string"
|
|
26
26
|
},
|
|
27
27
|
"versioning": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readme.js","sourceRoot":"","sources":["../../../../src/updaters/terraform/readme.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,wCAA0C;AAE1C;;GAEG;AACH,MAAa,MAAO,SAAQ,wBAAc;IACxC;;;;OAIG;IACH,aAAa,CAAC,OAAe;QAC3B,OAAO,OAAO,CAAC,OAAO,CACpB,4BAA4B,EAC5B,iBAAiB,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,CAC7D,CAAC;IACJ,CAAC;CACF;AAZD,wBAYC"}
|