Skip to content

Commit be3d538

Browse files
committed
fix(ui): reload plugin api after plugin update
1 parent 0ba3920 commit be3d538

File tree

1 file changed

+5
-3
lines changed
  • packages/@vue/cli-ui/src/graphql-api/connectors

1 file changed

+5
-3
lines changed

packages/@vue/cli-ui/src/graphql-api/connectors/plugins.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ async function initPrompts (id, context) {
359359
await prompts.start()
360360
}
361361

362-
function update (id, context, notify = true) {
362+
function update (id, context, multi = false) {
363363
return progress.wrap('plugin-update', context, async setProgress => {
364364
setProgress({
365365
status: 'plugin-update',
@@ -376,12 +376,13 @@ function update (id, context, notify = true) {
376376
type: 'info'
377377
}, context)
378378

379-
if (notify) {
379+
if (!multi) {
380380
notify({
381381
title: `Plugin updated`,
382382
message: `Plugin ${id} was successfully updated`,
383383
icon: 'done'
384384
})
385+
resetPluginApi(context)
385386
}
386387

387388
currentPluginId = null
@@ -395,7 +396,7 @@ async function updateAll (context) {
395396
for (const plugin of plugins) {
396397
const version = await getVersion(plugin, context)
397398
if (version.current !== version.wanted) {
398-
updatedPlugins.push(await update(plugin.id, context, false))
399+
updatedPlugins.push(await update(plugin.id, context, true))
399400
}
400401
}
401402

@@ -404,6 +405,7 @@ async function updateAll (context) {
404405
message: `${updatedPlugins.length} plugin(s) were successfully updated`,
405406
icon: 'done'
406407
})
408+
resetPluginApi(context)
407409

408410
return updatedPlugins
409411
}

0 commit comments

Comments
 (0)