Skip to content

Commit

Permalink
Revert show registry (3a2da0a)
Browse files Browse the repository at this point in the history
  • Loading branch information
TiagoDanin committed Jan 11, 2020
1 parent 4b954c3 commit 71a076f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
12 changes: 0 additions & 12 deletions source/npm/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,3 @@ exports.checkIgnoreStrategy = ({files}) => {
`);
}
};

exports.getRegistryUrl = async (pkgManager, pkg) => {
const args = ['config', 'get', 'registry'];
if (exports.isExternalRegistry(pkg)) {
args.push({
registryUrl: pkg.publishConfig.registry
});
}

const {stdout} = await execa(pkgManager, args);
return stdout;
};
9 changes: 4 additions & 5 deletions source/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const githubUrlFromGit = require('github-url-from-git');
const isScoped = require('is-scoped');
const util = require('./util');
const git = require('./git-util');
const {prereleaseTags, checkIgnoreStrategy, getRegistryUrl} = require('./npm/util');
const {prereleaseTags, checkIgnoreStrategy} = require('./npm/util');
const version = require('./version');
const prettyVersionDiff = require('./pretty-version-diff');

const printCommitLog = async (repoUrl, registryUrl) => {
const printCommitLog = async (repoUrl) => {
const latest = await git.latestTagOrFirstCommit();
const log = await git.commitLogFromRevision(latest);

Expand Down Expand Up @@ -41,7 +41,7 @@ const printCommitLog = async (repoUrl, registryUrl) => {

const commitRange = util.linkifyCommitRange(repoUrl, `${latest}...master`);

console.log(`${chalk.bold('Commits:')}\n${history}\n\n${chalk.bold('Commit Range:')}\n${commitRange}\n\n${chalk.bold('Registry:')}\n${registryUrl}\n`);
console.log(`${chalk.bold('Commits:')}\n${history}\n\n${chalk.bold('Commit Range:')}\n${commitRange}\n`);

return {
hasCommits: true,
Expand All @@ -53,7 +53,6 @@ module.exports = async (options, pkg) => {
const oldVersion = pkg.version;
const extraBaseUrls = ['gitlab.com'];
const repoUrl = pkg.repository && githubUrlFromGit(pkg.repository.url, {extraBaseUrls});
const registryUrl = await getRegistryUrl(options.yarn ? 'yarn' : 'npm', pkg);
const runPublish = options.publish && !pkg.private;

if (runPublish) {
Expand Down Expand Up @@ -144,7 +143,7 @@ module.exports = async (options, pkg) => {
}
];

const {hasCommits, releaseNotes} = await printCommitLog(repoUrl, registryUrl);
const {hasCommits, releaseNotes} = await printCommitLog(repoUrl);

if (options.version) {
return {
Expand Down

0 comments on commit 71a076f

Please sign in to comment.