Skip to content

Commit

Permalink
fix(core): plugin version check
Browse files Browse the repository at this point in the history
  • Loading branch information
cpselvis committed Mar 12, 2020
1 parent e53ae1c commit d7d0f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/feflow-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@feflow/cli",
"version": "0.18.0",
"version": "0.18.1",
"description": "A front-end flow tool.",
"main": "./lib/index.js",
"directories": {
Expand Down
4 changes: 2 additions & 2 deletions packages/feflow-cli/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ export default class Feflow {
const pkg: any = JSON.parse(content);
const localVersion = pkg.version;
const registryUrl = await getRegistryUrl(packageManager);
const latestVersion = await packageJson(name, registryUrl).catch((err) => {
const latestVersion: any = await packageJson(name, registryUrl).catch((err) => {
logger.debug('Check plugin update error', err);
});

if (latestVersion && latestVersion !== localVersion) {
if (latestVersion && semver.gt(latestVersion, localVersion)) {
table.cell('Name', name);
table.cell('Version', localVersion === latestVersion ? localVersion : localVersion + ' -> ' + latestVersion);
table.cell('Tag', 'latest');
Expand Down

0 comments on commit d7d0f2f

Please sign in to comment.