fix(publish): don't use pnpm-temp dist tag

close ##2686
PR #2767
This commit is contained in:
Zoltan Kochan
2020-08-12 11:31:51 +03:00
committed by GitHub
parent e62b7daa12
commit 69a675f416
2 changed files with 7 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/plugin-commands-publishing": patch
---
`pnpm publish -r` should not publish packages with `pnpm-temp` distribution tag.

View File

@@ -82,6 +82,7 @@ export default async function (
appendedArgs.push('--dry-run')
}
const chunks = sortPackages(opts.selectedProjectsGraph)
const tag = opts.tag ?? 'latest'
for (const chunk of chunks) {
for (const pkgDir of chunk) {
if (!publishedPkgDirs.has(pkgDir)) continue
@@ -93,7 +94,7 @@ export default async function (
'publish',
pkg.dir,
'--tag',
'pnpm-temp',
tag,
'--registry',
pickRegistryForPackage(opts.registries, pkg.manifest.name!),
...appendedArgs,
@@ -104,17 +105,6 @@ export default async function (
}, [pkg.dir])
}
}
const tag = opts.tag || 'latest'
for (const pkg of pkgsToPublish) {
runNpm(opts.npmPath, [
'dist-tag',
'add',
`${pkg.manifest.name}@${pkg.manifest.version}`,
tag,
'--registry',
pickRegistryForPackage(opts.registries, pkg.manifest.name!),
])
}
}
async function isAlreadyPublished (