npm-update-package 0.41.1 → 0.41.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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.41.1",
3
+ "version": "0.41.2",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",
@@ -73,14 +73,21 @@ class GitHub {
73
73
  });
74
74
  return data;
75
75
  }
76
- // TODO: fetch all pull requests with page option
77
76
  async fetchPullRequests({ owner, repo }) {
78
- const { data } = await this.octokit.pulls.list({
79
- owner,
80
- repo,
81
- per_page: 100
82
- });
83
- return data;
77
+ const pullRequests = [];
78
+ for (let page = 1;; page++) {
79
+ const { data } = await this.octokit.pulls.list({
80
+ owner,
81
+ repo,
82
+ per_page: 100,
83
+ page
84
+ });
85
+ if (data.length === 0) {
86
+ break;
87
+ }
88
+ pullRequests.push(...data);
89
+ }
90
+ return pullRequests;
84
91
  }
85
92
  async fetchReleases({ owner, repo }) {
86
93
  const releases = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-update-package",
3
- "version": "0.41.1",
3
+ "version": "0.41.2",
4
4
  "description": "CLI tool for creating pull requests to update npm packages",
5
5
  "scripts": {
6
6
  "build": "tsc --project tsconfig.build.json",