github-repository-provider 7.23.23 → 7.23.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-repository-provider",
3
- "version": "7.23.23",
3
+ "version": "7.23.27",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,23 +30,23 @@
30
30
  "lint:docs": "documentation lint ./src/**/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "content-entry": "^2.7.0",
33
+ "content-entry": "^2.9.1",
34
34
  "fetch-link-util": "^1.0.4",
35
35
  "fetch-rate-limit-util": "^1.1.6",
36
36
  "matching-iterator": "^2.0.0",
37
- "node-fetch": "3.0.0",
37
+ "node-fetch": "3.1.0",
38
38
  "one-time-execution-method": "^2.0.9",
39
- "repository-provider": "^25.5.6"
39
+ "repository-provider": "^25.5.7"
40
40
  },
41
41
  "devDependencies": {
42
42
  "ava": "^3.15.0",
43
43
  "c8": "^7.10.0",
44
44
  "documentation": "^13.2.5",
45
- "repository-provider-test-support": "^1.6.1",
45
+ "repository-provider-test-support": "^1.7.0",
46
46
  "semantic-release": "^18.0.0"
47
47
  },
48
48
  "engines": {
49
- "node": ">=14.17.6"
49
+ "node": ">=14.18.1"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
@@ -151,11 +151,18 @@ export class GithubBranch extends Branch {
151
151
  * @param tree_sha
152
152
  */
153
153
  async tree(tree_sha) {
154
- const res = await this.provider.fetch(
155
- `repos/${this.slug}/git/trees/${tree_sha}?recursive=1`
156
- );
154
+ const url = `repos/${this.slug}/git/trees/${tree_sha}?recursive=1`;
155
+ let res;
156
+
157
+ for(const i = 0; i < 2; i++) {
158
+ res = await this.provider.fetch(url);
159
+ if(res.ok) {
160
+ break;
161
+ }
162
+ }
163
+
157
164
  const json = await res.json();
158
- return json.tree;
165
+ return json.tree;
159
166
  }
160
167
 
161
168
  async *entries(patterns) {
@@ -196,6 +203,10 @@ class LazyBufferContentEntry extends BufferContentEntryMixin(ContentEntry) {
196
203
  });
197
204
  }
198
205
 
206
+ get buffer() {
207
+ return this.getBuffer();
208
+ }
209
+
199
210
  async getBuffer() {
200
211
  if(this._buffer) { return this._buffer; }
201
212