Skip to content

Commit 9651b04

Browse files
greenkeeper[bot]pvdlg
authored andcommitted
chore(package): update xo to version 0.24.0
1 parent d506b9a commit 9651b04

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ async function verifyConditions(pluginConfig, context) {
3535
} catch (error) {
3636
errors.push(...error);
3737
}
38+
3839
if (errors.length > 0) {
3940
throw new AggregateError(errors);
4041
}
42+
4143
verified = true;
4244
}
4345

@@ -55,9 +57,11 @@ async function prepare(pluginConfig, context) {
5557
} catch (error) {
5658
errors.push(...error);
5759
}
60+
5861
if (errors.length > 0) {
5962
throw new AggregateError(errors);
6063
}
64+
6165
await prepareNpm(pluginConfig, context);
6266
prepared = true;
6367
}
@@ -77,12 +81,15 @@ async function publish(pluginConfig, context) {
7781
} catch (error) {
7882
errors.push(...error);
7983
}
84+
8085
if (errors.length > 0) {
8186
throw new AggregateError(errors);
8287
}
88+
8389
if (!prepared) {
8490
await prepareNpm(pluginConfig, context);
8591
}
92+
8693
return publishNpm(pluginConfig, pkg, context);
8794
}
8895

lib/definitions/errors.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
const url = require('url');
21
const pkg = require('../../package.json');
32

4-
const homepage = url.format({...url.parse(pkg.homepage), ...{hash: null}});
3+
const [homepage] = pkg.homepage.split('#');
54
const linkify = file => `${homepage}/blob/master/${file}`;
65

76
module.exports = {

lib/set-npmrc-auth.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = async (registry, {cwd, env: {NPM_TOKEN, NPM_USERNAME, NPM_PASSW
1212
if (getAuthToken(registry, {npmrc: rc('npm', {registry: 'https://registry.npmjs.org/'}, {config})})) {
1313
return;
1414
}
15+
1516
if (NPM_USERNAME && NPM_PASSWORD && NPM_EMAIL) {
1617
await appendFile(config, `\n_auth = \${LEGACY_TOKEN}\nemail = \${NPM_EMAIL}`);
1718
logger.log(`Wrote NPM_USERNAME, NPM_PASSWORD and NPM_EMAIL to ${config}`);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"sinon": "^7.1.1",
4747
"stream-buffers": "^3.0.2",
4848
"tempy": "^0.2.1",
49-
"xo": "^0.23.0"
49+
"xo": "^0.24.0"
5050
},
5151
"engines": {
5252
"node": ">=8.3"

test/integration.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ test('Verify npm auth and package with "npm_config_registry" env var set by yarn
186186
{},
187187
{
188188
cwd,
189-
env: {...npmRegistry.authEnv, npm_config_registry: 'https://registry.yarnpkg.com'}, // eslint-disable-line camelcase
189+
env: {...npmRegistry.authEnv, npm_config_registry: 'https://registry.yarnpkg.com'},
190190
options: {publish: []},
191191
stdout: t.context.stdout,
192192
stderr: t.context.stderr,

0 commit comments

Comments
 (0)