fix(build): modernize build configuration and tighten TypeScript typings
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartupdate',
|
||||
version: '2.0.6',
|
||||
description: 'update your tools in a smart way'
|
||||
version: '2.0.7',
|
||||
description: 'A library designed to facilitate smarter update notifications and checking for Node.js projects.'
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { ICacheStatus, ICacheOptions } from './smartupdate.interfaces.js';
|
||||
* Manages caching of update check results
|
||||
*/
|
||||
export class UpdateCacheManager {
|
||||
private kvStore: plugins.npmextra.KeyValueStore;
|
||||
public readonly kvStore: plugins.npmextra.KeyValueStore;
|
||||
private cacheDurationMs: number;
|
||||
|
||||
constructor(options: ICacheOptions) {
|
||||
|
||||
@@ -31,11 +31,14 @@ export class UpdateNotifier {
|
||||
/**
|
||||
* Colorize a string if colors are enabled
|
||||
*/
|
||||
private colorize(text: string, color: any = DEFAULT_MESSAGE_COLOR): string {
|
||||
private colorize(
|
||||
text: string,
|
||||
color: plugins.consolecolor.TColorName = DEFAULT_MESSAGE_COLOR
|
||||
): string {
|
||||
if (!this.useColors) {
|
||||
return text;
|
||||
}
|
||||
return plugins.consolecolor.coloredString(text, color as any);
|
||||
return plugins.consolecolor.coloredString(text, color);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -66,7 +66,7 @@ export class SmartUpdate {
|
||||
});
|
||||
|
||||
// Backward compatibility: expose kvStore
|
||||
this.kvStore = (this.cacheManager as any).kvStore;
|
||||
this.kvStore = this.cacheManager.kvStore;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user