Skip to content

Commit

Permalink
chore(package): update xo to version 0.24.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeper[bot] authored and pvdlg committed Jan 22, 2019
1 parent 4c756b2 commit 287c8a1
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ async function publish(pluginConfig, context) {
await verifyGitHub(pluginConfig, context);
verified = true;
}

return publishGitHub(pluginConfig, context);
}

Expand All @@ -39,6 +40,7 @@ async function addChannel(pluginConfig, context) {
await verifyGitHub(pluginConfig, context);
verified = true;
}

return addChannelGitHub(pluginConfig, context);
}

Expand All @@ -47,6 +49,7 @@ async function success(pluginConfig, context) {
await verifyGitHub(pluginConfig, context);
verified = true;
}

await successGitHub(pluginConfig, context);
}

Expand All @@ -55,6 +58,7 @@ async function fail(pluginConfig, context) {
await verifyGitHub(pluginConfig, context);
verified = true;
}

await failGitHub(pluginConfig, context);
}

Expand Down
3 changes: 3 additions & 0 deletions lib/add-channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = async (pluginConfig, context) => {
logger.log('Published GitHub release: %s', url);
return {url, name: RELEASE_NAME};
}

throw error;
}

Expand All @@ -61,3 +62,5 @@ module.exports = async (pluginConfig, context) => {

return {url, name: RELEASE_NAME};
};

/* eslint-enable camelcase */
3 changes: 1 addition & 2 deletions lib/definitions/errors.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const url = require('url');
const {inspect} = require('util');
const {isString} = require('lodash');
const pkg = require('../../package.json');

const homepage = url.format({...url.parse(pkg.homepage), ...{hash: null}});
const [homepage] = pkg.homepage.split('#');
const stringify = obj => (isString(obj) ? obj : inspect(obj, {breakLength: Infinity, depth: 2, maxArrayLength: 5}));
const linkify = file => `${homepage}/blob/master/${file}`;

Expand Down
5 changes: 3 additions & 2 deletions lib/get-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const url = require('url');
const {URL} = require('url');
const {memoize, get} = require('lodash');
const Octokit = require('@octokit/rest');
const pRetry = require('p-retry');
Expand Down Expand Up @@ -35,7 +35,7 @@ module.exports = ({githubToken, githubUrl, githubApiPathPrefix, proxy}) => {
baseUrl,
request: {
agent: proxy
? baseUrl && url.parse(baseUrl).protocol.replace(':', '') === 'http'
? baseUrl && new URL(baseUrl).protocol.replace(':', '') === 'http'
? new HttpProxyAgent(proxy)
: new HttpsProxyAgent(proxy)
: undefined,
Expand All @@ -54,6 +54,7 @@ module.exports = ({githubToken, githubUrl, githubApiPathPrefix, proxy}) => {
if (SKIP_RETRY_CODES.includes(error.status)) {
throw new pRetry.AbortError(error);
}

throw error;
}
}, RETRY_CONF);
Expand Down
1 change: 1 addition & 0 deletions lib/get-search-queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = (base, commits, separator = '+') => {
} else {
searches.push(`${base}${separator}${commit}`);
}

return searches;
}, []);
};
1 change: 1 addition & 0 deletions lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ module.exports = async (pluginConfig, context) => {
logger.error('The asset %s cannot be read, and will be ignored.', filePath);
return;
}

if (!file || !file.isFile()) {
logger.error('The asset %s is not a file, and will be ignored.', filePath);
return;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"server-destroy": "^1.0.1",
"sinon": "^7.1.1",
"tempy": "^0.2.1",
"xo": "^0.23.0"
"xo": "^0.24.0"
},
"engines": {
"node": ">=8.3"
Expand Down
2 changes: 0 additions & 2 deletions test/get-client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ test('Use different throttler for read and write endpoints', async t => {

test('Use the same throttler when retrying', async t => {
const coreRate = 200;

// eslint-disable-next-line require-await
const request = stub().callsFake(async () => {
const err = new Error();
err.time = Date.now();
Expand Down

0 comments on commit 287c8a1

Please sign in to comment.