Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade typescript and jest #1217

Merged
merged 5 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"prettier": "2.8.6",
"prettier-plugin-solidity": "1.0.0-beta.19",
"remap-istanbul": "0.13.0",
"typescript": "4.9.5"
"typescript": "5.1.3"
}
}
8 changes: 4 additions & 4 deletions packages/advanced-logic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"@types/node": "16.11.7",
"jest": "26.4.2",
"jest": "29.5.0",
"nyc": "15.1.0",
"shx": "0.3.2",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.1.3"
},
"gitHead": "6155223cfce769e48ccae480c510b35b4f54b4d0"
}
8 changes: 4 additions & 4 deletions packages/currency/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"@types/multicoin-address-validator": "0.5.0",
"@types/node-dijkstra": "2.5.2",
"ethers": "5.5.1",
"jest": "26.4.2",
"jest": "29.5.0",
"prettier": "2.1.1",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.1.3"
}
}
2 changes: 1 addition & 1 deletion packages/currency/scripts/addErc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const handler = async ({ address, network, skipUpgrade }: IOptions) => {
);
};

yargs(process.argv.slice(2)).command<IOptions>(
void yargs(process.argv.slice(2)).command<IOptions>(
'$0 [address]',
'Fetch info about the desired ERC20 token, for the given network',
(builder) => {
Expand Down
8 changes: 4 additions & 4 deletions packages/data-access/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"@types/node": "16.11.7",
"jest": "26.4.2",
"jest": "29.5.0",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.1.3"
},
"gitHead": "6155223cfce769e48ccae480c510b35b4f54b4d0"
}
2 changes: 1 addition & 1 deletion packages/data-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"rimraf": "3.0.2",
"shx": "0.3.2",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.1.3"
},
"gitHead": "6155223cfce769e48ccae480c510b35b4f54b4d0"
}
8 changes: 4 additions & 4 deletions packages/epk-decryption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"amd-loader": "0.0.8",
"crypto-browserify": "3.12.0",
"duplicate-package-checker-webpack-plugin": "3.0.0",
"jest": "26.4.2",
"jest": "29.5.0",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"stream-browserify": "3.0.0",
"terser-webpack-plugin": "4.2.3",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-loader": "8.4.0",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "5.1.3",
"webpack": "5.88.2",
"webpack-bundle-analyzer": "4.2.0",
"webpack-cli": "3.3.12"
Expand Down
8 changes: 4 additions & 4 deletions packages/epk-signature/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"amd-loader": "0.0.8",
"crypto-browserify": "3.12.0",
"duplicate-package-checker-webpack-plugin": "3.0.0",
"jest": "26.4.2",
"jest": "29.5.0",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"stream-browserify": "3.0.0",
"terser-webpack-plugin": "4.2.3",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-loader": "8.4.0",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "5.1.3",
"webpack": "5.88.2",
"webpack-bundle-analyzer": "4.2.0",
"webpack-cli": "3.3.12"
Expand Down
8 changes: 4 additions & 4 deletions packages/ethereum-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@
"yargs": "17.6.2"
},
"devDependencies": {
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"@types/node": "16.11.7",
"axios-mock-adapter": "1.19.0",
"jest": "26.4.2",
"jest": "29.5.0",
"nyc": "15.1.0",
"shx": "0.3.2",
"solium": "1.2.5",
"source-map-support": "0.5.19",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "5.1.3",
"web3-providers-http": "1.3.6"
},
"gitHead": "6155223cfce769e48ccae480c510b35b4f54b4d0"
Expand Down
2 changes: 1 addition & 1 deletion packages/ethereum-storage/test/ethereum-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Ethereum Utils', () => {
});

it(`should throw if the storage network is not supported`, async () => {
expect(() => getEthereumStorageNetworkNameFromId(2000)).toThrowError(
expect(() => getEthereumStorageNetworkNameFromId(2000 as any)).toThrowError(
'Unsupported storage chain: 2000',
);
});
Expand Down
8 changes: 4 additions & 4 deletions packages/integration-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
"@requestnetwork/transaction-manager": "0.28.0",
"@requestnetwork/types": "0.37.0",
"@requestnetwork/utils": "0.37.0",
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"@types/node": "16.11.7",
"ethers": "5.5.1",
"jest": "26.4.2",
"jest": "29.5.0",
"npm-run-all": "4.1.5",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"tslib": "2.5.0",
"typescript": "4.9.5"
"typescript": "5.1.3"
}
}
8 changes: 4 additions & 4 deletions packages/multi-format/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"jest": "26.4.2",
"@types/jest": "29.5.6",
"jest": "29.5.0",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.1.3"
}
}
8 changes: 4 additions & 4 deletions packages/payment-detection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@
"@graphql-codegen/typescript-resolvers": "1.19.2",
"@jridgewell/gen-mapping": "0.3.2",
"@requestnetwork/advanced-logic": "0.36.0",
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"@types/lodash": "4.14.161",
"jest": "26.4.2",
"jest": "29.5.0",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.9.5"
"typescript": "5.1.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import {
import { CurrencyManager } from '@requestnetwork/currency';
import { ERC20__factory } from '@requestnetwork/smart-contracts/types';
import { AnyToERC20PaymentDetector, getTheGraphClient } from '../../src';
import { mocked } from 'ts-jest/utils';
import { mockAdvancedLogicBase } from '../utils';

