tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
29 lines (28 loc) • 924 B
text/typescript
/**
* @typedef {{
* needUpdate: boolean; // `true` if the current version is outdated, `false` otherwise.
* now: string; // The current version of the package.
* new: string; // The latest version of the package available on npm.
* }} VersionCheck
*/
/**
* Checks if the package version is up-to-date by comparing it with the latest version available on npm.
* The version check is cached and updated every hour.
*
* @param {Object} pkg - The package information.
* @param {string} pkg.name - The name of the package.
* @param {string} pkg.version - The current version of the package.
*
* @returns {Promise<VersionCheck>} The result object
* @deprecated
*/
export default function versionCheck(pkg: {
name: string;
version: string;
}): Promise<VersionCheck>;
export type VersionCheck = {
needUpdate: boolean;
now: string;
new: string;
};
//# sourceMappingURL=versionCheck.d.mts.map