fix(build): tighten TypeScript build configuration and update tooling dependencies
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"@git.zone/cli": {
|
||||||
|
"projectType": "npm",
|
||||||
|
"module": {
|
||||||
|
"githost": "code.foss.global",
|
||||||
|
"gitscope": "push.rocks",
|
||||||
|
"gitrepo": "smartclickhouse",
|
||||||
|
"description": "A TypeScript-based ODM for ClickHouse databases with full CRUD support, fluent query builder, configurable engines, and automatic schema evolution.",
|
||||||
|
"npmPackagename": "@push.rocks/smartclickhouse",
|
||||||
|
"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": []
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-04-30 - 2.2.1 - fix(build)
|
||||||
|
tighten TypeScript build configuration and update tooling dependencies
|
||||||
|
|
||||||
|
- enable stricter TypeScript checks with noImplicitAny and explicit node types
|
||||||
|
- adjust source typings to satisfy stricter compilation in table, HTTP client, result set, and database classes
|
||||||
|
- update build and test tooling dependencies and remove obsolete dev dependencies
|
||||||
|
- add project smartconfig metadata and include it in published files
|
||||||
|
|
||||||
## 2026-02-27 - 2.2.0 - feat(core)
|
## 2026-02-27 - 2.2.0 - feat(core)
|
||||||
introduce typed ClickHouse table API, query builder, and result handling; enhance HTTP client and add schema evolution, batch inserts and mutations; update docs/tests and bump deps
|
introduce typed ClickHouse table API, query builder, and result handling; enhance HTTP client and add schema evolution, batch inserts and mutations; update docs/tests and bump deps
|
||||||
|
|
||||||
|
|||||||
+10
-9
@@ -10,18 +10,16 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(tstest test/ --verbose --logfile --timeout 60)",
|
"test": "(tstest test/ --verbose --logfile --timeout 60)",
|
||||||
"build": "(tsbuild --web --allowimplicitany)",
|
"build": "(tsbuild --web)",
|
||||||
"createGrafana": "docker run --name grafana -d -p 4000:3000 grafana/grafana-oss",
|
"createGrafana": "docker run --name grafana -d -p 4000:3000 grafana/grafana-oss",
|
||||||
"createClickhouse": "docker run --name some-clickhouse-server --ulimit nofile=262144:262144 -p 8123:8123 -p 9000:9000 --volume=$PWD/.nogit/testdatabase:/var/lib/clickhouse clickhouse/clickhouse-server",
|
"createClickhouse": "docker run --name some-clickhouse-server --ulimit nofile=262144:262144 -p 8123:8123 -p 9000:9000 --volume=$PWD/.nogit/testdatabase:/var/lib/clickhouse clickhouse/clickhouse-server",
|
||||||
"buildDocs": "tsdoc"
|
"buildDocs": "tsdoc"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^4.1.2",
|
"@git.zone/tsbuild": "^4.4.0",
|
||||||
"@git.zone/tsbundle": "^2.9.0",
|
"@git.zone/tsrun": "^2.0.2",
|
||||||
"@git.zone/tsrun": "^2.0.1",
|
"@git.zone/tstest": "^3.6.3",
|
||||||
"@git.zone/tstest": "^3.1.8",
|
"@types/node": "^25.6.0"
|
||||||
"@push.rocks/tapbundle": "^6.0.3",
|
|
||||||
"@types/node": "^22.15.17"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@push.rocks/smartdelay": "^3.0.5",
|
"@push.rocks/smartdelay": "^3.0.5",
|
||||||
@@ -29,7 +27,7 @@
|
|||||||
"@push.rocks/smartpromise": "^4.2.3",
|
"@push.rocks/smartpromise": "^4.2.3",
|
||||||
"@push.rocks/smartrx": "^3.0.10",
|
"@push.rocks/smartrx": "^3.0.10",
|
||||||
"@push.rocks/smarturl": "^3.1.0",
|
"@push.rocks/smarturl": "^3.1.0",
|
||||||
"@push.rocks/webrequest": "^4.0.2"
|
"@push.rocks/webrequest": "^4.0.5"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 1 chrome versions"
|
"last 1 chrome versions"
|
||||||
@@ -43,6 +41,8 @@
|
|||||||
"dist_ts_web/**/*",
|
"dist_ts_web/**/*",
|
||||||
"assets/**/*",
|
"assets/**/*",
|
||||||
"cli.js",
|
"cli.js",
|
||||||
|
".smartconfig.json",
|
||||||
|
"license",
|
||||||
"npmextra.json",
|
"npmextra.json",
|
||||||
"readme.md"
|
"readme.md"
|
||||||
],
|
],
|
||||||
@@ -75,5 +75,6 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://code.foss.global/push.rocks/smartclickhouse.git"
|
"url": "https://code.foss.global/push.rocks/smartclickhouse.git"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.28.2"
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1595
-4216
File diff suppressed because it is too large
Load Diff
@@ -169,6 +169,9 @@ tap.test('should query first()', async () => {
|
|||||||
.orderBy('timestamp', 'DESC')
|
.orderBy('timestamp', 'DESC')
|
||||||
.first();
|
.first();
|
||||||
expect(entry).toBeTruthy();
|
expect(entry).toBeTruthy();
|
||||||
|
if (!entry) {
|
||||||
|
throw new Error('Expected first query result to return an entry');
|
||||||
|
}
|
||||||
expect(entry.level).toBeTruthy();
|
expect(entry.level).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartclickhouse',
|
name: '@push.rocks/smartclickhouse',
|
||||||
version: '2.2.0',
|
version: '2.2.1',
|
||||||
description: 'A TypeScript-based ODM for ClickHouse databases with full CRUD support, fluent query builder, configurable engines, and automatic schema evolution.'
|
description: 'A TypeScript-based ODM for ClickHouse databases with full CRUD support, fluent query builder, configurable engines, and automatic schema evolution.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { ClickhouseQueryBuilder } from './smartclickhouse.classes.querybuilder.j
|
|||||||
import type {
|
import type {
|
||||||
IClickhouseTableOptions,
|
IClickhouseTableOptions,
|
||||||
IColumnInfo,
|
IColumnInfo,
|
||||||
|
IEngineConfig,
|
||||||
TClickhouseColumnType,
|
TClickhouseColumnType,
|
||||||
} from './smartclickhouse.types.js';
|
} from './smartclickhouse.types.js';
|
||||||
import { detectClickhouseType, escapeClickhouseValue } from './smartclickhouse.types.js';
|
import { detectClickhouseType, escapeClickhouseValue } from './smartclickhouse.types.js';
|
||||||
@@ -23,7 +24,7 @@ export class ClickhouseTable<T extends Record<string, any>> {
|
|||||||
// ---- INSTANCE ----
|
// ---- INSTANCE ----
|
||||||
|
|
||||||
public db: SmartClickHouseDb;
|
public db: SmartClickHouseDb;
|
||||||
public options: IClickhouseTableOptions<T>;
|
public options: IClickhouseTableOptions<T> & { database: string; engine: IEngineConfig };
|
||||||
public columns: IColumnInfo[] = [];
|
public columns: IColumnInfo[] = [];
|
||||||
private healingDeferred: plugins.smartpromise.Deferred<any> | null = null;
|
private healingDeferred: plugins.smartpromise.Deferred<any> | null = null;
|
||||||
|
|
||||||
@@ -230,7 +231,7 @@ export class ClickhouseTable<T extends Record<string, any>> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
intake.subscribe(
|
intake.subscribe(
|
||||||
async (doc) => {
|
async (doc: Partial<T>) => {
|
||||||
buffer.push(doc);
|
buffer.push(doc);
|
||||||
if (buffer.length >= batchSize) {
|
if (buffer.length >= batchSize) {
|
||||||
if (flushTimer) clearTimeout(flushTimer);
|
if (flushTimer) clearTimeout(flushTimer);
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ export class ClickhouseHttpClient {
|
|||||||
});
|
});
|
||||||
public computedProperties: {
|
public computedProperties: {
|
||||||
connectionUrl: string;
|
connectionUrl: string;
|
||||||
parsedUrl: plugins.smarturl.Smarturl;
|
parsedUrl: plugins.smarturl.Smarturl | null;
|
||||||
} = {
|
} = {
|
||||||
connectionUrl: null,
|
connectionUrl: '',
|
||||||
parsedUrl: null,
|
parsedUrl: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ export class ClickhouseResultSet<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public first(): T | null {
|
public first(): T | null {
|
||||||
return this.rows.length > 0 ? this.rows[0] : null;
|
return this.rows[0] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public last(): T | null {
|
public last(): T | null {
|
||||||
return this.rows.length > 0 ? this.rows[this.rows.length - 1] : null;
|
return this.rows[this.rows.length - 1] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public isEmpty(): boolean {
|
public isEmpty(): boolean {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export interface IClickhouseConstructorOptions {
|
|||||||
|
|
||||||
export class SmartClickHouseDb {
|
export class SmartClickHouseDb {
|
||||||
public options: IClickhouseConstructorOptions;
|
public options: IClickhouseConstructorOptions;
|
||||||
public clickhouseHttpClient: ClickhouseHttpClient;
|
public clickhouseHttpClient!: ClickhouseHttpClient;
|
||||||
|
|
||||||
constructor(optionsArg: IClickhouseConstructorOptions) {
|
constructor(optionsArg: IClickhouseConstructorOptions) {
|
||||||
this.options = optionsArg;
|
this.options = optionsArg;
|
||||||
|
|||||||
+3
-1
@@ -5,8 +5,10 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
|
"noImplicitAny": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"verbatimModuleSyntax": true
|
"verbatimModuleSyntax": true,
|
||||||
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist_*/**/*.d.ts"
|
"dist_*/**/*.d.ts"
|
||||||
|
|||||||
Reference in New Issue
Block a user