Skip to content

Commit 1f4d532

Browse files
fix(graphql-request): use same version in all packages (#1623)
1 parent 0e12025 commit 1f4d532

File tree

10 files changed

+31
-1074
lines changed

10 files changed

+31
-1074
lines changed

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @type {import('jest').Config} */
22
module.exports = {
3-
preset: 'ts-jest',
4-
testEnvironment: 'node',
3+
preset: 'ts-jest/presets/js-with-ts',
4+
transformIgnorePatterns: ['/node_modules/(?!(graphql-request|@superfluid-finance/sdk-core)/)'],
55
reporters: [
66
'default',
77
[

packages/integration-test/babel.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,6 @@
1-
// The error ReferenceError: crypto is not defined occurs because the Node.js environment needs the crypto module to be explicitly available.
2-
// For Node.js versions before 19, you need to add the crypto global explicitly.
3-
const { webcrypto } = require('crypto');
4-
global.crypto = webcrypto;
5-
61
const jestCommonConfig = require('../../jest.config');
72

83
/** @type {import('jest').Config} */
94
module.exports = {
105
...jestCommonConfig,
11-
transform: {
12-
'^.+\\.(ts|tsx)$': [
13-
'ts-jest',
14-
{
15-
tsconfig: '<rootDir>/tsconfig.json',
16-
},
17-
],
18-
'^.+\\.js$': ['babel-jest', { configFile: './babel.config.js' }],
19-
},
20-
transformIgnorePatterns: ['/node_modules/(?!(graphql-request|@superfluid-finance/sdk-core)/)'],
21-
extensionsToTreatAsEsm: ['.ts', '.tsx'],
22-
moduleNameMapper: {
23-
'^(\\.{1,2}/.*)\\.js$': '$1',
24-
},
256
};

packages/integration-test/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@
4141
"test:lit": "jest test/lit-protocol.test.ts --forceExit"
4242
},
4343
"devDependencies": {
44-
"@babel/core": "7.23.9",
45-
"@babel/plugin-transform-modules-commonjs": "7.23.3",
46-
"@babel/plugin-transform-runtime": "7.23.3",
47-
"@babel/preset-env": "7.23.3",
48-
"@babel/runtime": "7.26.10",
4944
"@lit-protocol/lit-node-client": "7.0.5",
5045
"@requestnetwork/advanced-logic": "0.54.0",
5146
"@requestnetwork/currency": "0.28.0",
@@ -66,7 +61,6 @@
6661
"@requestnetwork/web3-signature": "0.9.0",
6762
"@types/jest": "29.5.6",
6863
"@types/node": "18.11.9",
69-
"babel-jest": "29.7.0",
7064
"ethers": "5.7.2",
7165
"jest": "29.5.0",
7266
"jest-junit": "16.0.0",

packages/payment-detection/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,12 @@
4747
"@requestnetwork/utils": "0.54.0",
4848
"ethers": "5.7.2",
4949
"graphql": "16.8.1",
50-
"graphql-request": "6.1.0",
50+
"graphql-request": "7.1.2",
5151
"graphql-tag": "2.12.6",
5252
"satoshi-bitcoin": "1.0.4",
5353
"tslib": "2.8.1"
5454
},
5555
"devDependencies": {
56-
"@babel/helper-get-function-arity": "7.16.7",
5756
"@graphql-codegen/cli": "4.0.1",
5857
"@graphql-codegen/typescript": "4.0.1",
5958
"@graphql-codegen/typescript-document-nodes": "4.0.1",

packages/payment-processor/src/payment/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export class UnsupportedCurrencyNetwork extends Error {
2828
* Utility to get the default window.ethereum provider, or throws an error.
2929
*/
3030
export function getProvider(): providers.Web3Provider {
31-
if (typeof window !== 'undefined' && 'ethereum' in window) {
32-
return new ethers.providers.Web3Provider((window as any).ethereum);
31+
if ('ethereum' in globalThis) {
32+
return new ethers.providers.Web3Provider((globalThis as any).ethereum);
3333
}
3434
throw new Error('ethereum not found, you must pass your own web3 provider');
3535
}

packages/request-node/babel.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/request-node/jest.config.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,4 @@ const jestCommonConfig = require('../../jest.config');
33
/** @type {import('jest').Config} */
44
module.exports = {
55
...jestCommonConfig,
6-
transform: {
7-
'^.+\\.(ts|tsx)$': [
8-
'ts-jest',
9-
{
10-
tsconfig: '<rootDir>/tsconfig.json',
11-
},
12-
],
13-
'^.+\\.js$': ['babel-jest', { configFile: './babel.config.js' }],
14-
},
15-
transformIgnorePatterns: ['/node_modules/(?!(graphql-request|@superfluid-finance/sdk-core)/)'],
16-
extensionsToTreatAsEsm: ['.ts', '.tsx'],
17-
moduleNameMapper: {
18-
'^(\\.{1,2}/.*)\\.js$': '$1',
19-
},
206
};

packages/request-node/package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"ethers": "5.7.2",
6161
"express": "4.21.0",
6262
"graphql": "16.8.1",
63-
"graphql-request": "6.1.0",
63+
"graphql-request": "7.1.2",
6464
"http-shutdown": "1.2.2",
6565
"http-status-codes": "2.1.4",
6666
"morgan": "1.10.0",
@@ -69,19 +69,13 @@
6969
"yargs": "17.6.2"
7070
},
7171
"devDependencies": {
72-
"@babel/core": "7.23.9",
73-
"@babel/plugin-transform-modules-commonjs": "7.23.3",
74-
"@babel/plugin-transform-runtime": "7.23.3",
75-
"@babel/preset-env": "7.23.3",
76-
"@babel/runtime": "7.26.10",
7772
"@types/cors": "2.8.9",
7873
"@types/express": "4.17.17",
7974
"@types/jest": "29.5.6",
8075
"@types/morgan": "1.9.9",
8176
"@types/node": "18.11.9",
8277
"@types/supertest": "2.0.10",
8378
"@types/yargs": "17.0.14",
84-
"babel-jest": "29.7.0",
8579
"jest": "29.5.0",
8680
"jest-junit": "16.0.0",
8781
"msw": "2.0.6",

0 commit comments

Comments
 (0)