jest.mock('../../src/thegraph/client');
const theGraphClientMock = mocked(getTheGraphClient(''));
const theGraphClientMock = jest.mocked(getTheGraphClient(''));

let anyToErc20Proxy: AnyToERC20PaymentDetector;
const currencyManager = CurrencyManager.getDefault();
Expand Down
3 changes: 1 addition & 2 deletions packages/payment-detection/test/any/any-to-eth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { ExtensionTypes, IdentityTypes, RequestLogicTypes } from '@requestnetwor
import { StaticJsonRpcProvider } from '@ethersproject/providers';
import { AnyToEthFeeProxyPaymentDetector } from '../../src/any';
import { getTheGraphClient } from '../../src/thegraph';
import { mocked } from 'ts-jest/utils';

const getLogs = jest.spyOn(StaticJsonRpcProvider.prototype, 'getLogs');

jest.mock('../../src/thegraph/client');
const theGraphClientMock = mocked(getTheGraphClient(''));
const theGraphClientMock = jest.mocked(getTheGraphClient(''));
describe('Any to ETH payment detection', () => {
const mockRequest: RequestLogicTypes.IRequest = {
creator: { type: IdentityTypes.TYPE.ETHEREUM_ADDRESS, value: '0x2' },
Expand Down
3 changes: 1 addition & 2 deletions packages/payment-detection/test/erc20/proxy-contract.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { mocked } from 'ts-jest/utils';
import {
AdvancedLogicTypes,
ExtensionTypes,
Expand All @@ -19,7 +18,7 @@ const createAddPaymentInstructionAction = jest.fn();
const createAddRefundInstructionAction = jest.fn();

jest.mock('../../src/thegraph/client');
const theGraphClientMock = mocked(getTheGraphClient(''));
const theGraphClientMock = jest.mocked(getTheGraphClient(''));
const mockAdvancedLogic: AdvancedLogicTypes.IAdvancedLogic = {
...mockAdvancedLogicBase,
extensions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import { SuperFluidInfoRetriever } from '../../src/erc777/superfluid-retriever';
import PaymentReferenceCalculator from '../../src/payment-reference-calculator';
import { PaymentTypes } from '@requestnetwork/types';
import { GraphQLClient } from 'graphql-request';
import { mocked } from 'ts-jest/utils';
import { mockSuperfluidSubgraph } from './mocks';

jest.mock('graphql-request');
const graphql = mocked(GraphQLClient.prototype);
const graphql = jest.mocked(GraphQLClient.prototype);
const fDAIxTokenRinkeby = '0x745861aed1eee363b4aaa5f1994be40b1e05ff90';
const fUSDCxTokenRinkeby = '0x0f1d7c55a2b133e000ea10eec03c774e0d6796e8';
const fDAIxTokenGoerli = '0x2bf02814ea0b2b155ed47b7cede18caa752940e6';
Expand Down
3 changes: 1 addition & 2 deletions packages/payment-detection/test/eth/input-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { mocked } from 'ts-jest/utils';
import { CurrencyManager } from '@requestnetwork/currency';
import {
AdvancedLogicTypes,
Expand All @@ -11,7 +10,7 @@ import { EthInputDataPaymentDetector } from '../../src/eth/input-data';
import { mockAdvancedLogicBase } from '../utils';

jest.mock('../../src/thegraph/client');
const theGraphClientMock = mocked(getTheGraphClient(''));
const theGraphClientMock = jest.mocked(getTheGraphClient(''));

let ethInputData: EthInputDataPaymentDetector;

Expand Down
8 changes: 4 additions & 4 deletions packages/payment-processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"tslib": "2.5.0"
},
"devDependencies": {
"@types/jest": "26.0.13",
"jest": "26.4.2",
"@types/jest": "29.5.6",
"jest": "29.5.0",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"ts-jest": "26.3.0",
"typescript": "4.9.5"
"ts-jest": "29.1.0",
"typescript": "5.1.3"
}
}
8 changes: 4 additions & 4 deletions packages/request-client.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@
},
"devDependencies": {
"@compodoc/compodoc": "1.1.11",
"@types/jest": "26.0.13",
"@types/jest": "29.5.6",
"amd-loader": "0.0.8",
"axios-mock-adapter": "1.19.0",
"crypto-browserify": "3.12.0",
"duplicate-package-checker-webpack-plugin": "3.0.0",
"jest": "26.4.2",
"jest": "29.5.0",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
"shx": "0.3.2",
"source-map-support": "0.5.19",
"stream-browserify": "3.0.0",
"terser-webpack-plugin": "4.2.3",
"ts-jest": "26.3.0",
"ts-jest": "29.1.0",
"ts-loader": "8.4.0",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"typescript": "5.1.3",
"webpack": "5.88.2",
"webpack-bundle-analyzer": "4.2.0",
"webpack-cli": "3.3.12"
Expand Down
Loading