expose the installed and latest version functions
This commit is contained in:
parent
08294f564b
commit
2b842e267f
1 changed files with 9 additions and 4 deletions
|
@ -8,9 +8,14 @@ export async function isNpx() {
|
||||||
return output.stdout.includes('(empty)');
|
return output.stdout.includes('(empty)');
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function isLatest() {
|
export async function installedVersion() {
|
||||||
const version = (/musescore-downloader@([\d\.]+)/).exec((await exec('npm list -g musescore-downloader')).stdout)![1]
|
return (/musescore-downloader@([\d\.]+)/).exec((await exec('npm list -g musescore-downloader')).stdout)![1].trim()
|
||||||
const latest = (await exec('npm info musescore-downloader version')).stdout.trim()
|
}
|
||||||
|
|
||||||
return version.trim() === latest
|
export async function latestVersion() {
|
||||||
|
return (await exec('npm info musescore-downloader version')).stdout.trim()
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function isLatest() {
|
||||||
|
return await installedVersion() === await latestVersion()
|
||||||
}
|
}
|
Loading…
Reference in a new issue