release-please 14.17.0 → 14.17.2
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 +16 -0
- package/README.md +4 -0
- package/build/src/changelog-notes/default.js +8 -1
- package/build/src/factories/changelog-notes-factory.d.ts +2 -2
- package/build/src/factories/plugin-factory.d.ts +1 -1
- package/build/src/factories/versioning-strategy-factory.d.ts +2 -2
- package/build/src/factory.d.ts +2 -2
- package/build/src/github.d.ts +6 -6
- package/build/src/manifest.d.ts +9 -9
- package/build/src/plugins/node-workspace.js +7 -3
- package/build/src/plugins/workspace.d.ts +1 -1
- package/build/src/strategies/dart.js +10 -1
- package/build/src/strategies/helm.js +10 -1
- package/build/src/updaters/rust/common.d.ts +1 -1
- package/build/src/util/branch-name.js +1 -1
- package/build/src/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [14.17.2](https://github.com/googleapis/release-please/compare/v14.17.1...v14.17.2) (2022-11-22)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* Handle issue links in BREAKING_CHANGE notes section ([#1757](https://github.com/googleapis/release-please/issues/1757)) ([cd8c04b](https://github.com/googleapis/release-please/commit/cd8c04b4d7a67116b31baff60279fa6d719c73a0))
|
|
13
|
+
|
|
14
|
+
## [14.17.1](https://github.com/googleapis/release-please/compare/v14.17.0...v14.17.1) (2022-11-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **dart:** Throw MissingRequiredFileError if pubspec.yaml is missing ([#1756](https://github.com/googleapis/release-please/issues/1756)) ([ada9fd6](https://github.com/googleapis/release-please/commit/ada9fd6db42aa6db0db52b8a81aa7f70b064e914))
|
|
20
|
+
* **helm:** throw MissingRequiredFileError if Chart.yaml is missing ([ada9fd6](https://github.com/googleapis/release-please/commit/ada9fd6db42aa6db0db52b8a81aa7f70b064e914))
|
|
21
|
+
* **node-workspace:** Maintain the dependency version prefix in newCandidate ([#1748](https://github.com/googleapis/release-please/issues/1748)) ([909d310](https://github.com/googleapis/release-please/commit/909d310defdf24adfd4858bbe1604668c14ef77f))
|
|
22
|
+
|
|
7
23
|
## [14.17.0](https://github.com/googleapis/release-please/compare/v14.16.0...v14.17.0) (2022-11-11)
|
|
8
24
|
|
|
9
25
|
|
package/README.md
CHANGED
|
@@ -219,6 +219,10 @@ Contributions welcome! See the [Contributing Guide](https://github.com/googleapi
|
|
|
219
219
|
|
|
220
220
|
For more information on the design of the library, see [design](https://github.com/googleapis/release-please/blob/main/docs/design.md).
|
|
221
221
|
|
|
222
|
+
## Troubleshooting
|
|
223
|
+
|
|
224
|
+
For common issues and help troubleshooting your configuration, see [Troubleshooting](https://github.com/googleapis/release-please/blob/main/docs/troubleshooting.md).
|
|
225
|
+
|
|
222
226
|
## License
|
|
223
227
|
|
|
224
228
|
Apache Version 2.0
|
|
@@ -47,12 +47,15 @@ class DefaultChangelogNotes {
|
|
|
47
47
|
preset.writerOpts.mainTemplate =
|
|
48
48
|
this.mainTemplate || preset.writerOpts.mainTemplate;
|
|
49
49
|
const changelogCommits = commits.map(commit => {
|
|
50
|
+
const notes = commit.notes
|
|
51
|
+
.filter(note => note.title === 'BREAKING CHANGE')
|
|
52
|
+
.map(note => replaceIssueLink(note, context.host, context.owner, context.repository));
|
|
50
53
|
return {
|
|
51
54
|
body: '',
|
|
52
55
|
subject: htmlEscape(commit.bareMessage),
|
|
53
56
|
type: commit.type,
|
|
54
57
|
scope: commit.scope,
|
|
55
|
-
notes
|
|
58
|
+
notes,
|
|
56
59
|
references: commit.references,
|
|
57
60
|
mentions: [],
|
|
58
61
|
merge: null,
|
|
@@ -71,6 +74,10 @@ class DefaultChangelogNotes {
|
|
|
71
74
|
}
|
|
72
75
|
}
|
|
73
76
|
exports.DefaultChangelogNotes = DefaultChangelogNotes;
|
|
77
|
+
function replaceIssueLink(note, host, owner, repo) {
|
|
78
|
+
note.text = note.text.replace(/\(#(\d+)\)/, `([#$1](${host}/${owner}/${repo}/issues/$1))`);
|
|
79
|
+
return note;
|
|
80
|
+
}
|
|
74
81
|
function htmlEscape(message) {
|
|
75
82
|
return message.replace('<', '<').replace('>', '>');
|
|
76
83
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GitHub } from '../github';
|
|
2
2
|
import { ChangelogNotes, ChangelogSection } from '../changelog-notes';
|
|
3
|
-
export
|
|
3
|
+
export type ChangelogNotesType = string;
|
|
4
4
|
export interface ChangelogNotesFactoryOptions {
|
|
5
5
|
type: ChangelogNotesType;
|
|
6
6
|
github: GitHub;
|
|
@@ -9,7 +9,7 @@ export interface ChangelogNotesFactoryOptions {
|
|
|
9
9
|
headerPartial?: string;
|
|
10
10
|
mainTemplate?: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type ChangelogNotesBuilder = (options: ChangelogNotesFactoryOptions) => ChangelogNotes;
|
|
13
13
|
export declare function buildChangelogNotes(options: ChangelogNotesFactoryOptions): ChangelogNotes;
|
|
14
14
|
export declare function registerChangelogNotes(name: string, changelogNotesBuilder: ChangelogNotesBuilder): void;
|
|
15
15
|
export declare function unregisterChangelogNotes(name: string): void;
|
|
@@ -14,7 +14,7 @@ export interface PluginFactoryOptions {
|
|
|
14
14
|
considerAllArtifacts?: boolean;
|
|
15
15
|
logger?: Logger;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type PluginBuilder = (options: PluginFactoryOptions) => ManifestPlugin;
|
|
18
18
|
export declare function buildPlugin(options: PluginFactoryOptions): ManifestPlugin;
|
|
19
19
|
export declare function registerPlugin(name: string, pluginBuilder: PluginBuilder): void;
|
|
20
20
|
export declare function unregisterPlugin(name: string): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { VersioningStrategy } from '../versioning-strategy';
|
|
2
2
|
import { GitHub } from '../github';
|
|
3
|
-
export
|
|
3
|
+
export type VersioningStrategyType = string;
|
|
4
4
|
export interface VersioningStrategyFactoryOptions {
|
|
5
5
|
type?: VersioningStrategyType;
|
|
6
6
|
bumpMinorPreMajor?: boolean;
|
|
7
7
|
bumpPatchForMinorPreMajor?: boolean;
|
|
8
8
|
github: GitHub;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type VersioningStrategyBuilder = (options: VersioningStrategyFactoryOptions) => VersioningStrategy;
|
|
11
11
|
export declare function buildVersioningStrategy(options: VersioningStrategyFactoryOptions): VersioningStrategy;
|
|
12
12
|
export declare function registerVersioningStrategy(name: string, versioningStrategyBuilder: VersioningStrategyBuilder): void;
|
|
13
13
|
export declare function unregisterVersioningStrategy(name: string): void;
|
package/build/src/factory.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { BaseStrategyOptions } from './strategies/base';
|
|
|
5
5
|
export * from './factories/changelog-notes-factory';
|
|
6
6
|
export * from './factories/plugin-factory';
|
|
7
7
|
export * from './factories/versioning-strategy-factory';
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type ReleaseType = string;
|
|
9
|
+
export type ReleaseBuilder = (options: BaseStrategyOptions) => Strategy;
|
|
10
10
|
export interface StrategyFactoryOptions extends ReleaserConfig {
|
|
11
11
|
github: GitHub;
|
|
12
12
|
path?: string;
|
package/build/src/github.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Octokit } from '@octokit/rest';
|
|
|
4
4
|
import { request } from '@octokit/request';
|
|
5
5
|
export declare const GH_API_URL = "https://api.github.com";
|
|
6
6
|
export declare const GH_GRAPHQL_URL = "https://api.github.com";
|
|
7
|
-
|
|
7
|
+
type OctokitType = InstanceType<typeof Octokit>;
|
|
8
8
|
import { Repository } from './repository';
|
|
9
9
|
import { ReleasePullRequest } from './release-pull-request';
|
|
10
10
|
import { Update } from './update';
|
|
@@ -12,9 +12,9 @@ import { Release } from './release';
|
|
|
12
12
|
import { GitHubFileContents } from '@google-automations/git-file-utils';
|
|
13
13
|
import { Logger } from 'code-suggester/build/src/types';
|
|
14
14
|
import { PullRequestOverflowHandler } from './util/pull-request-overflow-handler';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
type RequestBuilderType = typeof request;
|
|
16
|
+
type DefaultFunctionType = RequestBuilderType['defaults'];
|
|
17
|
+
type RequestFunctionType = ReturnType<DefaultFunctionType>;
|
|
18
18
|
export interface OctokitAPIs {
|
|
19
19
|
graphql: Function;
|
|
20
20
|
request: RequestFunctionType;
|
|
@@ -40,7 +40,7 @@ interface GitHubCreateOptions {
|
|
|
40
40
|
logger?: Logger;
|
|
41
41
|
proxy?: ProxyOption;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
type CommitFilter = (commit: Commit) => boolean;
|
|
44
44
|
interface CommitIteratorOptions {
|
|
45
45
|
maxResults?: number;
|
|
46
46
|
backfillFiles?: boolean;
|
|
@@ -74,7 +74,7 @@ interface FileDiff {
|
|
|
74
74
|
readonly content: string | null;
|
|
75
75
|
readonly originalContent: string | null;
|
|
76
76
|
}
|
|
77
|
-
export
|
|
77
|
+
export type ChangeSet = Map<string, FileDiff>;
|
|
78
78
|
interface CreatePullRequestOptions {
|
|
79
79
|
fork?: boolean;
|
|
80
80
|
draft?: boolean;
|
package/build/src/manifest.d.ts
CHANGED
|
@@ -7,30 +7,30 @@ import { ReleasePullRequest } from './release-pull-request';
|
|
|
7
7
|
import { ReleaseType, VersioningStrategyType, ChangelogNotesType } from './factory';
|
|
8
8
|
import { Release } from './release';
|
|
9
9
|
import { ManifestPlugin } from './plugin';
|
|
10
|
-
|
|
10
|
+
type ExtraJsonFile = {
|
|
11
11
|
type: 'json';
|
|
12
12
|
path: string;
|
|
13
13
|
jsonpath: string;
|
|
14
14
|
glob?: boolean;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type ExtraYamlFile = {
|
|
17
17
|
type: 'yaml';
|
|
18
18
|
path: string;
|
|
19
19
|
jsonpath: string;
|
|
20
20
|
glob?: boolean;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type ExtraXmlFile = {
|
|
23
23
|
type: 'xml';
|
|
24
24
|
path: string;
|
|
25
25
|
xpath: string;
|
|
26
26
|
glob?: boolean;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type ExtraPomFile = {
|
|
29
29
|
type: 'pom';
|
|
30
30
|
path: string;
|
|
31
31
|
glob?: boolean;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type ExtraFile = string | ExtraJsonFile | ExtraYamlFile | ExtraXmlFile | ExtraPomFile;
|
|
34
34
|
/**
|
|
35
35
|
* These are configurations provided to each strategy per-path.
|
|
36
36
|
*/
|
|
@@ -131,7 +131,7 @@ export interface ReleaserPackageConfig extends ReleaserConfigJson {
|
|
|
131
131
|
component?: string;
|
|
132
132
|
'changelog-path'?: string;
|
|
133
133
|
}
|
|
134
|
-
export
|
|
134
|
+
export type DirectPluginType = string;
|
|
135
135
|
export interface ConfigurablePluginType {
|
|
136
136
|
type: string;
|
|
137
137
|
}
|
|
@@ -151,7 +151,7 @@ export interface WorkspacePluginConfig extends ConfigurablePluginType {
|
|
|
151
151
|
export interface GroupPriorityPluginConfig extends ConfigurablePluginType {
|
|
152
152
|
groups: string[];
|
|
153
153
|
}
|
|
154
|
-
export
|
|
154
|
+
export type PluginType = DirectPluginType | ConfigurablePluginType | GroupPriorityPluginConfig | LinkedVersionPluginConfig | SentenceCasePluginConfig | WorkspacePluginConfig;
|
|
155
155
|
/**
|
|
156
156
|
* This is the schema of the manifest config json
|
|
157
157
|
*/
|
|
@@ -166,8 +166,8 @@ export interface ManifestConfig extends ReleaserConfigJson {
|
|
|
166
166
|
'commit-search-depth'?: number;
|
|
167
167
|
'sequential-calls'?: boolean;
|
|
168
168
|
}
|
|
169
|
-
export
|
|
170
|
-
export
|
|
169
|
+
export type ReleasedVersions = Record<string, Version>;
|
|
170
|
+
export type RepositoryConfig = Record<string, ReleaserConfig>;
|
|
171
171
|
export declare const DEFAULT_RELEASE_PLEASE_CONFIG = "release-please-config.json";
|
|
172
172
|
export declare const DEFAULT_RELEASE_PLEASE_MANIFEST = ".release-please-manifest.json";
|
|
173
173
|
export declare const ROOT_PROJECT_PATH = ".";
|
|
@@ -149,7 +149,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
149
149
|
return existingCandidate;
|
|
150
150
|
}
|
|
151
151
|
newCandidate(pkg, updatedVersions) {
|
|
152
|
-
var _a;
|
|
152
|
+
var _a, _b;
|
|
153
153
|
const graphPackage = (_a = this.packageGraph) === null || _a === void 0 ? void 0 : _a.get(pkg.name);
|
|
154
154
|
if (!graphPackage) {
|
|
155
155
|
throw new Error(`Could not find graph package for ${pkg.name}`);
|
|
@@ -164,8 +164,12 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
|
|
|
164
164
|
for (const [depName, resolved] of graphPackage.localDependencies) {
|
|
165
165
|
const depVersion = updatedVersions.get(depName);
|
|
166
166
|
if (depVersion && resolved.type !== 'directory') {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
const currentVersion = (_b = this.combineDeps(pkg)) === null || _b === void 0 ? void 0 : _b[depName];
|
|
168
|
+
const prefix = currentVersion
|
|
169
|
+
? this.detectRangePrefix(currentVersion)
|
|
170
|
+
: '';
|
|
171
|
+
updatedPackage.updateLocalDependency(resolved, depVersion.toString(), prefix);
|
|
172
|
+
this.logger.info(`${pkg.name}.${depName} updated to ${prefix}${depVersion.toString()}`);
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
const dependencyNotes = getChangelogDepsNotes(pkg, updatedPackage);
|
|
@@ -3,7 +3,7 @@ import { CandidateReleasePullRequest, RepositoryConfig } from '../manifest';
|
|
|
3
3
|
import { Logger } from '../util/logger';
|
|
4
4
|
import { VersionsMap, Version } from '../version';
|
|
5
5
|
import { GitHub } from '../github';
|
|
6
|
-
export
|
|
6
|
+
export type DependencyGraph<T> = Map<string, DependencyNode<T>>;
|
|
7
7
|
export interface DependencyNode<T> {
|
|
8
8
|
deps: string[];
|
|
9
9
|
value: T;
|
|
@@ -20,6 +20,7 @@ const yaml = require("js-yaml");
|
|
|
20
20
|
// pubspec
|
|
21
21
|
const pubspec_yaml_1 = require("../updaters/dart/pubspec-yaml");
|
|
22
22
|
const base_1 = require("./base");
|
|
23
|
+
const errors_1 = require("../errors");
|
|
23
24
|
class Dart extends base_1.BaseStrategy {
|
|
24
25
|
async buildUpdates(options) {
|
|
25
26
|
const updates = [];
|
|
@@ -54,7 +55,15 @@ class Dart extends base_1.BaseStrategy {
|
|
|
54
55
|
}
|
|
55
56
|
async getPubspecYmlContents() {
|
|
56
57
|
if (!this.pubspecYmlContents) {
|
|
57
|
-
|
|
58
|
+
try {
|
|
59
|
+
this.pubspecYmlContents = await this.github.getFileContentsOnBranch(this.addPath('pubspec.yaml'), this.targetBranch);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
if (e instanceof errors_1.FileNotFoundError) {
|
|
63
|
+
throw new errors_1.MissingRequiredFileError(this.addPath('pubspec.yaml'), Dart.name, `${this.repository.owner}/${this.repository.repo}`);
|
|
64
|
+
}
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
58
67
|
}
|
|
59
68
|
return this.pubspecYmlContents;
|
|
60
69
|
}
|
|
@@ -20,6 +20,7 @@ const yaml = require("js-yaml");
|
|
|
20
20
|
// helm
|
|
21
21
|
const chart_yaml_1 = require("../updaters/helm/chart-yaml");
|
|
22
22
|
const base_1 = require("./base");
|
|
23
|
+
const errors_1 = require("../errors");
|
|
23
24
|
class Helm extends base_1.BaseStrategy {
|
|
24
25
|
async buildUpdates(options) {
|
|
25
26
|
const updates = [];
|
|
@@ -54,7 +55,15 @@ class Helm extends base_1.BaseStrategy {
|
|
|
54
55
|
}
|
|
55
56
|
async getChartYmlContents() {
|
|
56
57
|
if (!this.chartYmlContents) {
|
|
57
|
-
|
|
58
|
+
try {
|
|
59
|
+
this.chartYmlContents = await this.github.getFileContents(this.addPath('Chart.yaml'));
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
if (e instanceof errors_1.FileNotFoundError) {
|
|
63
|
+
throw new errors_1.MissingRequiredFileError(this.addPath('Chart.yaml'), Helm.name, `${this.repository.owner}/${this.repository.repo}`);
|
|
64
|
+
}
|
|
65
|
+
throw e;
|
|
66
|
+
}
|
|
58
67
|
}
|
|
59
68
|
return this.chartYmlContents;
|
|
60
69
|
}
|
|
@@ -34,7 +34,7 @@ export interface CargoDependency {
|
|
|
34
34
|
path?: string;
|
|
35
35
|
registry?: string;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type DepKind = 'dependencies' | 'dev-dependencies' | 'build-dependencies';
|
|
38
38
|
/**
|
|
39
39
|
* All possible dependency kinds for `CargoManifest`,
|
|
40
40
|
* typed properly.
|
|
@@ -31,7 +31,6 @@ function getAllResourceNames() {
|
|
|
31
31
|
];
|
|
32
32
|
}
|
|
33
33
|
class BranchName {
|
|
34
|
-
constructor(_branchName) { }
|
|
35
34
|
static parse(branchName, logger = logger_1.logger) {
|
|
36
35
|
try {
|
|
37
36
|
const branchNameClass = getAllResourceNames().find(clazz => {
|
|
@@ -59,6 +58,7 @@ class BranchName {
|
|
|
59
58
|
static ofComponentTargetBranch(component, targetBranch) {
|
|
60
59
|
return new ComponentBranchName(`${RELEASE_PLEASE}--branches--${targetBranch}--components--${component}`);
|
|
61
60
|
}
|
|
61
|
+
constructor(_branchName) { }
|
|
62
62
|
static matches(_branchName) {
|
|
63
63
|
return false;
|
|
64
64
|
}
|
package/build/src/version.d.ts
CHANGED
package/package.json
CHANGED