Feature: skip-temp-tag#620
Conversation
|
In response to #293 |
| }); | ||
| if (skipTempTag) { | ||
| this.progressBar.tick(pkg.name); | ||
| this.execScript(pkg, "postpublish"); |
There was a problem hiding this comment.
Where is the actual publish happening with --skip-temp-tag?
|
So the idea is that
If we did not ignore temp tagging then:
|
|
I also introduced the |
| } | ||
|
|
||
| npmUpdateAsLatest(callback) { | ||
| const {skipTempTag} = this.getOptions(); |
There was a problem hiding this comment.
If we've skipped temp-tagging, why not just avoid the runParallelBatches call entirely?
const {skipTempTag} = this.getOptions();
if (skipTempTag) {
return callback();
}
this.progressBar.init(...)
There was a problem hiding this comment.
Yeah, I missed that. Corrected in 0c6ac7e
|
|
||
| getDistTag() { | ||
| const {npmTag, canary} = this.getOptions(); | ||
| return npmTag ? npmTag : canary ? "canary" : "latest"; |
There was a problem hiding this comment.
I really dislike nested ternaries, especially all on one line. Wouldn't boolean defaults work here?
return npmTag || (canary && "canary") || "latest";
| npmPublishAsPrerelease(callback) { | ||
| const {skipTempTag} = this.getOptions(); | ||
| // if we skip temp tags we should tag with the proper value immediately therefore no updates will be needed | ||
| const tag = !skipTempTag ? "lerna-temp" : this.getDistTag(); |
There was a problem hiding this comment.
Let's invert the ternary (const tag = skipTempTag ? this.getDistTag() : "lerna-temp";) and make sure there's a newline between this assignment and the next forEach block.
|
LGTM, thanks for your responsiveness @noherczeg! If @gigabo has no objections, I will merge this tomorrow. |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have no idea if this is a proper solution, therefore I'd like to have some guidance on how to properly test this.