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 30, 2019
1 parent ddab7b7 commit 655a714
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions index.js
Expand Up @@ -36,9 +36,11 @@ async function verifyConditions(pluginConfig, context) {
} catch (error) {
errors.push(...error);
}

if (errors.length > 0) {
throw new AggregateError(errors);
}

verified = true;
}

Expand All @@ -56,9 +58,11 @@ async function prepare(pluginConfig, context) {
} catch (error) {
errors.push(...error);
}

if (errors.length > 0) {
throw new AggregateError(errors);
}

await prepareNpm(pluginConfig, context);
prepared = true;
}
Expand All @@ -78,12 +82,15 @@ async function publish(pluginConfig, context) {
} catch (error) {
errors.push(...error);
}

if (errors.length > 0) {
throw new AggregateError(errors);
}

if (!prepared) {
await prepareNpm(pluginConfig, context);
}

return publishNpm(pluginConfig, pkg, context);
}

Expand Down
3 changes: 1 addition & 2 deletions lib/definitions/errors.js
@@ -1,7 +1,6 @@
const url = require('url');
const pkg = require('../../package.json');

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

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions lib/set-npmrc-auth.js
Expand Up @@ -12,6 +12,7 @@ module.exports = async (registry, {cwd, env: {NPM_TOKEN, NPM_USERNAME, NPM_PASSW
if (getAuthToken(registry, {npmrc: rc('npm', {registry: 'https://registry.npmjs.org/'}, {config})})) {
return;
}

if (NPM_USERNAME && NPM_PASSWORD && NPM_EMAIL) {
await appendFile(config, `\n_auth = \${LEGACY_TOKEN}\nemail = \${NPM_EMAIL}`);
logger.log(`Wrote NPM_USERNAME, NPM_PASSWORD and NPM_EMAIL to ${config}`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -47,7 +47,7 @@
"sinon": "^7.1.1",
"stream-buffers": "^3.0.2",
"tempy": "^0.2.1",
"xo": "^0.23.0"
"xo": "^0.24.0"
},
"engines": {
"node": ">=8.3"
Expand Down
2 changes: 1 addition & 1 deletion test/integration.test.js
Expand Up @@ -186,7 +186,7 @@ test('Verify npm auth and package with "npm_config_registry" env var set by yarn
{},
{
cwd,
env: {...npmRegistry.authEnv, npm_config_registry: 'https://registry.yarnpkg.com'}, // eslint-disable-line camelcase
env: {...npmRegistry.authEnv, npm_config_registry: 'https://registry.yarnpkg.com'},
options: {publish: []},
stdout: t.context.stdout,
stderr: t.context.stderr,
Expand Down

0 comments on commit 655a714

Please sign in to comment.