Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/@vue/cli/lib/Migrator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ module.exports = class Migrator extends Generator {
plugin,

pkg = {},
completeCbs = [],
afterInvokeCbs = [],
files = {},
invoking = false
} = {}) {
super(context, {
pkg,
plugins: [],
completeCbs,
afterInvokeCbs,
files,
invoking
})
Expand Down
8 changes: 4 additions & 4 deletions packages/@vue/cli/lib/Upgrader.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ module.exports = class Upgrader {
installed: options.installed
}

const createCompleteCbs = []
const afterInvokeCbs = []
const migrator = new Migrator(this.context, {
plugin: plugin,

pkg: this.pkg,
files: await readFiles(this.context),
completeCbs: createCompleteCbs,
afterInvokeCbs,
invoking: true
})

Expand All @@ -146,9 +146,9 @@ module.exports = class Upgrader {
await this.pm.install()
}

if (createCompleteCbs.length) {
if (afterInvokeCbs.length) {
logWithSpinner('⚓', `Running completion hooks...`)
for (const cb of createCompleteCbs) {
for (const cb of afterInvokeCbs) {
await cb()
}
stopSpinner()
Expand Down