"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tools/release/npm/npm-client.ts" between
material2-7.3.2.tar.gz and material2-7.3.3.tar.gz

About: material2 offers Material Design components for Angular.

npm-client.ts  (material2-7.3.2):npm-client.ts  (material2-7.3.3)
skipping to change at line 23 skipping to change at line 23
/** Checks whether NPM is currently authenticated. */ /** Checks whether NPM is currently authenticated. */
export function isNpmAuthenticated(): boolean { export function isNpmAuthenticated(): boolean {
return spawnSync('npm', ['whoami'], { return spawnSync('npm', ['whoami'], {
shell: true, shell: true,
env: npmClientEnvironment, env: npmClientEnvironment,
}).stdout.toString() !== ''; }).stdout.toString() !== '';
} }
/** Runs "npm login" interactively by piping stdin/stderr/stdout to the current tty. */ /** Runs "npm login" interactively by piping stdin/stderr/stdout to the current tty. */
export function runInteractiveNpmLogin(): boolean { export function npmLoginInteractive(): boolean {
return spawnSync('npm', ['login'], { return spawnSync('npm', ['login'], {
stdio: 'inherit', stdio: 'inherit',
shell: true, shell: true,
env: npmClientEnvironment, env: npmClientEnvironment,
}).status === 0; }).status === 0;
} }
/** Runs NPM publish within a specified directory */ /** Runs NPM publish within a specified directory */
export function runNpmPublish(packagePath: string, distTag: string): string | nu ll { export function npmPublish(packagePath: string, distTag: string): string | null {
const result = spawnSync('npm', ['publish', '--access', 'public', '--tag', dis tTag], { const result = spawnSync('npm', ['publish', '--access', 'public', '--tag', dis tTag], {
cwd: packagePath, cwd: packagePath,
shell: true, shell: true,
env: npmClientEnvironment, env: npmClientEnvironment,
}); });
// We only want to return an error if the exit code is not zero. NPM by defaul t prints the // We only want to return an error if the exit code is not zero. NPM by defaul t prints the
// logging messages to "stdout" and therefore just checking for "stdout" is no t reliable. // logging messages to "stdout" and therefore just checking for "stdout" is no t reliable.
if (result.status !== 0) { if (result.status !== 0) {
return result.stderr.toString(); return result.stderr.toString();
} }
} }
/** Log out of npm. */
export function npmLogout(): boolean {
return spawnSync('npm', ['logout'], {
shell: true,
env: npmClientEnvironment,
}).status === 0;
}
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)