fix(build): modernize build configuration and tighten TypeScript typings

This commit is contained in:
2026-05-01 10:55:45 +00:00
parent 1f2937b387
commit 8b22c004ba
13 changed files with 4664 additions and 5489 deletions
+3 -3
View File
@@ -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.'
}
+1 -1
View File
@@ -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) {
+5 -2
View File
@@ -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);
}
/**
+1 -1
View File
@@ -66,7 +66,7 @@ export class SmartUpdate {
});
// Backward compatibility: expose kvStore
this.kvStore = (this.cacheManager as any).kvStore;
this.kvStore = this.cacheManager.kvStore;
}
/**