From 85e8ecd478e3f0721d65ba346d5b9046053ab312 Mon Sep 17 00:00:00 2001 From: Vela CI Date: Mon, 7 Jun 2021 06:54:08 -0500 Subject: [PATCH] Revert "Merge pull request #1997 from 10hendersonm/canary_double_dash" This reverts commit 1e83684ebd37912b87e173cc02ba3b53c76e9e46, reversing changes made to 1f27b918b490b33e0b572dccdf621316783acfa1. --- plugins/npm/src/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/npm/src/index.ts b/plugins/npm/src/index.ts index 1eaf86403..283857019 100644 --- a/plugins/npm/src/index.ts +++ b/plugins/npm/src/index.ts @@ -1005,9 +1005,6 @@ export default class NPMPlugin implements IPlugin { } }; - canaryIdentifier = canaryIdentifier.replace(/^-/, "") - - if (isMonorepo()) { const isIndependent = getLernaJson().version === "independent"; auto.logger.verbose.info("Detected monorepo, using lerna"); @@ -1057,7 +1054,7 @@ export default class NPMPlugin implements IPlugin { "--exact", "--ignore-scripts", "--preid", - canaryIdentifier, + canaryIdentifier.replace(/^-/, ""), ...verboseArgs, ]); @@ -1083,7 +1080,7 @@ export default class NPMPlugin implements IPlugin { "--no-git-tag-version", // no need to tag and commit, "--exact", // do not add ^ to canary versions, this can result in `npm i` resolving the wrong canary version ...(isIndependent - ? ["--preid", canaryIdentifier] + ? ["--preid", canaryIdentifier.replace(/^-/, "")] : []), ...verboseArgs, ]);