Skip to content

Commit

Permalink
style: prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Nov 21, 2019
1 parent cd1ecaa commit c9fc3c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 32 deletions.
20 changes: 4 additions & 16 deletions lib/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,16 @@ module.exports = async (npmrc, {tarballDir, pkgRoot}, {cwd, env, stdout, stderr,
cwd: basePath,
env,
});
versionResult.stdout.pipe(
stdout,
{end: false}
);
versionResult.stderr.pipe(
stderr,
{end: false}
);
versionResult.stdout.pipe(stdout, {end: false});
versionResult.stderr.pipe(stderr, {end: false});

await versionResult;

if (tarballDir) {
logger.log('Creating npm package version %s', version);
const packResult = execa('npm', ['pack', basePath, '--userconfig', npmrc], {cwd, env});
packResult.stdout.pipe(
stdout,
{end: false}
);
packResult.stderr.pipe(
stderr,
{end: false}
);
packResult.stdout.pipe(stdout, {end: false});
packResult.stderr.pipe(stderr, {end: false});

const tarball = (await packResult).stdout.split('\n').pop();
const tarballSource = path.resolve(cwd, tarball);
Expand Down
10 changes: 2 additions & 8 deletions lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ module.exports = async (npmrc, {npmPublish, pkgRoot}, pkg, context) => {

logger.log('Publishing version %s to npm registry', version);
const result = execa('npm', ['publish', basePath, '--userconfig', npmrc, '--registry', registry], {cwd, env});
result.stdout.pipe(
stdout,
{end: false}
);
result.stderr.pipe(
stderr,
{end: false}
);
result.stdout.pipe(stdout, {end: false});
result.stderr.pipe(stderr, {end: false});
await result;

logger.log(`Published ${pkg.name}@${pkg.version} on ${registry}`);
Expand Down
10 changes: 2 additions & 8 deletions lib/verify-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ module.exports = async (npmrc, pkg, context) => {
if (normalizeUrl(registry) === normalizeUrl(DEFAULT_NPM_REGISTRY)) {
try {
const whoamiResult = execa('npm', ['whoami', '--userconfig', npmrc, '--registry', registry], {cwd, env});
whoamiResult.stdout.pipe(
stdout,
{end: false}
);
whoamiResult.stderr.pipe(
stderr,
{end: false}
);
whoamiResult.stdout.pipe(stdout, {end: false});
whoamiResult.stderr.pipe(stderr, {end: false});
await whoamiResult;
} catch (_) {
throw new AggregateError([getError('EINVALIDNPMTOKEN', {registry})]);
Expand Down

0 comments on commit c9fc3c1

Please sign in to comment.