release-please 14.7.0 → 14.7.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 +15 -0
- package/build/src/github.js +6 -3
- package/build/src/strategies/node.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/release-please?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [14.7.2](https://github.com/googleapis/release-please/compare/v14.7.1...v14.7.2) (2022-09-26)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* Graphql should also configure proxy agent ([#1655](https://github.com/googleapis/release-please/issues/1655)) ([c68f057](https://github.com/googleapis/release-please/commit/c68f05717148061a1f4365a2323474a72c567a08))
|
|
13
|
+
|
|
14
|
+
## [14.7.1](https://github.com/googleapis/release-please/compare/v14.7.0...v14.7.1) (2022-09-22)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* Handle pull request files returned as null ([#1651](https://github.com/googleapis/release-please/issues/1651)) ([4cea3dd](https://github.com/googleapis/release-please/commit/4cea3dd1b17ee31e27c1d246e83fcf39f28f0677))
|
|
20
|
+
* **node:** Rethrow missing file error for package.json as a configuration error ([#1652](https://github.com/googleapis/release-please/issues/1652)) ([65ee57b](https://github.com/googleapis/release-please/commit/65ee57b433f67d87db3c2530dad4207218dae6d2))
|
|
21
|
+
|
|
7
22
|
## [14.7.0](https://github.com/googleapis/release-please/compare/v14.6.1...v14.7.0) (2022-09-20)
|
|
8
23
|
|
|
9
24
|
|
package/build/src/github.js
CHANGED
|
@@ -397,6 +397,9 @@ class GitHub {
|
|
|
397
397
|
}),
|
|
398
398
|
graphql: graphql_1.graphql.defaults({
|
|
399
399
|
baseUrl: graphqlUrl,
|
|
400
|
+
request: {
|
|
401
|
+
agent: this.createDefaultAgent(graphqlUrl, options.proxy),
|
|
402
|
+
},
|
|
400
403
|
headers: {
|
|
401
404
|
'user-agent': `release-please/${releasePleaseVersion}`,
|
|
402
405
|
Authorization: `token ${options.token}`,
|
|
@@ -490,7 +493,7 @@ class GitHub {
|
|
|
490
493
|
}
|
|
491
494
|
}
|
|
492
495
|
async mergeCommitsGraphQL(targetBranch, cursor, options = {}) {
|
|
493
|
-
var _a, _b;
|
|
496
|
+
var _a, _b, _c, _d;
|
|
494
497
|
this.logger.debug(`Fetching merge commits on branch ${targetBranch} with cursor: ${cursor}`);
|
|
495
498
|
const query = `query pullRequestsSince($owner: String!, $repo: String!, $num: Int!, $maxFilesChanged: Int, $targetBranch: String!, $cursor: String) {
|
|
496
499
|
repository(owner: $owner, name: $repo) {
|
|
@@ -571,7 +574,7 @@ class GitHub {
|
|
|
571
574
|
return pr.mergeCommit && pr.mergeCommit.oid === graphCommit.sha;
|
|
572
575
|
});
|
|
573
576
|
if (pullRequest) {
|
|
574
|
-
const files = pullRequest.files.nodes.map(node => node.path);
|
|
577
|
+
const files = (((_b = pullRequest.files) === null || _b === void 0 ? void 0 : _b.nodes) || []).map(node => node.path);
|
|
575
578
|
commit.pullRequest = {
|
|
576
579
|
sha: commit.sha,
|
|
577
580
|
number: pullRequest.number,
|
|
@@ -582,7 +585,7 @@ class GitHub {
|
|
|
582
585
|
labels: pullRequest.labels.nodes.map(node => node.name),
|
|
583
586
|
files,
|
|
584
587
|
};
|
|
585
|
-
if (((
|
|
588
|
+
if (((_d = (_c = pullRequest.files) === null || _c === void 0 ? void 0 : _c.pageInfo) === null || _d === void 0 ? void 0 : _d.hasNextPage) && options.backfillFiles) {
|
|
586
589
|
this.logger.info(`PR #${pullRequest.number} has many files, backfilling`);
|
|
587
590
|
commit.files = await this.getCommitFiles(graphCommit.sha);
|
|
588
591
|
}
|
|
@@ -19,6 +19,7 @@ const package_lock_json_1 = require("../updaters/node/package-lock-json");
|
|
|
19
19
|
const samples_package_json_1 = require("../updaters/node/samples-package-json");
|
|
20
20
|
const changelog_1 = require("../updaters/changelog");
|
|
21
21
|
const package_json_1 = require("../updaters/node/package-json");
|
|
22
|
+
const errors_1 = require("../errors");
|
|
22
23
|
class Node extends base_1.BaseStrategy {
|
|
23
24
|
async buildUpdates(options) {
|
|
24
25
|
var _a;
|
|
@@ -74,7 +75,15 @@ class Node extends base_1.BaseStrategy {
|
|
|
74
75
|
}
|
|
75
76
|
async getPkgJsonContents() {
|
|
76
77
|
if (!this.pkgJsonContents) {
|
|
77
|
-
|
|
78
|
+
try {
|
|
79
|
+
this.pkgJsonContents = await this.github.getFileContentsOnBranch(this.addPath('package.json'), this.targetBranch);
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
if (e instanceof errors_1.FileNotFoundError) {
|
|
83
|
+
throw new errors_1.MissingRequiredFileError(this.addPath('package.json'), 'node', `${this.repository.owner}/${this.repository.repo}`);
|
|
84
|
+
}
|
|
85
|
+
throw e;
|
|
86
|
+
}
|
|
78
87
|
}
|
|
79
88
|
return this.pkgJsonContents;
|
|
80
89
|
}
|