release-please 15.13.0 → 16.0.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 CHANGED
@@ -4,6 +4,28 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/release-please?activeTab=versions
6
6
 
7
+ ## [16.0.0](https://github.com/googleapis/release-please/compare/v15.13.0...v16.0.0) (2023-09-18)
8
+
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+
12
+ * require node 18+ ([#2069](https://github.com/googleapis/release-please/issues/2069))
13
+
14
+ ### Features
15
+
16
+ * Fallback to root package version if package ignores github release ([#1935](https://github.com/googleapis/release-please/issues/1935)) ([0e11d4c](https://github.com/googleapis/release-please/commit/0e11d4c019f1e33cd713a237e037f31397d5371a))
17
+ * Require node 18+ ([#2069](https://github.com/googleapis/release-please/issues/2069)) ([5a50247](https://github.com/googleapis/release-please/commit/5a5024727b93d0ba557b6f7ee5c6c1bab8d723d6))
18
+ * Support pnpm workspaces ([#2058](https://github.com/googleapis/release-please/issues/2058)) ([13cba14](https://github.com/googleapis/release-please/commit/13cba14225cb836c74199d726a996f83122fab07))
19
+ * Use default updaters based on file extension ([#2072](https://github.com/googleapis/release-please/issues/2072)) ([1ee162b](https://github.com/googleapis/release-please/commit/1ee162b3344e986afd09275f6762624e4a49faae))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **deps:** Bump semver dependency version ([#2068](https://github.com/googleapis/release-please/issues/2068)) ([cd0bd85](https://github.com/googleapis/release-please/commit/cd0bd853ac23087e5d5348c22f032fe0e533451d))
25
+ * **deps:** Replace lerna dependency with lerna-lite ([13cba14](https://github.com/googleapis/release-please/commit/13cba14225cb836c74199d726a996f83122fab07))
26
+ * **deps:** Upgrade http-proxy-agent to v7 ([#2071](https://github.com/googleapis/release-please/issues/2071)) ([cc50a34](https://github.com/googleapis/release-please/commit/cc50a34dee16115c07e574b05552678108f9e0c3))
27
+ * **deps:** Upgrade https-proxy-agent to v7 ([cc50a34](https://github.com/googleapis/release-please/commit/cc50a34dee16115c07e574b05552678108f9e0c3))
28
+
7
29
  ## [15.13.0](https://github.com/googleapis/release-please/compare/v15.12.0...v15.13.0) (2023-08-18)
8
30
 
9
31
 
package/README.md CHANGED
@@ -139,7 +139,7 @@ recommend using squash-merge instead](#linear-git-commit-history-use-squash-merg
139
139
 
140
140
  ## Release Please bot does not create a release PR. Why?
141
141
 
142
- ### Releasable Units
142
+ ### Step 1: Ensure releasable units are merged
143
143
 
144
144
  Release Please creates a release pull request after it notices the default branch
145
145
  contains "releasable units" since the last release.
@@ -150,15 +150,15 @@ prefixes: "feat", "fix", and "deps".
150
150
  Some languages have their specific releasable unit configuration. For example,
151
151
  "docs" is a prefix for releasable units in Java and Python.
152
152
 
153
- ### Re-run Release Please
153
+ ### Step 2: Ensure no `autorelease: pending` or `autorelease: triggered` label in an old PR
154
154
 
155
- If you think Release Please missed creating a release PR after a pull request
156
- with a releasable unit has been merged, please re-run `release-please`. If you are using
157
- the GitHub application, add `release-please:force-run` label to the merged pull request. If
158
- you are using the action, look for the failed invocation and retry the workflow run.
159
- Release Please will process the pull request immediately to find releasable units.
160
-
161
- ### Existing Pull Requests with "autorelease: pending" label
155
+ Check existing pull requests labelled with `autorelease: pending` or
156
+ `autorelease: triggered` label.
157
+ Due to GitHub API failures, it's possible that the tag was not removed
158
+ correctly upon a previous release and Release Please thinks that the previous release is
159
+ still pending.
160
+ If you're certain that there's no pending release, remove the
161
+ `autorelease: pending` or `autorelease: triggered` label.
162
162
 
163
163
  For the GitHub application users, Release Please will not create a new pull request
164
164
  if there's an existing pull request labeled as `autorelease: pending`.
@@ -168,6 +168,14 @@ If you find a release pull request with the label and it is not going to be rele
168
168
  (or already released), then remove the `autorelease: pending` label and re-run Release
169
169
  Please.
170
170
 
171
+ ### Step 3: Rerun Release Please
172
+
173
+ If you think Release Please missed creating a release PR after a pull request
174
+ with a releasable unit has been merged, please re-run `release-please`. If you are using
175
+ the GitHub application, add `release-please:force-run` label to the merged pull request. If
176
+ you are using the action, look for the failed invocation and retry the workflow run.
177
+ Release Please will process the pull request immediately to find releasable units.
178
+
171
179
  ## Strategy (Language) types supported
172
180
 
173
181
  Release Please automates releases for the following flavors of repositories:
@@ -11,6 +11,8 @@ import { Update } from './update';
11
11
  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
+ import { HttpsProxyAgent } from 'https-proxy-agent';
15
+ import { HttpProxyAgent } from 'http-proxy-agent';
14
16
  import { PullRequestOverflowHandler } from './util/pull-request-overflow-handler';
15
17
  type RequestBuilderType = typeof request;
16
18
  type DefaultFunctionType = RequestBuilderType['defaults'];
@@ -87,7 +89,7 @@ export declare class GitHub {
87
89
  private fileCache;
88
90
  private logger;
89
91
  private constructor();
90
- static createDefaultAgent(baseUrl: string, defaultProxy?: ProxyOption): import("https-proxy-agent/dist/agent").default | import("http-proxy-agent/dist/agent").default | undefined;
92
+ static createDefaultAgent(baseUrl: string, defaultProxy?: ProxyOption): HttpProxyAgent<`http://${string}:${number}`> | HttpsProxyAgent<`https://${string}:${number}`> | undefined;
91
93
  /**
92
94
  * Build a new GitHub client with auto-detected default branch.
93
95
  *
@@ -369,15 +369,12 @@ class GitHub {
369
369
  return undefined;
370
370
  }
371
371
  const { host, port } = defaultProxy;
372
- return new URL(baseUrl).protocol.replace(':', '') === 'http'
373
- ? new http_proxy_agent_1.HttpProxyAgent({
374
- host,
375
- port,
376
- })
377
- : new https_proxy_agent_1.HttpsProxyAgent({
378
- host,
379
- port,
380
- });
372
+ if (new URL(baseUrl).protocol.replace(':', '') === 'http') {
373
+ return new http_proxy_agent_1.HttpProxyAgent(`http://${host}:${port}`);
374
+ }
375
+ else {
376
+ return new https_proxy_agent_1.HttpsProxyAgent(`https://${host}:${port}`);
377
+ }
381
378
  }
382
379
  /**
383
380
  * Build a new GitHub client with auto-detected default branch.
@@ -405,6 +405,24 @@ class Manifest {
405
405
  notes: '',
406
406
  };
407
407
  }
408
+ else {
409
+ if (strategiesByPath[exports.ROOT_PROJECT_PATH] &&
410
+ this.repositoryConfig[path].skipGithubRelease) {
411
+ this.logger.debug('could not find release, checking root package');
412
+ const rootComponent = await strategiesByPath[exports.ROOT_PROJECT_PATH].getComponent();
413
+ const rootTag = new tag_name_1.TagName(expectedVersion, rootComponent, this.repositoryConfig[exports.ROOT_PROJECT_PATH].tagSeparator, this.repositoryConfig[exports.ROOT_PROJECT_PATH].includeVInTag);
414
+ const foundTag = allTags[rootTag.toString()];
415
+ if (foundTag) {
416
+ this.logger.debug(`found rootTag: ${foundTag.name} ${foundTag.sha}`);
417
+ releasesByPath[path] = {
418
+ name: foundTag.name,
419
+ tag: rootTag,
420
+ sha: foundTag.sha,
421
+ notes: '',
422
+ };
423
+ }
424
+ }
425
+ }
408
426
  }
409
427
  return releasesByPath;
410
428
  }
@@ -1,4 +1,4 @@
1
- import { Package as LernaPackage, RawManifest as PackageJson } from '@lerna/package';
1
+ import { Package as LernaPackage, RawManifest as PackageJson } from '@lerna-lite/core';
2
2
  import { GitHub } from '../github';
3
3
  import { CandidateReleasePullRequest, RepositoryConfig } from '../manifest';
4
4
  import { Version, VersionsMap } from '../version';
@@ -14,8 +14,8 @@
14
14
  // limitations under the License.
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.NodeWorkspace = void 0;
17
- const package_graph_1 = require("@lerna/package-graph");
18
- const package_1 = require("@lerna/package");
17
+ const core_1 = require("@lerna-lite/core");
18
+ const core_2 = require("@lerna-lite/core");
19
19
  const version_1 = require("../version");
20
20
  const raw_content_1 = require("../updaters/raw-content");
21
21
  const pull_request_title_1 = require("../util/pull-request-title");
@@ -25,7 +25,7 @@ const json_stringify_1 = require("../util/json-stringify");
25
25
  const changelog_1 = require("../updaters/changelog");
26
26
  const workspace_1 = require("./workspace");
27
27
  const versioning_strategy_1 = require("../versioning-strategy");
28
- class Package extends package_1.Package {
28
+ class Package extends core_2.Package {
29
29
  constructor(rawContent, location, pkg) {
30
30
  super(pkg !== null && pkg !== void 0 ? pkg : JSON.parse(rawContent), location);
31
31
  this.rawContent = rawContent;
@@ -83,7 +83,7 @@ class NodeWorkspace extends workspace_1.WorkspacePlugin {
83
83
  }
84
84
  }
85
85
  const allPackages = Array.from(packagesByPath.values());
86
- this.packageGraph = new package_graph_1.PackageGraph(allPackages, 'allDependencies', this.alwaysLinkLocal);
86
+ this.packageGraph = new core_1.PackageGraph(allPackages, 'allDependencies', this.alwaysLinkLocal);
87
87
  return {
88
88
  allPackages,
89
89
  candidatesByPackage,
@@ -249,6 +249,36 @@ class BaseStrategy {
249
249
  }
250
250
  }
251
251
  }
252
+ else if (extraFile.endsWith('.json')) {
253
+ extraFileUpdates.push({
254
+ path: this.addPath(extraFile),
255
+ createIfMissing: false,
256
+ updater: new composite_1.CompositeUpdater(new generic_json_1.GenericJson('$.version', version), new generic_1.Generic({ version, versionsMap })),
257
+ });
258
+ }
259
+ else if (extraFile.endsWith('.yaml') || extraFile.endsWith('.yml')) {
260
+ extraFileUpdates.push({
261
+ path: this.addPath(extraFile),
262
+ createIfMissing: false,
263
+ updater: new composite_1.CompositeUpdater(new generic_yaml_1.GenericYaml('$.version', version), new generic_1.Generic({ version, versionsMap })),
264
+ });
265
+ }
266
+ else if (extraFile.endsWith('.toml')) {
267
+ extraFileUpdates.push({
268
+ path: this.addPath(extraFile),
269
+ createIfMissing: false,
270
+ updater: new composite_1.CompositeUpdater(new generic_toml_1.GenericToml('$.version', version), new generic_1.Generic({ version, versionsMap })),
271
+ });
272
+ }
273
+ else if (extraFile.endsWith('.xml')) {
274
+ extraFileUpdates.push({
275
+ path: this.addPath(extraFile),
276
+ createIfMissing: false,
277
+ updater: new composite_1.CompositeUpdater(
278
+ // Updates "version" element that is a child of the root element.
279
+ new generic_xml_1.GenericXml('/*/version', version), new generic_1.Generic({ version, versionsMap })),
280
+ });
281
+ }
252
282
  else {
253
283
  extraFileUpdates.push({
254
284
  path: this.addPath(extraFile),
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "release-please",
3
- "version": "15.13.0",
3
+ "version": "16.0.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",
7
7
  "scripts": {
8
- "test": "cross-env ENVIRONMENT=test LC_ALL=en c8 mocha --recursive --timeout=5000 build/test",
8
+ "test": "cross-env ENVIRONMENT=test LC_ALL=en c8 mocha --node-option no-experimental-fetch --recursive --timeout=5000 build/test",
9
9
  "docs": "echo add docs tests",
10
10
  "test:snap": "SNAPSHOT_UPDATE=1 LC_ALL=en npm test",
11
11
  "clean": "gts clean",
@@ -42,14 +42,12 @@
42
42
  "@types/chai": "^4.1.7",
43
43
  "@types/diff": "^5.0.2",
44
44
  "@types/iarna__toml": "^2.0.1",
45
+ "@types/inquirer": "^9.0.3",
45
46
  "@types/js-yaml": "^4.0.0",
46
47
  "@types/jsonpath": "^0.2.0",
47
- "@types/lerna__collect-updates": "^5.1.0",
48
- "@types/lerna__package": "^5.1.0",
49
- "@types/lerna__package-graph": "^5.1.0",
50
- "@types/lerna__run-topologically": "^5.1.0",
51
48
  "@types/mocha": "^9.0.0",
52
49
  "@types/node": "^18.0.0",
50
+ "@types/npmlog": "^4.1.4",
53
51
  "@types/pino": "^7.0.0",
54
52
  "@types/semver": "^7.0.0",
55
53
  "@types/sinon": "^10.0.0",
@@ -59,21 +57,19 @@
59
57
  "ajv-formats": "^2.1.1",
60
58
  "c8": "^8.0.0",
61
59
  "chai": "^4.2.0",
60
+ "config-chain": "^1.1.13",
62
61
  "cross-env": "^7.0.0",
63
62
  "gts": "^3.1.0",
64
63
  "mocha": "^9.2.2",
65
64
  "nock": "^13.0.0",
66
- "sinon": "15.2.0",
65
+ "sinon": "16.0.0",
67
66
  "snap-shot-it": "^7.0.0"
68
67
  },
69
68
  "dependencies": {
70
69
  "@conventional-commits/parser": "^0.4.1",
71
70
  "@google-automations/git-file-utils": "^1.2.5",
72
71
  "@iarna/toml": "^3.0.0",
73
- "@lerna/collect-updates": "^6.4.1",
74
- "@lerna/package": "^6.4.1",
75
- "@lerna/package-graph": "^6.4.1",
76
- "@lerna/run-topologically": "^6.4.1",
72
+ "@lerna-lite/core": "1.17.0",
77
73
  "@octokit/graphql": "^5.0.0",
78
74
  "@octokit/request": "^6.0.0",
79
75
  "@octokit/request-error": "^3.0.0",
@@ -88,13 +84,13 @@
88
84
  "detect-indent": "^6.1.0",
89
85
  "diff": "^5.0.0",
90
86
  "figures": "^3.0.0",
91
- "http-proxy-agent": "^5.0.0",
92
- "https-proxy-agent": "^5.0.1",
87
+ "http-proxy-agent": "^7.0.0",
88
+ "https-proxy-agent": "^7.0.0",
93
89
  "js-yaml": "^4.0.0",
94
90
  "jsonpath": "^1.1.1",
95
91
  "node-html-parser": "^6.0.0",
96
92
  "parse-github-repo-url": "^1.4.1",
97
- "semver": "^7.0.0",
93
+ "semver": "^7.5.3",
98
94
  "type-fest": "^3.0.0",
99
95
  "typescript": "^4.6.4",
100
96
  "unist-util-visit": "^2.0.3",
@@ -104,6 +100,6 @@
104
100
  "yargs": "^17.0.0"
105
101
  },
106
102
  "engines": {
107
- "node": ">=14.0.0"
103
+ "node": ">=18.0.0"
108
104
  }
109
105
  }