Skip to content

Commit

Permalink
Use getAdapter in axios ^1.5.0 (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerhut committed Aug 28, 2023
1 parent f42808f commit 5754fc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- lts/fermium
- lts/erbium
axios-version:
- ~1.1.0
- ~1.0.0
- 1.5.0
- latest

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { Server, createServer } = require('http')
const { URL } = require('url')

const axios = /** @type {AxiosStatic} */(/** @type {unknown} */(require('axios')))
const defaultAdapter = /** @type {AxiosAdapter} */(axios.defaults.adapter)
const defaultAdapter = /** @type {AxiosAdapter} */(axios.getAdapter(axios.defaults.adapter))

/**
* @callback RequestListener
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@types/node": ">=12.13.0",
"axios": "^1.0.0, <1.2.0"
"axios": "^1.5.0"
},
"devDependencies": {
"ava": "^4.3.3",
Expand Down

0 comments on commit 5754fc4

Please sign in to comment.