outdated.js 406 B

1234567891011121314151617
  1. const { error } = require('@vue/cli-shared-utils')
  2. const Upgrader = require('./Upgrader')
  3. async function outdated (options, context = process.cwd()) {
  4. const upgrader = new Upgrader(context)
  5. return upgrader.checkForUpdates(options.next)
  6. }
  7. module.exports = (...args) => {
  8. return outdated(...args).catch(err => {
  9. error(err)
  10. if (!process.env.VUE_CLI_TEST) {
  11. process.exit(1)
  12. }
  13. })
  14. }