Skip to content

Commit

Permalink
fix: invalidatePackage arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Jul 15, 2018
1 parent 51afe59 commit 8a09624
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli-ui/apollo-server/connectors/dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function update ({ id }, context) {
icon: 'done'
})

invalidatePackage(id)
invalidatePackage({ id }, context)

return findOne(id)
})
Expand All @@ -247,7 +247,7 @@ function updateAll (context) {
const version = await getVersion(dep, context)
if (version.current !== version.wanted) {
updatedDeps.push(dep)
invalidatePackage(dep.id, context)
invalidatePackage({ id: dep.id }, context)
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-ui/apollo-server/connectors/folders.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function writePackage ({ file, data }, context) {
fs.outputJsonSync(path.join(file, 'package.json'), data, {
spaces: 2
})
invalidatePackage(file)
invalidatePackage(file, context)
return true
}

Expand Down
4 changes: 2 additions & 2 deletions packages/@vue/cli-ui/apollo-server/connectors/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function update (id, context) {
})

await resetPluginApi({ file: cwd.get() }, context)
dependencies.invalidatePackage(id, context)
dependencies.invalidatePackage({ id }, context)

currentPluginId = null
return findOne({ id, file: cwd.get() }, context)
Expand All @@ -442,7 +442,7 @@ async function updateAll (context) {
const version = await dependencies.getVersion(plugin, context)
if (version.current !== version.wanted) {
updatedPlugins.push(plugin)
dependencies.invalidatePackage(plugin.id, context)
dependencies.invalidatePackage({ id: plugin.id }, context)
}
}

Expand Down

0 comments on commit 8a09624

Please sign in to comment.