Skip to content

Commit

Permalink
fix(manager): refresh dependencies based on requested semver, fix #704
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed May 28, 2022
1 parent 7c84357 commit c06d984
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/frontend/manager/client/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ watch(() => store.dependencies, (value) => {
for (const key in config.override) {
if (!config.override[key]) {
if (!value[key]) delete config.override[key]
} else if (value[key]?.resolved === config.override[key]) {
} else if (value[key]?.request === config.override[key]) {
delete config.override[key]
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/frontend/manager/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@koishijs/plugin-manager",
"description": "Manage your bots and plugins with console",
"version": "1.8.4",
"version": "1.8.5",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
Expand Down
11 changes: 11 additions & 0 deletions plugins/frontend/manager/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@ declare module '@koishijs/plugin-console' {
const logger = new Logger('market')

export interface Dependency {
/**
* requested semver range
* @example `^1.2.3`
*/
request: string
/**
* installed package version
* @example `1.2.5`
*/
resolved: string
/**
* whether it is a workspace package
*/
workspace: boolean
active?: boolean
}
Expand Down

0 comments on commit c06d984

Please sign in to comment.