diff --git a/source/index.js b/source/index.js index ea4ba7c2..94ed1550 100644 --- a/source/index.js +++ b/source/index.js @@ -39,7 +39,7 @@ const np = async (input = 'patch', options, {pkg, rootDir, isYarnBerry}) => { function getPackageManagerName() { if (options.yarn === true) { if (isYarnBerry) { - return 'Yarn berry'; + return 'Yarn Berry'; } return 'Yarn'; diff --git a/source/npm/handle-npm-error.js b/source/npm/handle-npm-error.js index 2309c18f..01172c60 100644 --- a/source/npm/handle-npm-error.js +++ b/source/npm/handle-npm-error.js @@ -28,8 +28,8 @@ const handleNpmError = (error, task, message, executor) => { // https://stackoverflow.com/a/44862841/10292952 if ( error.code === 402 - || error.stderr.includes('npm ERR! 402 Payment Required') // Npm - || error.stdout.includes('Response Code: 402 (Payment Required)') // Yarn berry + || error.stderr.includes('npm ERR! 402 Payment Required') // npm + || error.stdout.includes('Response Code: 402 (Payment Required)') // Yarn Berry ) { throw new Error('You cannot publish a scoped package privately without a paid plan. Did you mean to publish publicly?'); } diff --git a/source/ui.js b/source/ui.js index 9bd56eaf..e1bb0825 100644 --- a/source/ui.js +++ b/source/ui.js @@ -127,7 +127,7 @@ const ui = async (options, {pkg, rootDir, isYarnBerry}) => { function getPkgManager() { if (!options.yarn) { - return npm; + return 'npm'; } if (isYarnBerry) { @@ -140,7 +140,7 @@ const ui = async (options, {pkg, rootDir, isYarnBerry}) => { const pkgManager = getPkgManager(); if (isYarnBerry && npm.isExternalRegistry(pkg)) { - throw new Error('External registry not supported yet with yarn berry'); + throw new Error('External registry is not yet supported with Yarn Berry'); } const registryUrl = await npm.getRegistryUrl(pkgManager, pkg);