-
Notifications
You must be signed in to change notification settings - Fork 13
Update Node.js, TypeScript, drop ts-node dependency #82
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 all commits
d2c5cc2
19f180f
59eb0f7
18a5695
8a794d5
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 |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| import axios from "axios"; | ||
| import axios, { type AxiosStatic } from "axios"; | ||
| import rateLimit, { | ||
| RateLimitedAxiosInstance, | ||
| rateLimitOptions as RateLimitOptions, | ||
| type RateLimitedAxiosInstance, | ||
| type rateLimitOptions as RateLimitOptions, | ||
| } from "axios-rate-limit"; | ||
| import axiosRetry, { | ||
| isNetworkOrIdempotentRequestError, | ||
| IAxiosRetryConfig, | ||
| type IAxiosRetryConfig, | ||
| } from "axios-retry"; | ||
|
|
||
| /** | ||
|
|
@@ -36,11 +36,17 @@ export default function createAxiosInstance(): RateLimitedAxiosInstance { | |
| maxRPS: 2, | ||
| }; | ||
|
|
||
| const axiosClient = axios.create(); | ||
| // @FIXME: Legacy version of axios does not play well with verbatim types | ||
| const axiosClient = (axios as unknown as AxiosStatic).create(); | ||
|
Comment on lines
+39
to
+40
|
||
|
|
||
| axiosClient.defaults.headers.common["User-Agent"] = | ||
| "React Native Version Tracker"; | ||
|
|
||
| axiosRetry(axiosClient, axiosRetryConfig); | ||
| return rateLimit(axiosClient, axiosRateLimitOptions); | ||
|
|
||
| // @FIXME: Legacy version of axios-rate-limit does not play well with verbatim types | ||
| return (rateLimit as unknown as typeof import("axios-rate-limit").default)( | ||
| axiosClient, | ||
| axiosRateLimitOptions | ||
| ); | ||
|
Comment on lines
+47
to
+51
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,12 @@ | ||||||||||||||||
| { | ||||||||||||||||
| "extends": "../tsconfig.json", | ||||||||||||||||
| "compilerOptions": { | ||||||||||||||||
| "allowImportingTsExtensions": true, | ||||||||||||||||
wojtekmaj marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||
| "lib": ["esnext"], | ||||||||||||||||
| "module": "nodenext", | ||||||||||||||||
| "moduleResolution": "nodenext", | ||||||||||||||||
| "target": "esnext" | ||||||||||||||||
| } | ||||||||||||||||
| "target": "esnext", | ||||||||||||||||
| "verbatimModuleSyntax": true | ||||||||||||||||
| }, | ||||||||||||||||
| "exclude": [] | ||||||||||||||||
|
Comment on lines
+9
to
+11
|
||||||||||||||||
| "verbatimModuleSyntax": true | |
| }, | |
| "exclude": [] | |
| "verbatimModuleSyntax": true, | |
| "noEmit": true | |
| }, | |
| "exclude": ["dist", "build"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,5 +14,5 @@ | |
| "strictNullChecks": true, | ||
| "target": "esnext" | ||
| }, | ||
| "exclude": ["build"] | ||
| "exclude": ["build", "scripts"] | ||
| } | ||
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.
actions/setup-node@v3is an older major; for newer Node versions (and to stay aligned with current GitHub Actions runtime expectations), it’s safer to upgrade toactions/setup-node@v4. This change appears in multiple workflows (ci.yml,deploy.yml,update-history.yml) and should be updated consistently.