bitbucket-repository-provider 4.1.26 → 4.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitbucket-repository-provider",
3
- "version": "4.1.26",
3
+ "version": "4.2.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,18 +30,18 @@
30
30
  "lint:docs": "documentation lint ./src/**/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "content-entry": "^5.0.1",
34
- "fetch-rate-limit-util": "^2.10.3",
33
+ "content-entry": "^5.0.2",
34
+ "fetch-rate-limit-util": "^3.0.4",
35
35
  "matching-iterator": "^2.0.4",
36
36
  "node-fetch": "^3.2.4",
37
37
  "one-time-execution-method": "^3.0.1",
38
- "repository-provider": "^31.1.1"
38
+ "repository-provider": "^31.2.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "ava": "^4.2.0",
42
42
  "c8": "^7.11.3",
43
43
  "documentation": "^13.2.5",
44
- "repository-provider-test-support": "^2.1.25",
44
+ "repository-provider-test-support": "^2.1.27",
45
45
  "semantic-release": "^19.0.2"
46
46
  },
47
47
  "engines": {
@@ -177,7 +177,7 @@ export class BitbucketProvider extends MultiGroupProvider {
177
177
  } catch {}
178
178
  }
179
179
 
180
- fetch(url, options = {}, responseHandler, actions) {
180
+ fetch(url, options = {}) {
181
181
  let authorization;
182
182
 
183
183
  if (this.authentication.username) {
@@ -203,28 +203,24 @@ export class BitbucketProvider extends MultiGroupProvider {
203
203
  headers["Content-Type"] = "application/json";
204
204
  }
205
205
 
206
+ options.reporter = (url, ...args) => this.trace(url.toString(), ...args);
207
+
206
208
  return stateActionHandler(
207
209
  fetch,
208
210
  new URL(url, this.api),
209
211
  {
210
212
  ...options,
211
213
  headers
212
- },
213
- responseHandler,
214
- actions,
215
- (url, ...args) => this.trace(url.toString(), ...args)
214
+ }
216
215
  );
217
216
  }
218
217
 
219
- fetchJSON(url, options, actions) {
220
- return this.fetch(
221
- url,
222
- options,
223
- async response => {
224
- return { response, json: await response.json() };
225
- },
226
- actions
227
- );
218
+ fetchJSON(url, options = {}) {
219
+ options.postprocess = async response => {
220
+ return { response, json: await response.json() };
221
+ };
222
+
223
+ return this.fetch(url, options);
228
224
  }
229
225
  }
230
226