fix(build): enforce stricter TypeScript checks and update build dependencies

This commit is contained in:
2026-04-30 08:51:24 +00:00
parent d526a7d8dd
commit 26d0fed2d4
9 changed files with 705 additions and 307 deletions
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## 2026-04-30 - 4.7.1 - fix(build)
enforce stricter TypeScript checks and update build dependencies
- enable noImplicitAny in tsconfig and remove the build flag override to enforce strict typing during builds
- add explicit null guards in tests for free port and default gateway results
- update development and runtime dependencies and refresh pnpm metadata
## 2026-04-26 - 4.7.0 - feat(ipintelligence)
add canonical RDAP CIDR coverage and derive CIDRs from IPv4 start/end ranges
+7 -9
View File
@@ -11,20 +11,20 @@
"license": "MIT",
"scripts": {
"test": "(tstest test/ --verbose)",
"build": "(tsbuild tsfolders --allowimplicitany) && (tsrust)",
"build": "(tsbuild tsfolders) && (tsrust)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsrun": "^2.0.2",
"@git.zone/tsrust": "^1.3.2",
"@git.zone/tstest": "^3.6.1",
"@types/node": "^25.5.0"
"@git.zone/tstest": "^3.6.3",
"@types/node": "^25.6.0"
},
"dependencies": {
"@push.rocks/smartdns": "^7.9.0",
"@push.rocks/smartrust": "^1.3.2",
"maxmind": "^5.0.5"
"@push.rocks/smartrust": "^1.4.0",
"maxmind": "^5.0.6"
},
"files": [
"ts/**/*",
@@ -36,6 +36,7 @@
"assets/**/*",
"cli.js",
".smartconfig.json",
"license",
"readme.md"
],
"browserslist": [
@@ -58,11 +59,8 @@
"type": "git",
"url": "https://code.foss.global/push.rocks/smartnetwork.git"
},
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6",
"packageManager": "pnpm@10.28.2",
"bugs": {
"url": "https://code.foss.global/push.rocks/smartnetwork/issues"
},
"pnpm": {
"overrides": {}
}
}
+679 -293
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -37,7 +37,7 @@ Key features:
- `ensureBridge()` auto-starts on first use
### Build Pipeline
- `pnpm build` = `tsbuild tsfolders --allowimplicitany && tsrust`
- `pnpm build` = `tsbuild tsfolders && tsrust`
- Targets configured in `.smartconfig.json` under `@git.zone/tsrust`
## Key Components
+2 -2
View File
@@ -9,7 +9,7 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
## 🚀 Install
```bash
pnpm install @push.rocks/smartnetwork --save
pnpm add @push.rocks/smartnetwork
```
## 🎯 Overview
@@ -491,7 +491,7 @@ const monitor = async () => {
## License and Legal Information
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license](./license) file.
**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.
+3
View File
@@ -153,6 +153,9 @@ tap.test('isLocalPortUnused should detect used local port', async () => {
// findFreePort tests
tap.test('findFreePort should find an available port in range', async () => {
const freePort = await sharedSn.findFreePort(49152, 49200);
if (freePort === null) {
throw new Error('Expected to find a free port in test range');
}
expect(freePort).toBeGreaterThanOrEqual(49152);
expect(freePort).toBeLessThanOrEqual(49200);
+3
View File
@@ -47,6 +47,9 @@ tap.test('should get the default gateway', async () => {
console.log(defaultGw);
// verify default gateway contains ipv4 and ipv6 info
expect(defaultGw).toBeDefined();
if (!defaultGw) {
throw new Error('Expected a default gateway');
}
expect(defaultGw.ipv4).toBeDefined();
expect(defaultGw.ipv6).toBeDefined();
});
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartnetwork',
version: '4.7.0',
version: '4.7.1',
description: 'A toolkit for network diagnostics including speed tests, port availability checks, and more.'
}
+2 -1
View File
@@ -7,6 +7,7 @@
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"noImplicitAny": true,
"types": [
"node"
]
@@ -14,4 +15,4 @@
"exclude": [
"dist_*/**/*.d.ts"
]
}
}