Skip to content

Commit

Permalink
fix(cli): upgrade without args
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jan 24, 2019
1 parent 35b7b84 commit c153a44
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/@nodepack/cli/src/lib/PluginUpgradeJob.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ module.exports = class PluginUpgradeJob {
cliOptions,
skipCommit: true,
skipPreInstall: true,
before: async ({ pkg, shouldCommitState, installDeps, isTestOrDebug }) => {
before: async ({ pkg, plugins, shouldCommitState, installDeps, isTestOrDebug }) => {
let selectedPlugins = plugins
if (packageNames.length) {
selectedPlugins = packageNames
}

logWithSpinner(`🔄`, `Checking for plugin updates...`)
const { updateInfos, wantedUpgrades, latestUpgrades, totalUpgrades } = await this.resolveUpdates(pkg, packageNames)
const { updateInfos, wantedUpgrades, latestUpgrades, totalUpgrades } = await this.resolveUpdates(pkg, selectedPlugins)
stopSpinner()

// No updates
Expand Down Expand Up @@ -164,6 +169,7 @@ module.exports = class PluginUpgradeJob {
for (const id of plugins) {
const versionRange = pkg.dependencies[id] || pkg.devDependencies[id]
const versionsInfo = await getPackageVersionsInfo(this.cwd, id, versionRange)
console.log(id, versionsInfo)
let canUpdateWanted = false
let canUpdateLatest = false
if (versionsInfo.current !== null) {
Expand Down

0 comments on commit c153a44

Please sign in to comment.