File tree Expand file tree Collapse file tree 10 files changed +31
-1074
lines changed
payment-processor/src/payment Expand file tree Collapse file tree 10 files changed +31
-1074
lines changed Original file line number Diff line number Diff line change 1
1
/** @type {import('jest').Config } */
2
2
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)/)' ] ,
5
5
reporters : [
6
6
'default' ,
7
7
[
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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
-
6
1
const jestCommonConfig = require ( '../../jest.config' ) ;
7
2
8
3
/** @type {import('jest').Config } */
9
4
module . exports = {
10
5
...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
- } ,
25
6
} ;
Original file line number Diff line number Diff line change 41
41
"test:lit" : " jest test/lit-protocol.test.ts --forceExit"
42
42
},
43
43
"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" ,
49
44
"@lit-protocol/lit-node-client" : " 7.0.5" ,
50
45
"@requestnetwork/advanced-logic" : " 0.54.0" ,
51
46
"@requestnetwork/currency" : " 0.28.0" ,
66
61
"@requestnetwork/web3-signature" : " 0.9.0" ,
67
62
"@types/jest" : " 29.5.6" ,
68
63
"@types/node" : " 18.11.9" ,
69
- "babel-jest" : " 29.7.0" ,
70
64
"ethers" : " 5.7.2" ,
71
65
"jest" : " 29.5.0" ,
72
66
"jest-junit" : " 16.0.0" ,
Original file line number Diff line number Diff line change 47
47
"@requestnetwork/utils" : " 0.54.0" ,
48
48
"ethers" : " 5.7.2" ,
49
49
"graphql" : " 16.8.1" ,
50
- "graphql-request" : " 6 .1.0 " ,
50
+ "graphql-request" : " 7 .1.2 " ,
51
51
"graphql-tag" : " 2.12.6" ,
52
52
"satoshi-bitcoin" : " 1.0.4" ,
53
53
"tslib" : " 2.8.1"
54
54
},
55
55
"devDependencies" : {
56
- "@babel/helper-get-function-arity" : " 7.16.7" ,
57
56
"@graphql-codegen/cli" : " 4.0.1" ,
58
57
"@graphql-codegen/typescript" : " 4.0.1" ,
59
58
"@graphql-codegen/typescript-document-nodes" : " 4.0.1" ,
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ export class UnsupportedCurrencyNetwork extends Error {
28
28
* Utility to get the default window.ethereum provider, or throws an error.
29
29
*/
30
30
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 ) ;
33
33
}
34
34
throw new Error ( 'ethereum not found, you must pass your own web3 provider' ) ;
35
35
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,18 +3,4 @@ const jestCommonConfig = require('../../jest.config');
3
3
/** @type {import('jest').Config } */
4
4
module . exports = {
5
5
...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
- } ,
20
6
} ;
Original file line number Diff line number Diff line change 60
60
"ethers" : " 5.7.2" ,
61
61
"express" : " 4.21.0" ,
62
62
"graphql" : " 16.8.1" ,
63
- "graphql-request" : " 6 .1.0 " ,
63
+ "graphql-request" : " 7 .1.2 " ,
64
64
"http-shutdown" : " 1.2.2" ,
65
65
"http-status-codes" : " 2.1.4" ,
66
66
"morgan" : " 1.10.0" ,
69
69
"yargs" : " 17.6.2"
70
70
},
71
71
"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" ,
77
72
"@types/cors" : " 2.8.9" ,
78
73
"@types/express" : " 4.17.17" ,
79
74
"@types/jest" : " 29.5.6" ,
80
75
"@types/morgan" : " 1.9.9" ,
81
76
"@types/node" : " 18.11.9" ,
82
77
"@types/supertest" : " 2.0.10" ,
83
78
"@types/yargs" : " 17.0.14" ,
84
- "babel-jest" : " 29.7.0" ,
85
79
"jest" : " 29.5.0" ,
86
80
"jest-junit" : " 16.0.0" ,
87
81
"msw" : " 2.0.6" ,
You can’t perform that action at this time.
0 commit comments