1.2.3 • Published 3 years ago
@montagejs/check-pkg-update v1.2.3
check-pkg-update
Background
Some open-source
cli toolmaybe need auto check that whether it need update the latest version whenexecsome commands.
Install
# recommend
pnpm i @montagejs/check-pkg-update
# or you can use npm / yarn
# npm i @montagejs/check-pkg-updateUsage
import { checkNeedUpdate } from '@montagejs/check-pkg-update'
checkNeedUpdate('create-react-app', '1.0.0')
.then(res => {
console.log(res, "pkg need update");
})shell output
# true need updateAPI
checkNeedUpdate
export declare function checkNeedUpdate(pkgName: string, currentVersion: string): Promise<boolean>;