* Checks whether the user is currently logged into NPM. * @returns Whether the user is currently logged into NPM.
(registryUrl: string | undefined)
| 125 | await ChildProcess.spawn('npm', args, {mode: 'silent'}); |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Deletes the specified NPM tag for the given package. |
| 130 | * @throws With the process log output if the removal failed. |
| 131 | */ |
| 132 | static async deleteDistTagForPackage( |
| 133 | packageName: string, |
| 134 | distTag: string, |
| 135 | registryUrl: string | undefined, |
| 136 | ) { |
| 137 | const args = ['dist-tag', 'rm', packageName, distTag]; |
| 138 | // If a custom registry URL has been specified, add the `--registry` flag. |
| 139 | if (registryUrl !== undefined) { |
| 140 | args.push('--registry', registryUrl); |
| 141 | } |
| 142 | await ChildProcess.spawn('npm', args, {mode: 'silent'}); |