Skip to content

Commit 710d08b

Browse files
committed
chore: always upgrade @vue/cli-service first
1 parent 9967d60 commit 710d08b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/@vue/cli/lib/upgrade.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ class Upgrader {
196196
const latest = await this.pm.getRemoteVersion(name)
197197

198198
if (installed !== latest) {
199-
upgradable.push({ name, installed, wanted, latest })
199+
// always list @vue/cli-service as the first one
200+
// as it's depended by all other plugins
201+
if (name === '@vue/cli-service') {
202+
upgradable.unshift({ name, installed, wanted, latest })
203+
} else {
204+
upgradable.push({ name, installed, wanted, latest })
205+
}
200206
}
201207
}
202208
}
@@ -244,7 +250,7 @@ async function upgrade (packageName, options, context = process.cwd()) {
244250
if (!(await confirmIfGitDirty(context))) {
245251
return
246252
}
247-
253+
248254
const upgrader = new Upgrader(context)
249255

250256
if (!packageName) {

0 commit comments

Comments
 (0)