8000 chore(package): update xo to version 0.24.0 · coderbyheart/github@287c8a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 287c8a1

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update xo to version 0.24.0
1 parent 4c756b2 commit 287c8a1

File tree

8 files changed

+14
-7
lines changed

8 files changed

+14
-7
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ async function publish(pluginConfig, context) {
3131
await verifyGitHub(pluginConfig, context);
3232
verified = true;
3333
}
34+
3435
return publishGitHub(pluginConfig, context);
3536
}
3637

@@ -39,6 +40,7 @@ async function addChannel(pluginConfig, context) {
3940
await verifyGitHub(pluginConfig, context);
4041
verified = true;
4142
}
43+
4244
return addChannelGitHub(pluginConfig, context);
4345
}
4446

@@ -47,6 +49,7 @@ async function success(pluginConfig, context) {
4749
await verifyGitHub(pluginConfig, context);
4850
verified = true;
4951
}
52+
5053
await successGitHub(pluginConfig, context);
5154
}
5255

@@ -55,6 +58,7 @@ async function fail(pluginConfig, context) {
5558
await verifyGitHub(pluginConfig, context);
5659
verified = true;
5760
}
61+
5862
await failGitHub(pluginConfig, context);
5963
}
6064

lib/add-channel.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module.exports = async (pluginConfig, context) => {
4545
logger.log('Published GitHub release: %s', url);
4646
return {url, name: RELEASE_NAME};
4747
}
48+
4849
throw error;
4950
}
5051

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

6263
return {url, name: RELEASE_NAME};
6364
};
65+
66+
/* eslint-enable camelcase */

lib/definitions/errors.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
const url = require('url');
21
const {inspect} = require('util');
32
const {isString} = require('lodash');
43
const pkg = require('../../package.json');
54

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

lib/get-client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const url = require('url');
1+
const {URL} = require('url');
22
const {memoize, get} = require('lodash');
33
const Octokit = require('@octokit/rest');
44
const pRetry = require('p-retry');
@@ -35,7 +35,7 @@ module.exports = ({githubToken, githubUrl, githubApiPathPrefix, proxy}) => {
3535
baseUrl,
3636
request: {
3737
agent: proxy
38-
? baseUrl && url.parse(baseUrl).protocol.replace(':', '') === 'http'
38+
? baseUrl && new URL(baseUrl).protocol.replace(':', '') === 'http'
3939
? new HttpProxyAgent(proxy)
4040
: new HttpsProxyAgent(proxy)
4141
: undefined,
@@ -54,6 +54,7 @@ module.exports = ({githubToken, githubUrl, githubApiPathPrefix, proxy}) => {
5454
if (SKIP_RETRY_CODES.includes(error.status)) {
5555
throw new pRetry.AbortError(error);
5656
}
57+
5758
throw error;
5859
}
5960
}, RETRY_CONF);

lib/get-search-queries.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module.exports = (base, commits, separator = '+') => {
77
} else {
88
searches.push(`${base}${separator}${commit}`);
99
}
10+
1011
return searches;
1112
}, []);
1213
};

lib/publish.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module.exports = async (pluginConfig, context) => {
4545
logger.error('The asset %s cannot be read, and will be ignored.', filePath);
4646
return;
4747
}
48+
4849
if (!file || !file.isFile()) {
4950
logger.error('The asset %s is not a file, and will be ignored.', filePath);
5051
return;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"server-destroy": "^1.0.1",
4949
"sinon": "^7.1.1",
5050
"tempy": "^0.2.1",
51-
"xo": "^0.23.0"
51+
"xo": "^0.24.0"
5252
},
5353
"engines": {
5454
"node": ">=8.3"

test/get-client.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ test('Use different throttler for read and write endpoints', async t => {
170170

171171
test('Use the same throttler when retrying', async t => {
172172
const coreRate = 200;
173-
174-
// eslint-disable-next-line require-await
175173
const request = stub().callsFake(async () => {
176174
const err = new Error();
177175
err.time = Date.now();

0 commit comments

Comments
 (0)
0