release-please 13.4.11 → 13.4.14

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 CHANGED
@@ -4,6 +4,29 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ### [13.4.14](https://github.com/googleapis/release-please/compare/v13.4.13...v13.4.14) (2022-03-01)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * node-workspace plugin should update package.json versions ([#1319](https://github.com/googleapis/release-please/issues/1319)) ([e2aaacb](https://github.com/googleapis/release-please/commit/e2aaacbab59c7660abe572c5e6ce31ad666a90c5))
13
+
14
+ ### [13.4.13](https://github.com/googleapis/release-please/compare/v13.4.12...v13.4.13) (2022-02-28)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * handle failures during multiple release creation ([#1315](https://github.com/googleapis/release-please/issues/1315)) ([fc856ae](https://github.com/googleapis/release-please/commit/fc856aed1d95def38170eff6381829cd6d7d1e0b))
20
+
21
+ ### [13.4.12](https://github.com/googleapis/release-please/compare/v13.4.11...v13.4.12) (2022-02-22)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * address false-positive matches for autorelease branch naming ([#1311](https://github.com/googleapis/release-please/issues/1311)) ([c5e76dc](https://github.com/googleapis/release-please/commit/c5e76dc8202958ed5af0f3635188261b8845f561)), closes [#1310](https://github.com/googleapis/release-please/issues/1310)
27
+ * catch FileNotFound error when building changeset ([#1306](https://github.com/googleapis/release-please/issues/1306)) ([3944b17](https://github.com/googleapis/release-please/commit/3944b17f33500cecc63a1ff63db81cdbd50ce1a1))
28
+ * manifest config should allow overriding labels ([#1303](https://github.com/googleapis/release-please/issues/1303)) ([f4d0314](https://github.com/googleapis/release-please/commit/f4d0314d1a394389a233ba9e1383852f0875dcd1)), closes [#1302](https://github.com/googleapis/release-please/issues/1302)
29
+
7
30
  ### [13.4.11](https://github.com/googleapis/release-please/compare/v13.4.10...v13.4.11) (2022-02-18)
8
31
 
9
32
 
package/README.md CHANGED
@@ -109,6 +109,16 @@ END_COMMIT_OVERRIDE
109
109
  The next time release please runs, it will use that override section as the
110
110
  commit message instead of the merged commit message.
111
111
 
112
+ ## Release Please bot does not create a release PR. Why?
113
+
114
+ Release Please creates a release pull request after it sees the default branch
115
+ contains "releaseable units" since the last release.
116
+ A releasable unit is a commit to the branch with one of the following
117
+ prefixes: "feat" and "fix". (A "chore" commit is not a releasable unit.)
118
+
119
+ Some languages have their specific releasable unit configuration. For example,
120
+ "docs" is a prefix for releasable units in Java and Python.
121
+
112
122
  ## Strategy (Language) types supported
113
123
 
114
124
  Release Please automates releases for the following flavors of repositories:
@@ -883,7 +883,7 @@ class GitHub {
883
883
  content = await this.getFileContentsOnBranch(update.path, defaultBranch);
884
884
  }
885
885
  catch (err) {
886
- if (err.status !== 404)
886
+ if (!(err instanceof errors_1.FileNotFoundError))
887
887
  throw err;
888
888
  // if the file is missing and create = false, just continue
889
889
  // to the next update, otherwise create the file.
@@ -24,6 +24,7 @@ const factory_1 = require("./factory");
24
24
  const pull_request_body_1 = require("./util/pull-request-body");
25
25
  const merge_1 = require("./plugins/merge");
26
26
  const release_please_manifest_1 = require("./updaters/release-please-manifest");
27
+ const errors_1 = require("./errors");
27
28
  exports.DEFAULT_RELEASE_PLEASE_CONFIG = 'release-please-config.json';
28
29
  exports.DEFAULT_RELEASE_PLEASE_MANIFEST = '.release-please-manifest.json';
29
30
  exports.ROOT_PROJECT_PATH = '.';
@@ -525,7 +526,25 @@ class Manifest {
525
526
  for (const release of releases) {
526
527
  promises.push(this.createRelease(release));
527
528
  }
528
- const githubReleases = await Promise.all(promises);
529
+ const duplicateReleases = [];
530
+ const githubReleases = [];
531
+ for (const promise of promises) {
532
+ try {
533
+ githubReleases.push(await promise);
534
+ }
535
+ catch (err) {
536
+ if (err instanceof errors_1.DuplicateReleaseError) {
537
+ logger_1.logger.warn(`Duplicate release tag: ${err.tag}`);
538
+ duplicateReleases.push(err);
539
+ }
540
+ else {
541
+ throw err;
542
+ }
543
+ }
544
+ }
545
+ if (duplicateReleases.length > 0 && githubReleases.length === 0) {
546
+ throw duplicateReleases[0];
547
+ }
529
548
  // adjust tags on pullRequest
530
549
  await Promise.all([
531
550
  this.github.removeIssueLabels(this.labels, pullRequest.number),
@@ -629,6 +648,8 @@ async function parseConfig(github, configFile, branch) {
629
648
  for (const path in config.packages) {
630
649
  repositoryConfig[path] = mergeReleaserConfig(defaultConfig, extractReleaserConfig(config.packages[path]));
631
650
  }
651
+ const configLabel = config['label'];
652
+ const configReleaseLabel = config['release-label'];
632
653
  const manifestOptions = {
633
654
  bootstrapSha: config['bootstrap-sha'],
634
655
  lastReleaseSha: config['last-release-sha'],
@@ -636,6 +657,8 @@ async function parseConfig(github, configFile, branch) {
636
657
  separatePullRequests: config['separate-pull-requests'],
637
658
  groupPullRequestTitlePattern: config['group-pull-request-title-pattern'],
638
659
  plugins: config['plugins'],
660
+ labels: configLabel === undefined ? undefined : [configLabel],
661
+ releaseLabels: configReleaseLabel === undefined ? undefined : [configReleaseLabel],
639
662
  };
640
663
  return { config: repositoryConfig, options: manifestOptions };
641
664
  }
@@ -102,6 +102,13 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
102
102
  throw new Error(`Could not find graph package for ${pkg.name}`);
103
103
  }
104
104
  const updatedPackage = pkg.clone();
105
+ // Update version of the package
106
+ const newVersion = updatedVersions.get(updatedPackage.name);
107
+ if (newVersion) {
108
+ logger_1.logger.info(`Updating ${updatedPackage.name} to ${newVersion}`);
109
+ updatedPackage.version = newVersion.toString();
110
+ }
111
+ // Update dependency versions
105
112
  for (const [depName, resolved] of graphPackage.localDependencies) {
106
113
  const depVersion = updatedVersions.get(depName);
107
114
  if (depVersion && resolved.type !== 'directory') {
@@ -116,7 +123,10 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
116
123
  update.updater = new raw_content_1.RawContent(json_stringify_1.jsonStringify(updatedPackage.toJSON(), updatedPackage.rawContent));
117
124
  }
118
125
  else if (update.updater instanceof changelog_1.Changelog) {
119
- update.updater.changelogEntry = appendDependenciesSectionToChangelog(update.updater.changelogEntry, dependencyNotes);
126
+ if (dependencyNotes) {
127
+ update.updater.changelogEntry =
128
+ appendDependenciesSectionToChangelog(update.updater.changelogEntry, dependencyNotes);
129
+ }
120
130
  }
121
131
  return update;
122
132
  });
@@ -143,6 +153,12 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
143
153
  throw new Error(`Could not find graph package for ${pkg.name}`);
144
154
  }
145
155
  const updatedPackage = pkg.clone();
156
+ // Update version of the package
157
+ const newVersion = updatedVersions.get(updatedPackage.name);
158
+ if (newVersion) {
159
+ logger_1.logger.info(`Updating ${updatedPackage.name} to ${newVersion}`);
160
+ updatedPackage.version = newVersion.toString();
161
+ }
146
162
  for (const [depName, resolved] of graphPackage.localDependencies) {
147
163
  const depVersion = updatedVersions.get(depName);
148
164
  if (depVersion && resolved.type !== 'directory') {
@@ -173,7 +189,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
173
189
  createIfMissing: false,
174
190
  updater: new changelog_1.Changelog({
175
191
  version,
176
- changelogEntry: dependencyNotes,
192
+ changelogEntry: appendDependenciesSectionToChangelog('', dependencyNotes),
177
193
  }),
178
194
  },
179
195
  ],
@@ -82,8 +82,12 @@ exports.BranchName = BranchName;
82
82
  * @see https://github.com/googleapis/releasetool
83
83
  */
84
84
  const AUTORELEASE_PATTERN = /^release-?(?<component>[\w-.]*)?-v(?<version>[0-9].*)$/;
85
+ const RELEASE_PLEASE_BRANCH_PREFIX = 'release-please--branches';
85
86
  class AutoreleaseBranchName extends BranchName {
86
87
  static matches(branchName) {
88
+ if (branchName.startsWith(RELEASE_PLEASE_BRANCH_PREFIX)) {
89
+ return false;
90
+ }
87
91
  return !!branchName.match(AUTORELEASE_PATTERN);
88
92
  }
89
93
  constructor(branchName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "13.4.11",
3
+ "version": "13.4.14",
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",