Skip to content

Commit 87bf70b

Browse files
Merge pull request #114 from buildo/113-publish_with_pack_does
#113: `publish` with `pack` does not work for organization's packages (closes #113)
2 parents 593a809 + 57e5c46 commit 87bf70b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/npm/publish.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ async function publish(useTarPackage, tarPackageFilename, tarPackageFilePath) {
6565
export default async () => {
6666
title('Publish package on npm');
6767

68-
const tarPackageFilename = `${getPackageJsonName()}-${getPackageJsonVersion()}.tgz`;
68+
const packageJsonName = getPackageJsonName();
69+
const cleanedPackageJsonName = packageJsonName.startsWith('@') ? packageJsonName.replace('@', '').replace('/', '-') : packageJsonName;
70+
71+
const tarPackageFilename = `${cleanedPackageJsonName}-${getPackageJsonVersion()}.tgz`;
6972
const tarPackageFilePath = path.resolve(getRootFolderPath(), tarPackageFilename);
7073

7174
if (config.publish.tarPackageConfirmation) {

0 commit comments

Comments
 (0)