release-please 16.4.0 → 16.4.1

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.
@@ -10,6 +10,7 @@ export interface PluginFactoryOptions {
10
10
  repositoryConfig: RepositoryConfig;
11
11
  manifestPath: string;
12
12
  alwaysLinkLocal?: boolean;
13
+ updatePeerDependencies?: boolean;
13
14
  updateAllPackages?: boolean;
14
15
  considerAllArtifacts?: boolean;
15
16
  logger?: Logger;
@@ -160,10 +160,13 @@ export interface WorkspacePluginConfig extends ConfigurablePluginType {
160
160
  merge?: boolean;
161
161
  considerAllArtifacts?: boolean;
162
162
  }
163
+ export interface NodeWorkspacePluginConfig extends WorkspacePluginConfig {
164
+ updatePeerDependencies?: boolean;
165
+ }
163
166
  export interface GroupPriorityPluginConfig extends ConfigurablePluginType {
164
167
  groups: string[];
165
168
  }
166
- export type PluginType = DirectPluginType | ConfigurablePluginType | GroupPriorityPluginConfig | LinkedVersionPluginConfig | SentenceCasePluginConfig | WorkspacePluginConfig;
169
+ export type PluginType = DirectPluginType | ConfigurablePluginType | GroupPriorityPluginConfig | LinkedVersionPluginConfig | SentenceCasePluginConfig | WorkspacePluginConfig | NodeWorkspacePluginConfig;
167
170
  /**
168
171
  * This is the schema of the manifest config json
169
172
  */
@@ -238,6 +241,8 @@ export declare class Manifest {
238
241
  * as the point to consider commits after
239
242
  * @param {boolean} manifestOptions.alwaysLinkLocal Option for the node-workspace
240
243
  * plugin
244
+ * @param {boolean} manifestOptions.updatePeerDependencies Option for the node-workspace
245
+ * plugin
241
246
  * @param {boolean} manifestOptions.separatePullRequests If true, create separate pull
242
247
  * requests instead of a single manifest release pull request
243
248
  * @param {PluginType[]} manifestOptions.plugins Any plugins to use for this repository
@@ -274,6 +279,8 @@ export declare class Manifest {
274
279
  * as the point to consider commits after
275
280
  * @param {boolean} manifestOptions.alwaysLinkLocal Option for the node-workspace
276
281
  * plugin
282
+ * @param {boolean} manifestOptions.updatePeerDependencies Option for the node-workspace
283
+ * plugin
277
284
  * @param {boolean} manifestOptions.separatePullRequests If true, create separate pull
278
285
  * requests instead of a single manifest release pull request
279
286
  * @param {PluginType[]} manifestOptions.plugins Any plugins to use for this repository
@@ -53,6 +53,8 @@ class Manifest {
53
53
  * as the point to consider commits after
54
54
  * @param {boolean} manifestOptions.alwaysLinkLocal Option for the node-workspace
55
55
  * plugin
56
+ * @param {boolean} manifestOptions.updatePeerDependencies Option for the node-workspace
57
+ * plugin
56
58
  * @param {boolean} manifestOptions.separatePullRequests If true, create separate pull
57
59
  * requests instead of a single manifest release pull request
58
60
  * @param {PluginType[]} manifestOptions.plugins Any plugins to use for this repository
@@ -138,6 +140,8 @@ class Manifest {
138
140
  * as the point to consider commits after
139
141
  * @param {boolean} manifestOptions.alwaysLinkLocal Option for the node-workspace
140
142
  * plugin
143
+ * @param {boolean} manifestOptions.updatePeerDependencies Option for the node-workspace
144
+ * plugin
141
145
  * @param {boolean} manifestOptions.separatePullRequests If true, create separate pull
142
146
  * requests instead of a single manifest release pull request
143
147
  * @param {PluginType[]} manifestOptions.plugins Any plugins to use for this repository
@@ -373,9 +377,23 @@ class Manifest {
373
377
  // Combine pull requests into 1 unless configured for separate
374
378
  // pull requests
375
379
  if (!this.separatePullRequests) {
376
- this.plugins.push(new merge_1.Merge(this.github, this.targetBranch, this.repositoryConfig, {
380
+ const mergeOptions = {
377
381
  pullRequestTitlePattern: this.groupPullRequestTitlePattern,
378
- }));
382
+ };
383
+ // Find the first repositoryConfig item that has a set value
384
+ // for the options that can be passed to the merge plugin
385
+ for (const path in this.repositoryConfig) {
386
+ const config = this.repositoryConfig[path];
387
+ if ('pullRequestHeader' in config &&
388
+ !('pullRequestHeader' in mergeOptions)) {
389
+ mergeOptions.pullRequestHeader = config.pullRequestHeader;
390
+ }
391
+ if ('pullRequestFooter' in config &&
392
+ !('pullRequestFooter' in mergeOptions)) {
393
+ mergeOptions.pullRequestFooter = config.pullRequestFooter;
394
+ }
395
+ }
396
+ this.plugins.push(new merge_1.Merge(this.github, this.targetBranch, this.repositoryConfig, mergeOptions));
379
397
  }
380
398
  for (const plugin of this.plugins) {
381
399
  this.logger.debug(`running plugin: ${plugin.constructor.name}`);
@@ -1,7 +1,7 @@
1
1
  import { ManifestPlugin } from '../plugin';
2
2
  import { CandidateReleasePullRequest, RepositoryConfig } from '../manifest';
3
3
  import { GitHub } from '../github';
4
- interface MergeOptions {
4
+ export interface MergeOptions {
5
5
  pullRequestTitlePattern?: string;
6
6
  pullRequestHeader?: string;
7
7
  pullRequestFooter?: string;
@@ -23,4 +23,3 @@ export declare class Merge extends ManifestPlugin {
23
23
  constructor(github: GitHub, targetBranch: string, repositoryConfig: RepositoryConfig, options?: MergeOptions);
24
24
  run(candidates: CandidateReleasePullRequest[]): Promise<CandidateReleasePullRequest[]>;
25
25
  }
26
- export {};
@@ -14,6 +14,7 @@ interface Package {
14
14
  }
15
15
  interface NodeWorkspaceOptions extends WorkspacePluginOptions {
16
16
  alwaysLinkLocal?: boolean;
17
+ updatePeerDependencies?: boolean;
17
18
  }
18
19
  /**
19
20
  * The plugin analyzed a cargo workspace and will bump dependencies
@@ -24,6 +25,7 @@ interface NodeWorkspaceOptions extends WorkspacePluginOptions {
24
25
  */
25
26
  export declare class NodeWorkspace extends WorkspacePlugin<Package> {
26
27
  private alwaysLinkLocal;
28
+ readonly updatePeerDependencies: boolean;
27
29
  constructor(github: GitHub, targetBranch: string, repositoryConfig: RepositoryConfig, options?: NodeWorkspaceOptions);
28
30
  protected buildAllPackages(candidates: CandidateReleasePullRequest[]): Promise<{
29
31
  allPackages: Package[];
@@ -34,6 +34,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
34
34
  constructor(github, targetBranch, repositoryConfig, options = {}) {
35
35
  super(github, targetBranch, repositoryConfig, options);
36
36
  this.alwaysLinkLocal = options.alwaysLinkLocal === false ? false : true;
37
+ this.updatePeerDependencies = options.updatePeerDependencies === true;
37
38
  }
38
39
  async buildAllPackages(candidates) {
39
40
  var _a;
@@ -219,11 +220,14 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
219
220
  return pkg.path;
220
221
  }
221
222
  combineDeps(packageJson) {
222
- var _a, _b, _c;
223
+ var _a, _b, _c, _d;
223
224
  return {
224
225
  ...((_a = packageJson.dependencies) !== null && _a !== void 0 ? _a : {}),
225
226
  ...((_b = packageJson.devDependencies) !== null && _b !== void 0 ? _b : {}),
226
227
  ...((_c = packageJson.optionalDependencies) !== null && _c !== void 0 ? _c : {}),
228
+ ...(this.updatePeerDependencies
229
+ ? (_d = packageJson.peerDependencies) !== null && _d !== void 0 ? _d : {}
230
+ : {}),
227
231
  };
228
232
  }
229
233
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "16.4.0",
3
+ "version": "16.4.1",
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",
@@ -300,7 +300,31 @@
300
300
  "type": "string",
301
301
  "enum": [
302
302
  "cargo-workspace",
303
- "maven-workspace",
303
+ "maven-workspace"
304
+ ]
305
+ },
306
+ "updateAllPackages": {
307
+ "description": "Whether to force updating all packages regardless of the dependency tree. Defaults to `false`.",
308
+ "type": "boolean"
309
+ },
310
+ "merge": {
311
+ "description": "Whether to merge in-scope pull requests into a combined release pull request. Defaults to `true`.",
312
+ "type": "boolean"
313
+ },
314
+ "considerAllArtifacts": {
315
+ "description": "Whether to analyze all packages in the workspace for cross-component version bumping. This currently only works for the maven-workspace plugin. Defaults to `true`.",
316
+ "type": "boolean"
317
+ }
318
+ }
319
+ },
320
+ {
321
+ "description": "Configuration for various `workspace` plugins.",
322
+ "type": "object",
323
+ "properties": {
324
+ "type": {
325
+ "description": "The name of the plugin.",
326
+ "type": "string",
327
+ "enum": [
304
328
  "node-workspace"
305
329
  ]
306
330
  },
@@ -315,6 +339,10 @@
315
339
  "considerAllArtifacts": {
316
340
  "description": "Whether to analyze all packages in the workspace for cross-component version bumping. This currently only works for the maven-workspace plugin. Defaults to `true`.",
317
341
  "type": "boolean"
342
+ },
343
+ "updatePeerDependencies": {
344
+ "description": "Also bump peer dependency versions if they are modified. Defaults to `false`.",
345
+ "type": "boolean"
318
346
  }
319
347
  }
320
348
  },