Skip to content

Commit

Permalink
Merge pull request #1427 from intuit/independent-prereleases
Browse files Browse the repository at this point in the history
don't prefix tags in lerna independent mode
  • Loading branch information
hipstersmoothie committed Jul 31, 2020
2 parents 1c6615d + cbf088b commit d3ff8dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/npm/__tests__/npm-next.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ describe("next", () => {
remote: "origin",
baseBranch: "master",
logger: dummyLog(),
prefixRelease: (v: string) => v,
prefixRelease: (v: string) => `v${v}`,
git: {
getLatestRelease: () => "@foo/1@0.1.0",
getLastTagNotInBaseBranch: () => "@foo/1@1.0.0-next.0",
Expand Down
6 changes: 4 additions & 2 deletions plugins/npm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ function getLegacyAuthArgs(
/** Get the args to set the registry. Only used with lerna */
async function getRegistryArgs() {
const registry = await getRegistry();
return registry === DEFAULT_REGISTRY || !registry ? [] : ["--registry", registry];
return registry === DEFAULT_REGISTRY || !registry
? []
: ["--registry", registry];
}

const pluginOptions = t.partial({
Expand Down Expand Up @@ -945,7 +947,7 @@ export default class NPMPlugin implements IPlugin {

preReleaseVersions = [
...preReleaseVersions,
...tags.map(auto.prefixRelease),
...(isIndependent ? tags : tags.map(auto.prefixRelease)),
];
} else {
auto.logger.verbose.info("Detected single npm package");
Expand Down

0 comments on commit d3ff8dc

Please sign in to comment.