-
Notifications
You must be signed in to change notification settings - Fork 88
chore(typescript): change moduleResolution #1605
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
Changes from 2 commits
4ce46f3
1cc4d4d
08c1467
13fcb50
ec996e5
c210da6
1aa1232
bf4b00f
0882d51
ddd2837
4a7e963
ca74d7c
2b9a2e9
9086e84
5e58c52
5511457
ec033a9
944fd75
3dc97e4
2957d4d
2f55bf1
db0eb65
17f77bd
008fefe
6e97cbb
b43d2ca
e491985
7960f48
cd24ea8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,6 @@ | |
"ts-jest": "29.1.0", | ||
"ts-node": "10.9.1", | ||
"tslib": "2.5.0", | ||
"typescript": "5.1.3" | ||
"typescript": "5.8.3" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ | |
"@graphql-codegen/cli": "4.0.1", | ||
"@graphql-codegen/typescript": "4.0.1", | ||
"@graphql-codegen/typescript-document-nodes": "4.0.1", | ||
"@graphql-codegen/typescript-graphql-request": "6.0.1", | ||
"@graphql-codegen/typescript-graphql-request": "6.2.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixes the generated GraphQL code that previously contained |
||
"@graphql-codegen/typescript-operations": "4.0.1", | ||
"@graphql-codegen/typescript-resolvers": "4.0.1", | ||
"@jridgewell/gen-mapping": "0.3.2", | ||
|
@@ -68,6 +68,6 @@ | |
"source-map-support": "0.5.19", | ||
"ts-jest": "29.1.0", | ||
"ts-node": "10.9.1", | ||
"typescript": "5.1.3" | ||
"typescript": "5.8.3" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
import { CurrencyTypes } from '@requestnetwork/types'; | ||
import { NearChains } from '@requestnetwork/currency'; | ||
import { GraphQLClient } from 'graphql-request'; | ||
import { Block_Height, Maybe, getSdk } from './generated/graphql'; | ||
import { Block_Height, getSdk, Maybe } from './generated/graphql'; | ||
import { getSdk as getNearSdk } from './generated/graphql-near'; | ||
import { RequestConfig } from 'graphql-request/src/types'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This import is not compatible with ESM. We can't do such type of imports anymore, as |
||
|
||
const THE_GRAPH_STUDIO_URL = | ||
'https://api.studio.thegraph.com/query/67444/request-payments-$NETWORK/version/latest'; | ||
|
@@ -41,6 +40,8 @@ export type TheGraphQueryOptions = { | |
blockFilter?: Maybe<Block_Height>; | ||
}; | ||
|
||
type RequestConfig = (typeof GraphQLClient.prototype)['requestConfig']; | ||
|
||
export type TheGraphClientOptions = RequestConfig & { | ||
/** constraint to select indexers that have at least parsed this block */ | ||
minIndexedBlock?: number | undefined; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
"@requestnetwork/utils": "0.54.0", | ||
"chalk": "4.1.0", | ||
"cors": "2.8.5", | ||
"dotenv": "8.2.0", | ||
"dotenv": "16.5.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was an issue with how
|
||
"ethers": "5.7.2", | ||
"express": "4.21.0", | ||
"graphql": "16.8.1", | ||
|
@@ -90,7 +90,7 @@ | |
"ts-jest": "29.1.0", | ||
"ts-node": "10.9.1", | ||
"ts-node-dev": "1.0.0-pre.62", | ||
"typescript": "5.1.3" | ||
"typescript": "5.8.3" | ||
}, | ||
"gitHead": "6155223cfce769e48ccae480c510b35b4f54b4d0" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,6 @@ | |
}, | ||
"devDependencies": { | ||
"ts-node": "10.9.1", | ||
"typescript": "5.1.3" | ||
"typescript": "5.8.3" | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated Typescript to support loading ES modules in CommonJS synchronously (without
await import()
):https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require
This is needed to support the latest version of
graphql-request
used in thepayment-detection
package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing we satisfy the final bullet point because we use
.js
extension and not"type": "commonjs"
Per the link: