Skip to content

Commit a729808

Browse files
committed
Update all deps and fix lint warnings
1 parent d667479 commit a729808

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var axios = require('axios')
22
var randomAccess = require('random-access-storage')
33
var logger = require('./lib/logger')
44
var isNode = require('./lib/is-node')
5-
var {validUrl, prependUrlProtocol} = require('./lib/url')
5+
var { validUrl, prependUrlProtocol } = require('./lib/url')
66

77
var defaultOptions = {
88
responseType: 'arraybuffer',

lib/url.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ var url = require('url')
22

33
module.exports.validUrl = function (str) {
44
if (typeof str !== 'string') return false
5-
var parsed = url.parse(str)
5+
var parsed = url.parse(str) /* eslint-disable-line node/no-deprecated-api */
66
return ~['http:', 'https:'].indexOf(parsed.protocol)
77
}
88

99
module.exports.prependUrlProtocol = function (str) {
1010
if (typeof str !== 'string') return false
11-
var parsed = url.parse(str)
11+
var parsed = url.parse(str) /* eslint-disable-line node/no-deprecated-api */
1212

1313
if (parsed.protocol === null) {
1414
parsed.protocol = 'http:'

package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
"homepage": "https://github.com/random-access-storage/random-access-http#readme",
2929
"dependencies": {
3030
"axios": "^0.19.0",
31-
"random-access-storage": "^1.1.1",
31+
"random-access-storage": "^1.4.0",
3232
"url": "^0.11.0"
3333
},
3434
"devDependencies": {
35-
"coveralls": "^3.0.0",
36-
"nyc": "^11.4.1",
37-
"proxyquire": "^1.8.0",
38-
"sinon": "^4.2.2",
39-
"st": "^1.2.2",
40-
"standard": "^10.0.3",
41-
"stoppable": "^1.0.5",
42-
"tap-spec": "^4.1.1",
43-
"tape": "^4.8.0",
35+
"coveralls": "^3.0.9",
36+
"nyc": "^14.1.1",
37+
"proxyquire": "^2.1.3",
38+
"sinon": "^7.5.0",
39+
"st": "^2.0.0",
40+
"standard": "^14.3.1",
41+
"stoppable": "^1.1.0",
42+
"tap-spec": "^5.0.0",
43+
"tape": "^4.11.0",
4444
"tape-watch": "^2.3.0"
4545
}
4646
}

tests/random-access-http.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ test('it uses node http/s agent setting with keepAlive when run in node', (t) =>
5454
var httpStub = sinon.stub()
5555
var httpsStub = sinon.stub()
5656
var raHttp = proxyquire('../index.js', {
57-
'http': {
57+
http: {
5858
Agent: httpStub
5959
},
60-
'https': {
60+
https: {
6161
Agent: httpsStub
6262
}
6363
})
@@ -74,10 +74,10 @@ test('it does not use node http/s when in browser', (t) => {
7474
var httpsStub = sinon.stub()
7575
var raHttp = proxyquire('../index.js', {
7676
'./lib/is-node': false,
77-
'http': {
77+
http: {
7878
Agent: httpStub
7979
},
80-
'https': {
80+
https: {
8181
Agent: httpsStub
8282
}
8383
})

tests/valid-url.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var test = require('tape')
2-
var {validUrl, prependUrlProtocol} = require('../lib/url')
2+
var { validUrl, prependUrlProtocol } = require('../lib/url')
33

44
test('prependUrlProtocol assumes http without path', (t) => {
55
t.same(prependUrlProtocol('example.com'), 'http://example.com')

0 commit comments

Comments
 (0)