fix(build): modernize build configuration and tighten TypeScript typings
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartupdate",
|
||||
"description": "A library designed to facilitate smarter update notifications and checking for Node.js projects.",
|
||||
"npmPackagename": "@push.rocks/smartupdate",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks"
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
},
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmRegistryUrl": "registry.npmjs.org"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-05-01 - 2.0.7 - fix(build)
|
||||
modernize build configuration and tighten TypeScript typings
|
||||
|
||||
- updates build and test tooling dependencies and simplifies package scripts
|
||||
- adds strict TypeScript settings and replaces any-based access with typed APIs in cache manager and notifier
|
||||
- adds project metadata files to the published package and aligns npmextra configuration with namespaced tool settings
|
||||
|
||||
## 2025-11-03 - 2.0.6 - maintenance
|
||||
Summarized maintenance updates across the 2.0.6 release line.
|
||||
|
||||
- Refined project description
|
||||
- Updated TypeScript configuration
|
||||
- Updated npmextra git host metadata
|
||||
- Included additional minor maintenance-only updates with no user-facing impact
|
||||
|
||||
## 2023-07-26 - 2.0.5 - core
|
||||
Delivered a small core fix release.
|
||||
|
||||
- Updated core behavior with a minor fix
|
||||
|
||||
## 2022-06-01 - 2.0.4 - core
|
||||
Delivered a small core fix release covering versions 2.0.3 to 2.0.4.
|
||||
|
||||
- Applied minor core update fixes across the release line
|
||||
|
||||
## 2022-04-13 - 2.0.2 - core
|
||||
Delivered a small core fix release.
|
||||
|
||||
- Updated core behavior with a minor fix
|
||||
|
||||
## 2022-04-13 - 2.0.0 - release line
|
||||
Published the initial 2.x release line with follow-up maintenance updates through 2.0.1.
|
||||
|
||||
- Released version 2.0.0
|
||||
- Included minor non-descriptive maintenance updates in 2.0.1
|
||||
|
||||
## 2022-04-13 - 1.0.31 - core
|
||||
Introduced a breaking change in the core module.
|
||||
|
||||
- BREAKING CHANGE: switched the package to ESM
|
||||
|
||||
## 2020-06-25 - 1.0.28 - core
|
||||
Summarized a sequence of patch releases from 1.0.28 to 1.0.30.
|
||||
|
||||
- Applied repeated minor core fixes across patch releases 1.0.28 through 1.0.30
|
||||
|
||||
## 2019-09-16 - 1.0.22 - core
|
||||
Summarized patch activity from 1.0.22 to 1.0.28.
|
||||
|
||||
- Applied repeated minor core fixes across versions 1.0.22 through 1.0.28
|
||||
- Included an unspecified maintenance update in 1.0.21
|
||||
|
||||
## 2018-09-02 - 1.0.18 - dependencies
|
||||
Delivered maintenance improvements across versions 1.0.18 to 1.0.20.
|
||||
|
||||
- Updated dependencies to their latest compatible versions
|
||||
- Refreshed CI-related configuration
|
||||
- Included a general maintenance update in 1.0.21
|
||||
|
||||
## 2018-05-22 - 1.0.16 - package
|
||||
Updated package naming and scoped dependencies across versions 1.0.15 to 1.0.16.
|
||||
|
||||
- Switched package naming to the `@pushrocks` scope
|
||||
- Updated `smartopen` dependency to `@pushrocks/smartopen`
|
||||
|
||||
## 2018-02-14 - 1.0.13 - resilience
|
||||
Improved runtime resilience and project maintenance through versions 1.0.13 to 1.0.14.
|
||||
|
||||
- Improved resilience against network failures
|
||||
- Updated CI configuration
|
||||
- Removed `typings-global`
|
||||
|
||||
## 2017-10-07 - 1.0.12 - maintenance
|
||||
Applied maintenance updates across versions 1.0.10 to 1.0.12.
|
||||
|
||||
- Renamed npmextra metadata
|
||||
- Improved operation when `npms.io` is unavailable
|
||||
- Updated CI configuration
|
||||
- Improved smartupdate resilience
|
||||
|
||||
## 2017-08-20 - 1.0.6 - features
|
||||
Delivered multiple early improvements across versions 1.0.1 to 1.0.10.
|
||||
|
||||
- Added initial working version and project documentation
|
||||
- Improved console logs and wording
|
||||
- Added `smartopen`
|
||||
- Improved update information output
|
||||
- Fixed a bug that reset the timer
|
||||
- Updated dependencies
|
||||
- Included compile and maintenance-related updates
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2026 Task Venture Capital GmbH
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+15
-7
@@ -1,9 +1,5 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"@git.zone/cli": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "code.foss.global",
|
||||
@@ -12,6 +8,7 @@
|
||||
"description": "A library designed to facilitate smarter update notifications and checking for Node.js projects.",
|
||||
"npmPackagename": "@push.rocks/smartupdate",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks",
|
||||
"keywords": [
|
||||
"update notifications",
|
||||
"version checking",
|
||||
@@ -24,9 +21,20 @@
|
||||
"software maintenance",
|
||||
"open-source contribution"
|
||||
]
|
||||
},
|
||||
"release": {
|
||||
"registries": [
|
||||
"https://verdaccio.lossless.digital",
|
||||
"https://registry.npmjs.org"
|
||||
],
|
||||
"accessLevel": "public"
|
||||
}
|
||||
},
|
||||
"tsdoc": {
|
||||
"@git.zone/tsdoc": {
|
||||
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
|
||||
},
|
||||
"@ship.zone/szci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmRegistryUrl": "registry.npmjs.org"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-9
@@ -9,23 +9,24 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --verbose)",
|
||||
"build": "(tsbuild --web --allowimplicitany)",
|
||||
"test": "tstest test/ --verbose",
|
||||
"build": "tsbuild --web",
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.7.1",
|
||||
"@git.zone/tsrun": "^1.6.2",
|
||||
"@git.zone/tstest": "^2.7.0",
|
||||
"@types/node": "^22.19.0"
|
||||
"@git.zone/tsbuild": "^4.4.0",
|
||||
"@git.zone/tsrun": "^2.0.3",
|
||||
"@git.zone/tstest": "^3.6.3",
|
||||
"@types/lodash.clonedeep": "^4.5.9",
|
||||
"@types/node": "^25.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@push.rocks/consolecolor": "^2.0.3",
|
||||
"@push.rocks/npmextra": "^5.3.3",
|
||||
"@push.rocks/smartnpm": "^2.0.6",
|
||||
"@push.rocks/smartopen": "^2.0.0",
|
||||
"@push.rocks/smarttime": "^4.1.1",
|
||||
"@push.rocks/smartversion": "^3.0.5"
|
||||
"@push.rocks/smarttime": "^4.2.3",
|
||||
"@push.rocks/smartversion": "^3.1.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
@@ -36,6 +37,8 @@
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
".smartconfig.json",
|
||||
"license",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
@@ -59,5 +62,5 @@
|
||||
"type": "git",
|
||||
"url": "https://code.foss.global/push.rocks/smartupdate.git"
|
||||
},
|
||||
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34"
|
||||
"packageManager": "pnpm@10.28.2"
|
||||
}
|
||||
|
||||
Generated
+2721
-3255
File diff suppressed because it is too large
Load Diff
@@ -114,7 +114,7 @@ tap.test('modern API: cache strategy works', async () => {
|
||||
}
|
||||
});
|
||||
|
||||
tap.test('modern API: exports all types and classes', () => {
|
||||
tap.test('modern API: exports all types and classes', async () => {
|
||||
// Verify exports
|
||||
expect(smartupdate.SmartUpdate).toBeTypeOf('function');
|
||||
expect(smartupdate.UpdateCacheManager).toBeTypeOf('function');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noImplicitAny": true,
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
"verbatimModuleSyntax": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
"exclude": ["dist_*/**/*.d.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user