 
     plugin.isInstalled = true
     plugin.isOutdated = false
+    if plugin.packageData?.version?
+      plugin.version = plugin.packageData.version
+    plugin.lastestVersion = plugin.version
     return plugin
 
   # notify user about unread plugins, only shown when any exists

      return false
    return config.get "plugin.#{plugin.name}.enable", true

  # get the lastest version of plugin based on npm
  # @param {Plugin}
  # @return {Promise<?string>}
  getLastestVersionOfPlugin: (plugin) ->
    # after getting mirrors, at least one mirror is set
    @getMirrors().then ->
      new Promise (resolve) ->
        npm.commands.distTag ['ls', plugin.packageName], (err, data) ->
          resolve data or null

  # update one plugin
  # @param {Plugin} plugin
  # @return {Promise<>}
  updatePlugin: (plugin) ->
    plugin.isUpdating = true
    @getMirrors().then ->
      new Promise (resolve) ->
        npm.commands.install ["#{plugins[index].packageName}@#{plugin.version}"], ->
        plugin.isUpdating = false
        resolve()

  # install one plugin and read it
  # @param {string} name

        npm.load npmConfig, =>
          resolve @config_

  # get the current plugins
  # @return {Promise<Array<Plugin>>}
  getPlugins: ->
