Skip to content

Commit

Permalink
Merge pull request #34 from sonnenkern/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sonnenkern authored Jun 23, 2022
2 parents 047466a + a86d470 commit 2c41752
Show file tree
Hide file tree
Showing 6 changed files with 15,304 additions and 14 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# dependencies
/node_modules
package-lock.json

# production
/build
Expand Down
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__tests__
.*
/http
/public
/quip-export-*.tgz
21 changes: 10 additions & 11 deletions lib/common/utils.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const fs = require('fs');
const mkdirp = require('mkdirp');
const path = require('path');
const npmview = require('npmview');
const semver = require('semver');
const npmLatest = require('npm-latest');

const packageJson = require('../../package.json');

Expand Down Expand Up @@ -52,16 +52,15 @@ async function getVersionInfo() {
localOutdate: false
};

return new Promise((resolve) => {
npmview(packageJson.name, function(err, version) {
if(version) {
versionsInfo.remoteVersion = version;
}
// compare to local version
versionsInfo.localOutdate = semver.gt(versionsInfo.remoteVersion, versionsInfo.localVersion);
resolve(versionsInfo);
});
});
try {
versionsInfo.remoteVersion = (await npmLatest.getLatest('quip-esxport')).version;
// compare to local version
versionsInfo.localOutdate = semver.gt(versionsInfo.remoteVersion, versionsInfo.localVersion);
} catch(e) {
// nothing to do
}

return versionsInfo;
}

//await tryCatch(() => quipService.getUser());
Expand Down
Loading

0 comments on commit 2c41752

Please sign in to comment.