Skip to content

Releases: Andrew-Colman/nanov

v1.1.0

10 May 00:18
de40acf
Compare
Choose a tag to compare

Change cachePath to OS temp folder

v1.0.0 - stable

15 Jul 00:45
162b5ed
Compare
Choose a tag to compare

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

fixed by 1.0.1 (now returning an empty object)