Skip to content

Commit

Permalink
Merge pull request #307 from mollie/pimm/update-dependencies.
Browse files Browse the repository at this point in the history
* Updated the dependencies, and
* Changed some minor type-related things for compatibility with the newer versions.
  • Loading branch information
Pimm authored Dec 13, 2022
2 parents afb2154 + 9ed1659 commit af8ac8e
Show file tree
Hide file tree
Showing 5 changed files with 1,770 additions and 1,655 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,32 @@
"lint": "yarn lint:eslint:fix && yarn lint:prettier"
},
"dependencies": {
"axios": "^0.25.0"
"axios": "^0.27.2"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@mollie/eslint-config-typescript": "^1.6.5",
"@types/jest": "24.9.0",
"@types/node": "^17.0.17",
"@types/node": "^18.11.10",
"axios-mock-adapter": "1.19.0",
"babel-jest": "^27.5.1",
"commitizen": "^4.2.4",
"babel-jest": "^29.3.1",
"commitizen": "^4.2.5",
"cz-conventional-changelog": "^3.3.0",
"dotenv": "^16.0.0",
"eslint": "^8.19.0",
"dotenv": "^16.0.3",
"eslint": "^8.28.0",
"jest": "24.9.0",
"jest-bluster": "^1.0.1",
"nock": "^13.2.4",
"nock": "^13.2.9",
"nock-record": "^0.3.9",
"prettier": "^2.5.1",
"rollup": "^2.67.2",
"prettier": "^2.8.0",
"rollup": "^3.5.1",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"ruply": "^1.0.0",
"typescript": "^4.5.5"
"ruply": "^1.0.1",
"typescript": "^4.9.3"
},
"resolutions": {
"eslint-plugin-import": "^2.26.0"
Expand Down
14 changes: 7 additions & 7 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { join } from 'path';
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import babel from 'rollup-plugin-babel';
const { join } = require('path');
const json = require('rollup-plugin-json');
const resolve = require('rollup-plugin-node-resolve');
const babel = require('rollup-plugin-babel');

export default {
module.exports = {
input: join('src', 'createMollieClient.ts'),
external: [
// These Node.js interenals are external to our bundles…
'https', 'querystring', 'url', 'util',
// These Node.js internals are external to our bundles…
'crypto', 'https', 'querystring', 'url', 'util',
// …as are the dependencies listed in our package.json.
...Object.keys(require('./package.json').dependencies),
],
Expand Down
4 changes: 2 additions & 2 deletions src/communication/makeRetrying.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const attemptLimit = 3;
/**
* A set of the methods which are not idempotent by nature, specifically `POST` and `DELETE`.
*/
const unsafeMethods = new Set<Method>(['delete', 'DELETE', 'post', 'POST']);
const unsafeMethods = new Set<string>(['delete', 'DELETE', 'post', 'POST'] satisfies Array<Method>);

type AttemptState = { [attemptIndex]: number };

Expand Down Expand Up @@ -60,7 +60,7 @@ function checkError(error: any): error is AxiosError & { config: AxiosRequestCon
* @see https://httpwg.org/specs/rfc9110.html#field.retry-after
*/
function parseRetryAfterHeader(response: AxiosResponse): number | undefined {
const retryAfter = parseInt(response.headers['retry-after'], 10);
const retryAfter = parseInt(response.headers['retry-after']!, 10);
if (isNaN(retryAfter)) {
return undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/wireMockClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import createMollieClient, { MollieClient, MollieOptions } from '..';
import { AxiosInstance } from 'axios';
import MockAdapter from 'axios-mock-adapter';
import {} from 'jest-bluster';
import 'jest-bluster';

export default function wireMockClient(options?: Omit<MollieOptions, 'accessToken' | 'adapter' | 'apiKey'>): { adapter: MockAdapter; client: MollieClient } {
const adapter = new MockAdapter(undefined as unknown as AxiosInstance);
Expand Down
Loading

0 comments on commit af8ac8e

Please sign in to comment.