Releases: Andrew-Colman/nanov
Releases · Andrew-Colman/nanov
v1.1.0
v1.0.0 - stable
npm i nanov
or
yarn add nanov
const { getVersion } = require("nanov"); // node < 12 (commonjs)
import { getVersion } = from "nanov"; // node 14+ ( using in a .mjs file or setting "type":"module" inside your package.json) // or using a compatible module option in tsconfig for esm
Known issues:
TypeError: Cannot destructure property 'latestVersion' of 'object null' as it is null.
getVersion("my-package-name", currentVersion)
.then(({isMajor, isMinor, isPatch, latestVersion})=> {
if(isMajor || isMinor || isPatch,)
console.log('new version available: ', latestVersion)
})
when using the cache the return type was null