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 7e4378d commit f1fedc0
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions index.js
Expand Up @@ -30,6 +30,7 @@ async function publish(pluginConfig, context) {
await verifyGitHub(pluginConfig, context);
verified = true;
}

return publishGitHub(pluginConfig, context);
}

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

await successGitHub(pluginConfig, context);
}

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

await failGitHub(pluginConfig, context);
}

Expand Down
3 changes: 1 addition & 2 deletions lib/definitions/errors.js
@@ -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
@@ -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
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/glob-assets.js
Expand Up @@ -42,6 +42,7 @@ module.exports = async ({cwd}, assets) =>
// - other properties of the original asset definition
return globbed.map(file => ({...asset, path: file, name: basename(file)}));
}

// If asset is an Object, output an Object definition with:
// - `path` of the matched file if there is one, or the original `path` definition (will be considered as a missing file)
// - other properties of the original asset definition
Expand Down
1 change: 1 addition & 0 deletions lib/publish.js
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
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
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 f1fedc0

Please sign in to comment.