Skip to content

Commit

Permalink
feat!: drop node 10 from engines list, update typescript to 4.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelgrosso1 committed Apr 11, 2022
1 parent 17370dc commit a54d1bc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14, 16]
node: [12, 14, 16]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"google"
],
"engines": {
"node": ">=10"
"node": ">=12"
},
"author": "Google, LLC",
"license": "Apache-2.0",
Expand All @@ -46,7 +46,7 @@
"@types/multiparty": "0.0.33",
"@types/mv": "^2.1.0",
"@types/ncp": "^2.0.1",
"@types/node": "^16.11.3",
"@types/node": "^17.0.23",
"@types/node-fetch": "^2.5.7",
"@types/sinon": "^10.0.0",
"@types/tmp": "0.2.3",
Expand Down Expand Up @@ -80,7 +80,7 @@
"stream-browserify": "^3.0.0",
"tmp": "0.2.1",
"ts-loader": "^8.0.0",
"typescript": "^3.8.3",
"typescript": "^4.6.3",
"uuid": "^8.0.0",
"webpack": "^5.35.0",
"webpack-cli": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion src/gaxios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export class Gaxios {
} catch (e) {
const err = e as GaxiosError;
err.config = opts;
const {shouldRetry, config} = await getRetryConfig(e);
const {shouldRetry, config} = await getRetryConfig(err);
if (shouldRetry && config) {
err.config.retryConfig!.currentRetryAttempt =
config.retryConfig!.currentRetryAttempt;
Expand Down
3 changes: 2 additions & 1 deletion test/test.retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ describe('🛸 retry & exponential backoff', () => {
try {
await req;
throw Error('unreachable');
} catch (err) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (err: any) {
assert(err.config);
assert.strictEqual(err.config.retryConfig.currentRetryAttempt, 0);
}
Expand Down

0 comments on commit a54d1bc

Please sign in to comment.