Skip to content

Commit

Permalink
Bump XO
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 14, 2019
1 parent 6ce603e commit e2d3602
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -47,7 +47,7 @@
"url-parse-lax": "^3.0.0"
},
"devDependencies": {
"ava": "^1.0.1",
"ava": "^1.1.0",
"coveralls": "^3.0.0",
"delay": "^4.1.0",
"form-data": "^2.3.3",
Expand All @@ -61,8 +61,8 @@
"slow-stream": "0.0.4",
"tempfile": "^2.0.0",
"tempy": "^0.2.1",
"tough-cookie": "^2.4.3",
"xo": "^0.23.0"
"tough-cookie": "^3.0.0",
"xo": "^0.24.0"
},
"ava": {
"concurrency": 4
Expand Down
1 change: 1 addition & 0 deletions source/as-promise.js
Expand Up @@ -81,6 +81,7 @@ const asPromise = options => {

resolve(response);
}

return;
}

Expand Down
1 change: 1 addition & 0 deletions source/as-stream.js
Expand Up @@ -83,6 +83,7 @@ module.exports = options => {

return result;
};

proxy.unpipe = stream => {
piped.delete(stream);
return unpipe(stream);
Expand Down
1 change: 1 addition & 0 deletions source/errors.js
Expand Up @@ -69,6 +69,7 @@ module.exports.HTTPError = class extends GotError {
} else {
statusMessage = http.STATUS_CODES[statusCode];
}

super(`Response code ${statusCode} (${statusMessage})`, {}, options);
this.name = 'HTTPError';
this.statusCode = statusCode;
Expand Down
2 changes: 2 additions & 0 deletions source/normalize-arguments.js
Expand Up @@ -49,6 +49,7 @@ const preNormalize = (options, defaults) => {
} else if (is.object(options.timeout)) {
options.gotTimeout = options.timeout;
}

delete options.timeout;

const {retry} = options;
Expand Down Expand Up @@ -138,6 +139,7 @@ const normalize = (url, options, defaults) => {
if (!is.string(query)) {
options.query = (new URLSearchParams(query)).toString();
}

options.path = `${options.path.split('?')[0]}?${options.query}`;
delete options.query;
}
Expand Down
1 change: 1 addition & 0 deletions test/arguments.js
@@ -1,3 +1,4 @@
/* eslint-disable node/no-deprecated-api */
import {URL, URLSearchParams, parse} from 'url';
import test from 'ava';
import pEvent from 'p-event';
Expand Down
2 changes: 2 additions & 0 deletions test/cache.js
Expand Up @@ -40,6 +40,7 @@ test.before('setup', async () => {
response.setHeader('Location', `${s.url}/302`);
response.statusCode = 301;
}

response.end();
status301Index++;
});
Expand All @@ -51,6 +52,7 @@ test.before('setup', async () => {
response.setHeader('Location', `${s.url}/cache`);
response.statusCode = 302;
}

response.end();
status302Index++;
});
Expand Down
1 change: 1 addition & 0 deletions test/error.js
Expand Up @@ -175,6 +175,7 @@ test('catch error in mimicResponse', async t => {
const mimicResponse = () => {
throw new Error('Error in mimic-response');
};

mimicResponse['@global'] = true;

const proxiedGot = proxyquire('..', {
Expand Down
1 change: 1 addition & 0 deletions test/redirects.js
Expand Up @@ -10,6 +10,7 @@ test.before('setup', async () => {
const reached = (request, response) => {
response.end('reached');
};

https = await createSSLServer();
http = await createServer();

Expand Down
1 change: 1 addition & 0 deletions test/socket-destroyed.js
@@ -1,6 +1,7 @@
import test from 'ava';
import got from '../source';

// eslint-disable-next-line node/no-deprecated-api
const {Timer} = process.binding('timer_wrap');

test.serial('clear the progressInterval if the socket has been destroyed', async t => {
Expand Down
1 change: 1 addition & 0 deletions test/timeout.js
Expand Up @@ -18,6 +18,7 @@ const slowDataStream = () => {
if (count++ < 10) {
return slowStream.push('data\n'.repeat(100));
}

clearInterval(interval);
slowStream.push(null);
}, 100);
Expand Down
1 change: 1 addition & 0 deletions test/url-to-options.js
@@ -1,3 +1,4 @@
/* eslint-disable node/no-deprecated-api */
import url from 'url';
import test from 'ava';
import urlToOptions from '../source/utils/url-to-options';
Expand Down

0 comments on commit e2d3602

Please sign in to comment.