Skip to content

Commit

Permalink
Fix yarn version bump for private packages (#257)
Browse files Browse the repository at this point in the history
This allows np to create a tag on a private package, it sort of reverts
#235.
For public packages, the tag will be created using yarn publish.
  • Loading branch information
tusbar authored and sindresorhus committed May 21, 2018
1 parent 305bdc4 commit 1479d15
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Expand Up @@ -98,6 +98,16 @@ module.exports = (input, opts) => {
}

tasks.add([
{
title: 'Bumping version using Yarn',
enabled: () => opts.yarn === true,
skip: () => {
if (runPublish && !pkg.private) {
return 'Public package: version will be bumped using yarn publish.';
}
},
task: () => exec('yarn', ['version', '--new-version', input])
},
{
title: 'Bumping version using npm',
enabled: () => opts.yarn === false,
Expand Down

0 comments on commit 1479d15

Please sign in to comment.